如何在不使用Web服务的情况下将用户页面和管理页面与同一数据库进行交互 [英] How do i interface the user page and the admin page with the same database without using web service

查看:58
本文介绍了如何在不使用Web服务的情况下将用户页面和管理页面与同一数据库进行交互的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我正在开发一个包含两个模块的网站,即客户端和管理端。

管理员端将是一个内容管理系统。但是我不想为它创建服务,

是否有办法将两者连接起来,这样如果管理员向内容管理系统提供值,那么客户端将获取来自同一数据库的数据。

解决方案

首先,请看我对这个问题的评论。



你已经回答了你自己的问题。如果您有一些专门用于管理员访问的页面和其他用户(不是管理员端或用户端),并且他们共享同一个访问的数据库(希望通过ADO.NET),则意味着您的页面使用共享数据库因此通过它接口。这一点尤其重要,因为HTTP是一种无状态协议,因此应用程序需要一些东西来维护状态,在这种情况下,这可以是您的数据库。实际上并不需要在ASP.NET应用程序的服务器端和数据库之间用作中间层的Web服务器。所有ADO.NET操作都隐藏在服务器端的客户端上,基于SQL的数据库引擎本身具有并行访问它所需的事务性质。



-SA

Hi guys, i am developing a site that contains two modules, the client side and the admin side.
The admin side will be a content management system. But i don't want to create a service for it,
is there a way to interface the two, such that if the admin supply value into the content management system the then the client will be fetching the data from the same database.

解决方案

First, please see my comment to the question.

You already answered your own question. If you have some page designed for admin access and for other users (not "admin side" or "user side"), and they share the same database accessed (hopefully, through ADO.NET), it means that your pages use shared database and hence interface through it. It is especially important because HTTP is a stateless protocol, so application need something to maintain states, and in this case, this can be your database. A Web server used as an intermediate tier between your server side of your ASP.NET application and database is not really required. All your ADO.NET operation are hidden from clients on the server side, and the SQL-based database engine itself has transactional qualities you need for parallel access to it.

—SA


这篇关于如何在不使用Web服务的情况下将用户页面和管理页面与同一数据库进行交互的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆