4 ms·
Razor Syntax in ASP.NET MVC 3 Preview 1
- ryanpetrich 16y agoYet another ASP.NET flavor?
- StrawberryFrog 16y agoWell, yes. Which is better: options, plugins and experimentation; or only one way to do it?
- cesarsalazar12 16y agoI'm not against ASP.NET or this Razor syntax, but is this really HN material? Honestly folks, I'm clueless about how this got to the front page.
- vyrotek 16y agoWe also sort of already discussed this on the author's last submission. - http://news.ycombinator.com/item?id=1641578 http://news.ycombinator.com/item?id=1641578
- White_N_Nerdy 16y agoAll these posts about ASP.Net are getting in the way while I wait for the 500th article about Clojure or Node.js.
- JanezStupar 16y agoIt seems funny that .NET got their own @formula engine (http://en.wikipedia.org/wiki/Formula_language http://en.wikipedia.org/wiki/Formula_language). I like subtle nods and references by MS towards Lotus Notes since Ray Ozzie went to MS - or is it only in my head?
- StrawberryFrog 16y agoIt's an unsubtle nod to spark http://sparkviewengine.com/ http://sparkviewengine.com/
- Daishiman 16y agoRuby and Python templating engines are better.
- some1else 16y agoHaml/Sass is the best thing that happened to my view layer (next to wonderful Ruby blocks, iterators and chaining)
- epochwolf 16y agoLook up NHaml.
- kennedywm 16y agoHow so? I haven't used them and I wouldn't mind reading a comparison.
- Daishiman 16y agoThe driving philosophy of these engines is that your presentation layer should not contain any logic that goes beyond the rendering of data, and your templating should be an aid to outputting HTML, not merely a medium. Take Django templates, for example: you output data using tags and filters, with support for defining commonly-used blocks of HTML to reduce redundancy. Take Haml, which uses CSS selector syntax to reduce the amount of HTML boileplate to a bare minimum. The common factor of these engines is that your end up writing less code than plain HTML, and unlike this new engine for ASP, the mixing of code and presentation doesn't look completely horrendous.
- drawkbox 16y agoASP.NET is finally getting the idea of alternative template engines. That is one great point about Python, Ruby, PHP etc is there are many template alternatives for all levels of simplifying templates so that they aren't so glued to the controller or renderer. This makes it easy to swap out basic html/javascript templates and use them in complex systems without mounds of work.