Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Specifically on the subject of View Engines, if you're looking to introduce code blocks into your views, then Razor would be the neatest way of doing that.</p> <p>I guess, given your background, the next question would be - "how do I know if I want to introduce code blocks into the view?" - the answer I'm afraid can only come to you with a lot of pain an experience. Many people have written blog posts explaining the dangers of code blocks mixed in with markup that leads to a nightmare commonly referred to as <a href="http://www.codinghorror.com/blog/2008/07/web-development-as-tag-soup.html" rel="nofollow">Tag Soup</a>.</p> <p>All that Razor (and Webforms for that matter) does for you is bring the power of the entire C# or VB.Net languages into the view in a way that prescribes abundant usage. This is what leads to the Tag Soup problem.</p> <p>But it seems there are still die-hards out there under some kind of illusion that you can actually keep your views clean in the long term by using this method. If you are working on the code alone, and forever, then I'd tend to agree that it is possible, but only then with the mind-numbingly depressing levels of concentration and determination.</p> <p>If however, you'd like to keep you views for markup with the code abstracted away to where it can be less tempting to put a "quick fix in here" and a "hack in there", then I'd highly recommend that you skip over the code-centric view engines and go with Spark.</p> <p>In terms of answering your question directly, you can find plenty of tutorials from beginner to advanced. Here are some of the ones I'd recommend in blog and video formats:</p> <ul> <li><a href="http://blogs.msdn.com/b/coding4fun/archive/2010/10/04/10070953.aspx" rel="nofollow">http://blogs.msdn.com/b/coding4fun/archive/2010/10/04/10070953.aspx</a> - An incredibly comprehensive and accurate comparison of View Engines prepared by Jason Haley</li> <li><a href="http://vimeo.com/13027275" rel="nofollow">http://vimeo.com/13027275</a> - A beginners' introduction to Spark given at NDC2010 by the author, Lou DeJardin himself</li> <li><a href="http://vimeo.com/13027900" rel="nofollow">http://vimeo.com/13027900</a> - Another video for more advanced usage of Spark also given by Lou at the same conference.</li> <li><a href="http://blog.robertgreyling.com/2010/07/is-razor-just-wolf-in-sparks-clothing.html" rel="nofollow">http://blog.robertgreyling.com/2010/07/is-razor-just-wolf-in-sparks-clothing.html</a> - A blog post where I directly compare and contrast Razor and Spark</li> <li><a href="http://blog.robertgreyling.com/2010/08/spark-bindings-are-you-tired-of-eating.html" rel="nofollow">http://blog.robertgreyling.com/2010/08/spark-bindings-are-you-tired-of-eating.html</a> - A blog post I wrote about cleaning up your markup</li> <li><a href="http://blog.robertgreyling.com/2010/08/elegant-mvc-with-spark-way-views-were.html" rel="nofollow">http://blog.robertgreyling.com/2010/08/elegant-mvc-with-spark-way-views-were.html</a> - An online session I prepared for C4MVC as an educational and awareness exercise.</li> </ul> <p>Anyway, I hope that gives you enough to make an informed decision.</p> <p>Best of luck in your dabblings!</p> <p>Rob G</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload