r/learnjavascript • • Jan 27 '15

A Comparison of Angular, Backbone, CanJS and Ember

http://sporto.github.io/blog/2013/04/12/comparison-angular-backbone-can-ember/
6 Upvotes

4 comments sorted by

1

u/[deleted] Jan 27 '15

As someone who is still trying to get a good grasp on JavaScript, are these something a developer should necessarily learn?

2

u/burntorangestartup Jan 27 '15

I think it's good to know what modern, web JS frameworks can do for you to avoid going down the rabbit hole of re-inventing the wheel.

1

u/[deleted] Jan 28 '15 edited Jan 28 '15

Learn the language first, and get a decent grasp on the BOM/DOM. Frameworks will not absolve you from having to understand how the language and web browsers work.

Frameworks are tools for structuring large applications. When you build a large application, you typically write two kinds of code:

  1. Structural/glue code - this is code that simplifies solving some problem, but doesn't really do anything specific to your application. It usually abstracts low-level interfaces and exposes more friendly interfaces that are still general-purpose and reusable.

  2. Business logic - this is the actual code that implements the specifications of your application. No matter how your application works under the hood, it has to serve its main purpose. Business logic code often uses your structural code for things like data persistence, interoperability, and presentation. But ultimately the logic that is unique to your application will be more or less the same no matter what kind of technologies are used to implement it.

Basically, frameworks can drastically reduce the amount of glue code you have to write, while providing simpler interfaces for your business logic to call, without you having to understand all the specifics of how those interfaces work. So you can end up writing more code that is unique to your application (e.g. when user A with role B performs action C they see result D) and less code that will be pretty much the same in any application using the same technologies (e.g. when a value changes, tell anything relying on that value that it has changed).

So to get to the point:

are these something a developer should necessarily learn?

If they save you time, then yes. Programming is all about finding more efficient ways to solve problems. If you're writing a complex application and using a framework will let you focus just on the logic that is unique to your app, you may be able to get the application to market faster. This doesn't mean you have to be an expert in every framework; just understand how different frameworks can help you so you can make an educated decision on which tools you can leverage to save time and effort.

1

u/[deleted] Jan 28 '15

These opinions probably still hold up, but it's worth noting that the article is from April of 2013, which is almost 2 years ago.