More than One Way to Render a Page
Where is the best place to render fancy “dynamic” personalized web pages? Should it happen near the user, on the browser, with JavaScript frameworks such as ReactJS? Or should all the rendering take place back at the server, with technologies such as Node.JS, or Next.JS, or even through server software tools such as Apache Server Side Includes (SSI)?
This has been an ongoing conversation since the first model-view-controller was introduced to the web as a way to match rich backend content with front end-user interests. Because HTML was originally created just to format pages, not interpret the logic needed to create them, developers gravitated to JavaScript frameworks, which in most cases have the browser parse the page logic: Frontend is closer to the user, though is limited by the computational power of the browsing device. There is no such limitation when you have powerful backend servers, though you still build up latency sending the dynamically-created pages over the wire (and wireless) to the user.
These days, frontend JavaScript Frameworks are overwhelmingly the preferred approach, though a number of parties are trying to rethink this whole business of delivering content to the user, as well as reduce the complexity introduced by the JavaScript frameworks. This week, TNS Senior Editor Richard MacManus wrote about Yax.com, an approach that does away with full-blown JavaScript framework, deploying instead JavaScript modules (a new feature introduced in the ES6 JavaScript standard) and custom HTML elements, which browsers now recognize through the Web Components standard. As Kehoe explained:
“We once needed web application development frameworks because there was no option to write modular code or access databases in old-time HTML and JavaScript. Now custom elements make it possible to write modular HTML.”
Two weeks ago, MacManus wrote about another approach, called Hotwire, which was created by Basecamp to build its next generation email service, Hey.com. Fusing backend and frontend operations, Hotwire minimizes the amount of JavaScript needed, ditching JSON for old-school HTML-over-the-wire.
Whether or not efforts like Yax or Hotwire take off remains to be seen, but the writing is the wall: The web community will start seeing new approaches to the age-old problem of bringing the data and the services to the end user. Are we about to witness a sea change in how the web is rendered? Stay tuned …
|