I am developing a web app and I have currently written the entire website in htm
ID: 646078 • Letter: I
Question
I am developing a web app and I have currently written the entire website in html/js/css and on the backend I have servlets that host some RESTFUL services. All the presentation logic is done through getting json objects and modifying the view through javascript.
The application is essentially a search engine, but it will have user accounts with different roles.
I've been researching some frameworks such as Play and Spring. I'm fairly new to web development, so I was wondering what advantages using server side page rendering would provide?
Is it: Speed? Easier development and workflow? Access to existing libraries? More? All of the above?
Explanation / Answer
Server-side HTML rendering:
Fastest browser rendering
Page caching is possible as a quick-and-dirty performance boost
For "standard" apps, many UI features are pre-built
Sometimes considered more stable because components are usually subject to compile-time validation
Leans on backend expertise
Sometimes faster to develop*
*When UI requirements fit the framework well.
Client-side HTML rendering:
Lower bandwidth usage
Slower initial page render. May not even be noticeable in modern desktop browsers. If you need to support IE6-7, or many mobile browsers (mobile webkit is not bad) you may encounter bottlenecks.
Building API-first means the client can just as easily be an proprietary app, thin client, another web service, etc.
Leans on JS expertise
Sometimes faster to develop**
**When the UI is largely custom, with more interesting interactions. Also, I find coding in the browser with interpreted code noticeably speedier than waiting for compiles and server restarts.
You might also consider a hybrid model with a light backend implementation using a front-end/back-end templating system like mustache.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.