简体   繁体   English

我可以将数据库Web服务与生成的HTML一起用于Internet吗?

[英]Can I use Database web service with generated HTML for internet?

I am planning a web site (Internet facing) and would like to generate the HTML directly from a Database using Database Web Server (with proxy). 我正在计划一个网站(面向Internet),并希望使用数据库Web服务器(带有代理)直接从数据库生成HTML。 For, example, creating a SOAP web-service in an iAnywhere database . 例如, 在iAnywhere数据库中创建SOAP Web服务

This is in contrast to the "traditional" route of a PHP/C#/etc. 这与PHP / C#/ etc的“传统”路由相反。 application layer in between the client and the database. 客户端和数据库之间的应用程序层。 Before jumping on my head or lol .... I have read about reducing server load but expect that the database server can handle this, I have read about security isuues yet expect the logging in procedures and rights management in the database to be sufficient, sessions can also be handled etc. 在大步向前或大声笑....之前,我已经阅读了有关减少服务器负载的信息,但是希望数据库服务器能够处理这一点,我已经阅读了有关安全问题的信息,但希望数据库中的登录过程和权限管理足够了,会话也可以处理等。

Can anyone (without listing up the pros and cons of c#, PHP or any other programming language) help me on this decision please? 任何人(不列出C#,PHP或任何其他编程语言的优缺点)可以帮助我做出这个决定吗? I am aware that going the data base web service direction would mean a bit of re-inventing the wheel ... 我知道,向数据库Web服务方向发展将意味着重新发明轮子。

Although in theory there is no technical reason not to do this, I would generally consider it to not be a great idea, for a few different reasons. 尽管从理论上讲,没有技术上的理由不这样做,但出于一些不同的原因,我通常认为这不是一个好主意。

Your database query would be responsible for getting the data from the database and generating the HTML from that database. 你的数据库查询将负责从数据库中获取数据,并生成该数据库的HTML。 This is a possibility if you are just sending back really simple tabular data to the client. 如果您只是将非常简单的表格数据发送回客户端,则这是一种可能性。 However, this would be the worlds ugliest and least functional site. 但是,这将是世界上最丑陋且功能最差的站点。

Development and maintenance 开发与维护

If you wanted to start including CSS, JavaScript, a navigation menu, or anything like that, then it would be a huge amount of work. 如果您想开始包括CSS,JavaScript,导航菜单或类似的东西,那将是大量的工作。 It would almost certainly prove a maintenance nightmare. 几乎可以肯定,这将是维护方面的噩梦。

If you can expand on why you want to do it this way, and the complexity of your web-pages then I'll expand my answer a bit more. 如果您可以扩展为什么要这样做的原因以及网页的复杂性,那么我将进一步扩展答案。

If you really wanted to do it this way, then you could use shudder iFrames to have a basic site-structure, and load database-generated pages into the iFrame. 如果您确实想通过这种方式进行操作,则可以使用不规则的 iFrame来具有基本的站点结构,并将数据库生成的页面加载到iFrame中。

Alternatively, you could have a more traditional site, but use AJAX techniques (typically in conjunction with jQuery) to get JSON data from the database and display that. 另外,您可能有一个更传统的站点,但是使用AJAX技术(通常与jQuery结合使用)从数据库中获取JSON数据并进行显示。

Security 安全

A sensibly developed web-site (ie one which avoids SQL Injection attacks, etc.) will remove almost any attack-vector against your database (which will not be internet visible). 一个合理开发的网站(即避免SQL注入攻击等的网站)将删除针对您数据库的几乎所有攻击载体(在互联网上不可见)。 Your way, you are relying on the database itself to provide that security. 您的方式就是依靠数据库本身来提供这种安全性。 In principle that's possible, but you would want to spend very good money on a DBA who really knew his stuff to ensure that. 从原则上讲这是可能的,但是您可能想花很多钱去买一个真正了解他的东西的DBA来确保这一点。

Development Resources 开发资源

There is a whole wealth of resources out there (tutorials, code samples, stack-overflow, etc.) to aid you in implementing the traditional architecture. 那里有大量资源(教程,代码示例,堆栈溢出等)可以帮助您实现传统架构。 You won't get this same support for the direct-database approach. 您将不会对直接数据库方法获得同样的支持。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Azure虚拟机上运行的SQL Server Web Edition上的Reporting Service是否可以将Azure数据库用作数据源? - Can Reporting service on sql server web edition running on azure virtual machine use the azure database as the data source? 如何通过Web服务或数据库查询访问SharePoint内置警报我的定义(针对用户定义的警报) - How can I access to SharePoint builtin alert me definitions (to user defined alerts) by web service or database query 为什么我无法通过 Internet 连接到我的数据库 - Why Can't I Connect to My Database Over the Internet 无法在Web服务中使用SQL Azure数据库值 - Unable to use sql azure database value in web service 如何使用Web套接字和A(数据库)用户系统更改发送的数据? - How can I use Web Sockets AND A (database) User system to alter what data is sent? 我可以使用 JSON 作为数据库吗? - Can I use JSON as a database? 我可以在没有Web服务的情况下从C#桌面应用程序连接到Sharepoint上的SQL Server数据库吗? - Can I connect from my C# desk top application to an SQL Server database on Sharepoint without a web service? 如何使用HTML中的选择框在数据库中搜索特定用户并在表中显示该信息? - How can I use a select box in HTML to search for a specific user in the database and show that information on a table? 在Web服务中使用sql - use sql in web service 我可以在同一个服务中使用两个存储库吗? - can i use two repository in the same service?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM