domingo, 24 de agosto de 2014

Why Backbone and not Angular, Ember, ExtJS etc

There's a lot of discussion, many of then passionate, about what JavaScript framework/library to use for client side web development. In the end it boils down to "the developer must choose the tool that better adapt to its needs and/or programming style".

Here i'll share my thoughts on some of the frameworks i looked (after read a lot about them) and why i discarded them (at least for now) in favor of Backbone.

ExtJS


Influenced by ExtPascal, this was one of the first frameworks i evaluated. While was clear that ExtPascal had no future i still considered as an option to use in my projects. The possibility to create user interfaces with only JavaScript (similar of what can be done with Lazarus / Delphi) is an advantage. Also the Sencha Architect would make the gap to traditional RAD tools really narrow.

On the other hand ExtJS departs from the HTML / CSS approach used most commonly in the web. The side effect is that the effort spent learning ExtJS would not be translated to the other web technology. Not good for someone eager to learn and embrace the web as is.

Besides the above dilemma, what kept me away from ExtJS was the price. I am disposed to spend some money (already bought some books and a license of WebStorm) but one thousand dollars for the license plus Sencha Architect is a bit too much for a hobbyist developer like me.

SproutCore


In it's early days, i followed SproutCore closely. In fact, due to share most of desktop concepts, was my favorite. However the project lost traction after the switch to a HTML-aware approach which later become Ember. Today seems a niche framework.

YUI


The framework created, baked and used by Yahoo offers lot of well structured components and widgets with comprehensive documentation. A lot of engineering effort was put in it resulting in a solid foundation for almost any development needs, from a simple web page enhancement to a full application. It's also free.

With all these goods, why not YUI?

1) The code is more verbose when compared to, e.g, jQuery.

2) To accommodate the wide range of features the components has a lengthy API. The good documentation mitigates the problem but still is a hindrance to newcomers.

3) The MVC components, which is my main interest, were added as an afterthought and is not integrated with further components / widgets.

Ember


The clear design that practically enforces the developer to follow an strict architecture and the abstraction of DOM handling are the main benefits of Ember. These are also why i did not choose it. I want to learn raw HTML / CSS development with its flexibility and pitfalls. Ember abstracts much of the work to, among other features, keep model and DOM in sync. Things occurs magically.

If i was looking to a tool to create scalable web applications and be productive, Ember surely would be on top of my list.

Angular


I almost jumped into the Angular boat. I even bought a book! The easy way to create functionality really impresses. But it stumbled in the same problem as Ember. I would be learning Angular, not HTML / CSS. Also it did not helped the fact that I would need to wait someone to port or create adapters for new releases of popular libraries like Bootstrap or jQuery Mobile.

The features planned to Angular 2.0 addresses most of its shortcomings making a good bet for the future.

Backbone


As said early, the winner. To be clear: MY winner, NOW. It's simplicity, easy to grasp what is doing and flexibility is what I need now. Even letting the DOM manipulation up to the developer, appointed by many as a source of problems, is a positive point for me. Also it allows to adapt much of the architecture that I already use in desktop programming.

Nenhum comentário:

Postar um comentário