Skip to content

Instantly share code, notes, and snippets.

@xing5
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xing5/5ea29879e5d6d1e3adf2 to your computer and use it in GitHub Desktop.
Save xing5/5ea29879e5d6d1e3adf2 to your computer and use it in GitHub Desktop.
TechStack
# Tech Stack for Profession.is
## Server-side Rendering or Client-side Rendering
### References
* [Server vs client side rendering (AngularJS vs server side MVC)](http://technologyconversations.com/2014/07/10/server-vs-client-side-rendering-angularjs-vs-server-side-mvc/)
* [Client vs serverside rendering – the big battle?](http://blog.mwaysolutions.com/2013/11/08/client-vs-serverside-rendering-the-big-battle-2/)
* [Rendering on the Server and Client in Node.js](http://artsy.github.io/blog/2013/11/30/rendering-on-the-server-and-client-in-node-dot-js/)
* [Short story about rendering HTML, client side vs server side](http://eshlox.net/2014/05/04/short-story-about-rendering-html-client-side-vs-server-side/)
### Decision
**Server-side rendering**. The reasons are as follows:
- Better SEO support
- Faster page loading speed
## Web Framework
### ~~[Meteor](https://www.meteor.com/)~~
* Maintain a keep-alive connection with web server, **pure client-side rendering**
* Use Handlebars for template
* Real-time, event-driven
* Ready-to-go Mongodb API
### [Sails](http://sailsjs.org/)
* It is more like a boilerplate for projects using [Express](http://expressjs.com/), [Socket.io](http://socket.io/), [Waterline](https://github.com/balderdashy/waterline), and etc.
* Flexible to implement either server-side rendering pages or single-page apps (Express)
* Supports real-time updates but client-side js is required for interactive response (Socket.io)
* Uses [EJS](http://www.embeddedjs.com/) as default template engine but can be configured to others (Express)
* Provides a uniform API for accessing stuff from different kinds of databases, protocols, and 3rd party APIs (Waterline)
* Poor support for deployment
### [LoopBack](http://loopback.io/)
* Aims to simplify the implementation of end-to-end REST API, and decouple front-end and back-end (It even provides client API for AngularJS, mobile apps). However, you can also implement server-side rendering pages as it is based on Express
* The comparison on its official site: http://loopback.io/resources/
* StrongLoop Arc Build & Deploy, Monitoring, Profiling
### [Derby](http://derbyjs.com/)
* Server rendering
* Data models provided by [Racer](https://github.com/derbyjs/racer), which enables multiple users and services to interact with the same data objects with realtime conflict resolution
* Derby HTML templates are based on Handlebars
* Poor community
### ~~[MEAN.IO](http://mean.io/)~~
* MEAN means Mongodb, Express, AngularJS, NodeJS
* I have watched the tutorial video on the official site but still don't get what exactly does MEAN.IO do. The packages and modules in MEAN.IO seem complicated and tedious
### [koa](http://koajs.com/) & [hapi](http://hapijs.com/)
* These two are similar to Express in functionalities
* Smaller community than Express
* A comparison found online: [Link](https://www.airpair.com/node.js/posts/nodejs-framework-comparison-express-koa-hapi)
### Conclusion
I think Loopback is our best bet.
* Express is still the stablest, most used web application framework. We should choose something built on top of Express. This leaves us Sails, Loopback, and MEAN.IO.
* I personally cannot follow the design philosophy of MEAN.IO.
* The comparison between Sails and Loopback: [link](http://www.quora.com/Which-framework-should-I-choose-Sail-js-or-Loopback-by-Strongloop). I would choose Loopback because its future seems promising, as the company behind Loopback is StrongLoop, which is founded by core committers of Node.js and provides enterprise solutions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment