THE BIG COMPARISON

yelpframeΑσφάλεια

4 Νοε 2013 (πριν από 4 χρόνια και 6 μέρες)

107 εμφανίσεις

THE BIG COMPARISON

of

ASP.NET MVC View Engines


Shay
F
riedman

ASP.NET MVC

Credits:
Nestosjp

-

http://www.flickr.com/photos/
68901973
@N
00
/
3862119622

THE BIG COMPARISON

of

ASP.NET MVC View Engines


WebForms
,
NHaml
, Spark,
StringTemplate
, Razor

Shay Friedman

Co
-
Founder, Trainer, Consultant


h
ttp://IronShay.com | shay@ironshay.com | @
ironshay

which view engine have you used in production?

the facts

Web Forms View Engine (ASPX)

since
1996

expressiveness, explicitness

StringTemplate

since
2003

true model
-
view separation

Jamison

open
-
source

NHaml

since
2007

Andrew Peters, Steve Wagner, Simon
Cropp

open
-
source

html is bad

Spark

since
2008

Luis
DeJardin

open
-
source

seamless integration with HTML

Razor

since
2011

compactness and fluidness

the code

hello world

html encoded

not html encoded

cast your vote!

loops

layouts

from layout

from page

cast your vote!

displaying a form

DRY!

text

font size

SayHello.ascx

Page.aspx

SayHello.st

Page.st

_
sayHello.haml

Page.haml

cast your vote!

summary

resources

://asp.net/mvc
http

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
:

Shay Friedman | http://IronShay.com | shay@ironshay.com | @
ironshay

Shay Friedman | http://IronShay.com | shay@ironshay.com | @
ironshay

Thank you!