![Page 1: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/1.jpg)
THE BIG COMPARISON of
ASP.NET MVC View Engines
Shay Friedman
![Page 2: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/2.jpg)
![Page 3: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/3.jpg)
![Page 4: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/4.jpg)
![Page 5: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/5.jpg)
![Page 6: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/6.jpg)
![Page 7: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/7.jpg)
![Page 8: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/8.jpg)
ASP.NET MVC
![Page 9: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/9.jpg)
![Page 10: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/10.jpg)
Credits: Nestosjp - http://www.flickr.com/photos/68901973@N00/3862119622
![Page 11: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/11.jpg)
![Page 12: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/12.jpg)
THE BIG COMPARISON of
ASP.NET MVC View Engines
WebForms, NHaml, Spark, StringTemplate, Razor
![Page 14: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/14.jpg)
which view engine have you used in production?
![Page 15: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/15.jpg)
the facts
![Page 16: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/16.jpg)
Web Forms View Engine (ASPX)
since 1996
expressiveness, explicitness
![Page 17: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/17.jpg)
StringTemplate
since 2003
true model-view separation
Jamison
open-source
![Page 18: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/18.jpg)
NHaml
since 2007
Andrew Peters, Steve Wagner, Simon Cropp
open-source
html is bad
![Page 19: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/19.jpg)
Spark
since 2008
Luis DeJardin
open-source
seamless integration with HTML
![Page 20: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/20.jpg)
Razor
since 2011
compactness and fluidness
![Page 21: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/21.jpg)
the code
![Page 22: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/22.jpg)
hello world
![Page 23: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/23.jpg)
![Page 24: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/24.jpg)
![Page 25: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/25.jpg)
html encoded not html encoded
![Page 26: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/26.jpg)
cast your vote!
![Page 27: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/27.jpg)
loops
![Page 28: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/28.jpg)
![Page 29: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/29.jpg)
![Page 30: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/30.jpg)
![Page 31: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/31.jpg)
layouts
![Page 32: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/32.jpg)
from layout
from page
![Page 33: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/33.jpg)
![Page 34: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/34.jpg)
![Page 35: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/35.jpg)
![Page 36: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/36.jpg)
![Page 37: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/37.jpg)
![Page 38: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/38.jpg)
cast your vote!
![Page 39: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/39.jpg)
displaying a form
![Page 40: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/40.jpg)
![Page 41: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/41.jpg)
![Page 42: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/42.jpg)
![Page 43: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/43.jpg)
![Page 44: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/44.jpg)
![Page 45: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/45.jpg)
DRY!
![Page 46: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/46.jpg)
text font size
![Page 47: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/47.jpg)
SayHello.ascx
Page.aspx
![Page 48: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/48.jpg)
SayHello.st Page.st
![Page 49: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/49.jpg)
_sayHello.haml
Page.haml
![Page 50: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/50.jpg)
![Page 51: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/51.jpg)
![Page 52: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/52.jpg)
cast your vote!
![Page 53: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/53.jpg)
summary
![Page 54: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/54.jpg)
resources
://asp.net/mvchttp
http://code.google.com/p/nhaml
http://sparkviewengine.com/
ASPX, razor:
NHaml:
Spark:
Slides + code + detailed resource list: http://IronShay.com
http://code.google.com/p/string-template-view-engine-mvc StringTemplate:
![Page 55: The Big Comparison of ASP.NET MVC View Engines](https://reader033.vdocuments.net/reader033/viewer/2022051818/54b4edd84a79590a688b4614/html5/thumbnails/55.jpg)
Shay Friedman | http://IronShay.com | [email protected] | @ironshay