views:

100

answers:

1

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.

+2  A: 

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:

protected void Page_Load(object sender, EventArgs e)
{
    var products = Product.GetPaged(1, 20);
    productsGridView.DataSource = products;
    productsGridView.DataBind();
}

To answer your last question more succinctly: using Subsonic would not be a BAD thing, at least not for the reasons you mentioned.

Kurt Schindler
okay cool, thanks for that i know subsonic is good dont get me wrong but can never seem to work out if MVC is slow or not on IIS6 but i really like using subsonic, despite its frustrations :-)
minus4