Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Razor Syntax in ASP.NET MVC 3 Preview 1 (dotnetcurry.com)
17 points by bigstorm on Sept 4, 2010 | hide | past | favorite | 13 comments


It seems funny that .NET got their own @formula engine (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?


It's an unsubtle nod to spark http://sparkviewengine.com/


ASP.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.


Ruby and Python templating engines are better.


Haml/Sass is the best thing that happened to my view layer (next to wonderful Ruby blocks, iterators and chaining)


Look up NHaml.


How so? I haven't used them and I wouldn't mind reading a comparison.


The 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.


Yet another ASP.NET flavor?


Well, yes. Which is better: options, plugins and experimentation; or only one way to do it?


I'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.


We also sort of already discussed this on the author's last submission. - http://news.ycombinator.com/item?id=1641578


All these posts about ASP.Net are getting in the way while I wait for the 500th article about Clojure or Node.js.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: