|
|
|
|
|
by ajacksified
4916 days ago
|
|
I agree with most of this - great tips. However, for almost all applications, you'll want to render on the server, and bootstrap data on the client so that the client can take over and begin rendering using something like Backbone. This can be done by dropping a big json object on the page for the client to read as it initializes it's Backbone (or any framework) application. This will solve the issues you'll run into later such as * SEO - search engines won't read empty pages (you can get around this with some hacks)
* Performance - loading a full page is always much, much faster than loading half a page, downloading javascript, parsing javascript, sending off multiple ajax requests for data, and then finally rendering the first page
* Accessibility - a version of your site that works without javascript is not only easy to build, but is easier for machine reading
* Development cleanliness - building your site in layers (html / http only, layer on css, layer on more advanced css, layer on javascript) keeps your code from becoming too tightly coupled and is much easier to work with. Plus, this makes it much easier to work with less advanced browsers It's actually quite simple to do, especially with node, where you can share functions to format data, or even run the same framework on both side if you decouple your code (Backbone's latest change to help abstract Ajax seems like a step in this direction.) |
|