views:

705

answers:

3

I'm planning a new project at the moment, built on MVC. Now, there are several different View Engines, and I just wonder what the disadvantages of the Webforms engine are that would justify a switch? Some people feel really strong against it, and I just wonder why?

Can I still retain something like .ascx Controls with other View Engines, say Spark or StringTemplate? (Okay, to be fair, that's just using RenderPartial and passing in proper ViewData, but it's still modularization of common "blocks" on multiple views)

+8  A: 

From my experience the only real disadvantage of the webforms engine is verbosity. Spark is much more terse and supports partials (not .ascx though) and master pages.

You can run Spark and the standard webforms engine side by side though so if you run into any cases where spark wouldn't work for you, you could still use webforms (I don't know of a way to share master pages between them though).

John Sheehan
Indeed web forms bring back the classic ASP "tag soup," that everyone has come to love (read: hate).
Chad Moran
+3  A: 

Stephen Walther has a couple of examples of using a different view engine than the webforms engine with MVC:

As far as advantage vs. disadvantage... I personally enjoy the "tag soup" feel of classic asp'ish style. To me, it feels like an old comfortable pair of shoes.

With judicious use of HtmlHelpers, the tag soup is greatly reduced by having reusable "bits". In classic ASP, I made class helpers and included them in the page. In webforms, I rolled web controls. Now it's HtmlHelpers.

datacop
@Zhaph: Thanks for the clean up!
datacop
+2  A: 

I think the MVC view engine isnt that bad. I also like sticking with the "mainstream" as I am sure there will be new features/help in MVC 2.0 that I dont want to miss out. I am sure the other engines do some very nice things, but everytime I have strayed from the standard, its managed to find me when we want ot upgrade to the next technology or release.

However, that said - the only true way to understand what those other engines provide is to try them out with somehting you have build or understood and see if you like the feel and or capabilities that you are gaining/giving up.

MikeJ
Plus, the Spark View Engine guy is now an employee of MS. While this may sound good, in all likelihood he won't have much time to maintain his engine.
Jess
There is something to be said for sticking wit the 'mainstream'. It's easier to find help / have someone else read your code for one. However, I think it will be interesting to see what sort of shift there is when MVC 3 is officially released with the razor view eingine. My hunch is that many people will prefer Razor to the current WebFormsViewEngine.
Joshua Hayes
but being offered from the vendor I expect that Razor will be mainstream by the sense that on day 1 I expect that Razor will have more users than any of the alternative engnies combined.
MikeJ