views:

65

answers:

4

Hello, I am in the process of building a very scalable website. I am to the point where I must choose between XSLT and using the asp.net MVC framework and the helper functions. My data is already in XMl format and it will stayy that way. The reason my data is in XML format is because it will be much easier to make changes and I will only need to make only one database query.

I am using asp.net mvc 2 and wondering which approach will be the least resource intensive. I will get many many page views in a minute. if I go asp.net mvc way I will be forced to use linq to xml and if I go xslt way I will just throw xslt the xml and it will transform it.

+1  A: 

ASP.NET MVC is not likely to be a barrier to achieving high throughput. ASP.NET MVC does not force you to use LINQ to XML.

Larsenal
+1 for 'does not force you to use LINQ to XML', there are soooo many options.
eglasius
what other option do i have besides linq to xml
Luke101
If you wanted to do it "by hand" you could use the `XmlDocument` and `XslTransform` classes. The key point is that MVC will allow you to use any .NET libraries to retrieve and process your XML.
Larsenal
2 more options: XDocument and XmlSerializer.
eglasius
+4  A: 

You can use ASP.NET MVC with an XSLT view engine.

Max Toro
+1 There is one in MvcContrib
Gabe Moothart
@Gabe Moothart: I think it was removed from MvcContrib. I recommend mine, of course :-) http://myxsl.net/mvc
Max Toro
Which one do you think will have more scalability? xslt or asp.net mvc with linq to xml.
Luke101
@Luke101: Don't know. What I do know is that `XslCompiledTransform` is one of the fastest processors out there. I suggest you try both and measure.
Max Toro
Good answer -- +1.
Dimitre Novatchev
+1  A: 

Its hard to tell with the amount of info you are providing.

Unless you need 0 server side processing, I'd still use asp.net MVC, regardless of the decision to use xslt or not. The only scenario I see asp.net MVC out of the picture, is if it were pure static data and you pre-process all the files to Html files.

There are various factors and options involved. Like @Larsenal said, you are not forced to use linq to xml, and you are also not forced to use return a view in the controller actions / and if you do you have a lot of options in the view engine you use.

eglasius
A: 

Implementing views with XSLT may give you more flexibility and, depending on your background and expertise, such design decision may result in easier, faster to develop and more maintainable implementation.

This would be particularly handy if your models are (represented as) XML documents.

Dimitre Novatchev