4 ms·
What would you use for a public facing application?
by EC1 13y ago
What would you use for a public facing application?
- dchuk 13y agoAny sort of standard server side rendering, or possibly a front end framework that can be rendered server side as well (I think React can do that, same as Backbone). Basically, SPA frameworks are useful when you are working with lots and lots of data moving back and forth. A good example is something like Intercom.io's interface. They have tons of tables and modals and data flying around. This isn't conducive to the standard browser request -> server render -> load whole new page on the client. It's just too slow. When you're interacting purely with data in a master interface, SPA frameworks are the way to go. And it isn't even a matter of literal page loading and rendering speed, it's the fact that refreshing the view with a whole new page on each link click is a context change that adds up when you're managing a lot of data or performing a lot of small tasks in an application. But something like Blogger, where you're reading just some content, maybe some comments...there's no real benefit from loading it in a SPA environment. Render it server side, cache it, and fire it to my browser as fast as possible.
- elliottkember 13y ago> Render it server side, cache it, and fire it to my browser as fast as possible. Shameless plug, but we've been trying to do something similar with Forge (getforge.com). We built a Javascript library called TurboJS that precompiles a static HTML build into a JS manifest and loads it all. It's SEO-friendly and super-fast. Our other site, http://hammerformac.com/ http://hammerformac.com/ uses it, for example.
- btown 13y agoPrecompiling static HTML is a strict sub-problem of the problem most people in this comment thread are referring to, which is development incentives and SEO characteristics for web pages that have non-trivial amounts of dynamic content.
- uptown 13y agoI recommend PJAX. It degrades gracefully for search engine indexing.
- andybak 13y agoYep. PJAX and it's ilk are wonderfully simple, degrade well and fit in with many existing approaches. We added PJAX rendering to a Django site in under an hour. All the benefits of SPA's and few of the downsides.
- eddyystop 13y agoI've started using PJAX where the rendered page does not have to change when its source data does, and where you don't have large tables/calendars that would have to be re-rendered when one data value changes. Development is significantly faster, less error-prone, easier to maintain. Development can also be given to people with lower skill levels.
- rlidwka 13y ago"node.js + express + jade" is a fairly common stack, you can even try to move an existing complex angular.js code there because it's written in the same language
- Kiro 13y agoIs node really a good choice for static non-real time sites? I'm thinking something like Django or Ruby on Rails is better.
- emanuelsaringan 13y agoTo each his own. Node shines when multiple concurrent users access your pages simlutaneously. Also, have you seen Jade's syntax? It's very clean.
- iends 13y agoWhy do you think they are better? In most cases Node.js is just faster than Rails or Django.