关于在没有 MVC 的情况下使用 SubSonic 3.0.0.3 的建议/意见?
我将 SubSonic 3.0.0.3 ActiveRecord 与 ASP.NET MVC 一起使用,它非常好。然而,我们在 IIS 6 上运行,我往往会遇到很多速度问题。我不知道这是否是我太偏执,但我正在考虑将 SubSonic 与普通的 ASP.NET WebForms 网站一起使用。请原谅我太厚重,但我已经习惯了模型和绑定,现在我无法想象如何在普通的 ASPX 页面中使用 SubSonic。
例如,这足以让我自由。我有一个产品视图页面 .aspx,我将使用 SubSonic 代码下拉数据,但是我对页面结尾有点困惑,我没有任何我想看到的示例代码对此有何评论?如果我在 IIS 6 上运行 MVC 和 SubSonic 是一件坏事。
I use SubSonic 3.0.0.3 ActiveRecord with ASP.NET MVC and it is very nice. However, we run on IIS 6 and I tend to have quite a few issues with speed. I dont know if this is me being too paranoid but I was thinking of using SubSonic with just a normal ASP.NET WebForms website. Please forgive me for being thick but I'm so used to models and binding now that I can't think how to use SubSonic within a normal ASPX page.
For example and this would be enough to set me free. I have a product view page .aspx and in that I would pull down data using the SubSonic code, but then there is my page end I'm a little confused about, I don't have any example code as I would like to see what is said about this and if me running MVC and SubSonic on IIS 6 is a BAD thing.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在我看来,我认为你并没有真正提出正确的问题。无论您使用的是 IIS6 还是 IIS7 和/或 MVC 还是 Webforms,都不会对使用 Subsonic 的可行性产生任何影响。也就是说,Subsonic 应该可以与任何平台组合正常工作。
如果性能至关重要,您当然需要考虑 Subsonic 或任何 ORM 永远不会像您可以自己编写和优化的纯 ADO.NET 代码那么快。话虽如此,您的性能瓶颈很可能与此无关。
在 .aspx 页面中使用 Subsonic 就像在 MVC 中一样,唯一的区别是现在您将直接将任何数据绑定到控件而不是传递到视图中:
更简洁地回答您的最后一个问题:使用 Subsonic 不会是一个坏事,至少不是因为你提到的原因。
I don't think you are really asking the right questions, in my opinion. Whether you are using IIS6 or IIS7 and/or MVC or Webforms shouldn't have any impact on the feasibility of using Subsonic. That is, Subsonic should work just fine with any platform combination.
If performance is critical, you certainly need to consider that Subsonic or any ORM is never going to be quite as fast as pure ADO.NET code that you could write and optimize on your own. Having said that, odds are your performance bottleneck has nothing to do with this.
Using Subsonic in an .aspx page is just like you would in MVC, the only difference being now you'll bind any data directly to controls rather than passing into a view:
To answer your last question more succinctly: using Subsonic would not be a BAD thing, at least not for the reasons you mentioned.