json - asp.net mvc 4 vs JavaScript templates -
i've been struggling in deciding direction go in regards best approach rendering content browser: server side using razor or client side using json data , form of templating (jsrender, loadjson, etc.)
here's great article on using client side templating asp.net mvc: jquery templates/view engines in asp.net mvc
asp.net mvc 4 has great toys (webapi). can see creating suite of webapi functionality delivering json data can used on traditional web pages , mobile pages. cool stuff.
then @ options have going traditional asp.net mvc approach. have layouts, can take advantage of automatic bundling/minification of js/css files (more asp.net mvc 4 goodness), robustness of having asp.net mvc available @ fingertips. cool stuff.
so, question how make decisions on direction should go architecturally? suppose can have mix bag of approaches within site, becomes maintenance issue. going total javascript templates , consuming json data service super clean separation of concerns, seems loose out on lot of goodness asp.net mvc offers routing.
what's best approach balancing of options available us?
this bit of general question, general answer should stick approach makes productive/gets job done. either approach works of course has tradeoffs. don't matter unless reach big scale (e.g. twitter annonced move server-side rendering performance reasons). if you're familiar mvc , you're working against deadline - stick that. if have more time or want learn new technique - go looks interesting.
Comments
Post a Comment