paperlined.org
dev > javascript > webserver=model-only
document updated 12 years ago, on Jul 12, 2011
When using MVC architecture (model-view-controller), what happens if the webserver ONLY implements the model, while the view and controller are ENTIRELY implemented client-side, in Javascript?

This means that all HTML-templating is done client-side only. The server does NO templating.

Downsides

No fallback — Until recently, "best practices" in browser development was to always have a fallback to allow less-able browsers to function without Javascript. However, Javascript has been increasingly been considered a must-have for modern websites to function, so many developers consider this to no longer be a problem.

Upsides

No duplication of presentation logic — Traditionally, some presentation logic is handled server-side, and some is handled browser-side. Often there is overlap (the initial render of a page is done server-side, but the live updates are done browser-side), and here code gets implemented in two different places, in two different languages.