ASP.NET 3.5 无状态会话管理和连接池?

发布于 2024-08-28 10:01:47 字数 340 浏览 1 评论 0原文

我正在设计一个连接到 Rocket Software UniVerse 数据库的 ASP.NET (3.5) Web 应用程序。我现在正处于计划阶段,需要一些帮助来指明正确的方向。我是 ASP 和 C# 的新手。

我正在追求 RESTful 设计和 MVC 模式。 Rocket 提供了一个名为 UniObjects.NET 的 .NET 库,它处理连接数据库和从数据库检索信息的所有事务。

一般来说,将我的用户登录到数据库,然后通过连接池使用该会话的最佳方法是什么?我看到 3.5 中有 ASP.NET 路由基础设施,看起来很有希望,我在这方面的方向正确吗?

C# 还支持 Python 和 Java 等装饰器吗?

I am designing an ASP.NET (3.5) web application that connects to a Rocket Software UniVerse database. I am in the planning stages right now and need some help in being pointed in the right direction. I am brand new to ASP and C#.

I am shooting for a RESTful design and a MVC pattern. Rocket provides a .NET library called UniObjects.NET which handles everything for connecting and retrieving information from the database.

What would be the best way to in general to log my users into the database, then use that session via connection pooling? I see that in 3.5 there is the ASP.NET Routing Infrastructure and that looks promising am I in the right direction on this?

Also does C# support decorators like Python and Java?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不羁少年 2024-09-04 10:01:47

对于您的应用程序,我强烈建议您查看官方 ASP.NET MVC 框架 (www.asp.net/mvc)。传统的 ASP.NET(称为 WebForms)在真正的关注点分离、依赖注入、单元测试等方面很笨重。一个非常好的起点是:

至于连接到数据库:如果您的数据库有 ADO.NET 提供程序,您应该学习通过 ADO.NET 访问数据的基础知识 (http://msdn.microsoft.com/en-us/library/aa719474.aspx)

也建议使用某种 OR Mapper,例如 NHibernate 或 Microsoft Entity Framework,用于将关系数据转换为面向对象的世界。

由于这是一个非常广泛的主题,请随时跟进您可能有的任何问题。我建议从 NerdDinner 教程开始。

For your application I highly recommend taking a look at the official ASP.NET MVC framework (www.asp.net/mvc). The traditional ASP.NET (which is called WebForms) is clunky when it comes to true separation of concerns, dependency injection, unit testing etc. A very good starting point is:

As for connecting to a database: If your Database has an ADO.NET Provider you should learn the basics of accessing data via ADO.NET (http://msdn.microsoft.com/en-us/library/aa719474.aspx)

It is also recommended to use some kind of OR Mapper like NHibernate or Microsoft Entity Framework for converting relational data to the object-oriented world.

As this is a very broad topic, please feel free to follow up with any questions you might have. I suggest starting with the NerdDinner Tutorial.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文