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)
ASP.NET delivers enhanced performance and scalability. It also comes with features like just-in- time compilation, early binding, native optimisation and caching services, and they too serve to improve performance several notches higher. The codes here are not interpreted like traditional ASP pages.
ASP.NET Core ConsIt will take a few years till existing products based on . NET Core will be fully updated. Though there are a lot of . NET developers on the market, ASP.NET Core framework is a huge step forward comparing to ASP.NET Framework and there are many changes and new concepts.
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).
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With