Latest Javascript and Node.js trends

RailwayJS  is a nice framework built on the same principle as Rails. It is built on top of express JS : it looks easy to learn and provides a lot of helpers (localization, caching…) to build a solid web application. There is a small bad point : the ORM/ODM, called JugglingBD is weird because it claims to be able to manage both relational DB and non-relational DB.  The good fact is that it allows to do some validations on the model fields and have functions to set actions before and after an operation is done on models. Railways allows to do scaffolding, that means he prebuilt your resources and your routes supposing you will do CRUD operations on a given entity kind. Finally Railways looks like a good framework to start a web app with Node.js but don’t use it if you want to develop a small and lightweight application (there are a lot of unuseful features in this case).

Iced Coffee script is a language built on top coffee script. In fact it is the same language with some nice features added. As you know, Javascript relies a lot on callback/closures. So, notably with node.js, your code can become unreadable due to the number of nested callback. Iced allow to write asynchronous code in a synchronous way without breaking the asynchronous feature. Here is an example :

  await $.getJSON url, defer json
  cb json.results

instead of :

  $.getJSON url, (json) ->
    cb json.results

Iced brings other helpers to deal cleanly with simultaneous asynchronous calls.

Brunch framework is the must have to write browser client side of web applications. It offers all the tools needed to make good developments without dumb constraints. But beware, this great tool is not fully functional yet. I have already written about this subject but things look to progress well.

Mocha is a test framework which attracts me a lot. He has two qualities : he offers a very simple way to deal with asynchronous methods testing and it runs both in the browser and in node.js. Before that I used Jasmine for the browser and Vows for the backend. But Jasmine is only for the browser (or hard to make it works on the backend) and Vows is not easy to use at all. Another good point is that it will be integrated soon to Brunch. So if I should start a project now, I will definitely go for Mocha, even if it is not as mature as the one quoted above.

Ember.js isanother MVC framework for client side. I did not use it but it looks good and more complete than Backbone. It looks more like a true Model View Controller than Backbone. It offers notably better binding between views and models. Unfortunately it is not integrated into Brunch, so if I should start a new application, I won’t use it. But let’s keep an eye on it, it could become quickly the new JS MVC king.

One Response to Latest Javascript and Node.js trends

  1. Pingback: Trenduri în tehnologie web - Javascript & Node.js | WorldIT

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: