DEV Community

Discussion on: Front End Javascript, Angular, React, etc, what and where to start with?

Collapse
 
niharmore33 profile image
nihar

First - a distinction: Angular is a Framework, React is a library.

Frameworks and libraries are useful because they help you built sites faster. While a "traditionally" built sites can be built fast enough, there are always libraries, utilities, helpers making this faster. Framework is just a level up on a library.

Example: you can develop a site to support all browsers (desktop, mobile), operating systems (Windows, OS X, iOS, Linux, Android etc) without jQuery or any CSS reset or grid or helpers. People do that and there are sometimes very good reasons to do it like this.
Learn all the above languages here: hackr.io/

But it would take a lot of effort to make sure everything worked on all browsers. From, ie. how you need to attach event listeners, and how to handle them, to creating Ajax requests, doing a lot of things. The same with CSS resets, grid systems etc - if you don't use libraries, you have to take care of all the vendor prefixes and similar.

Now, let's say you use jQuery - now your JavaScript stuff takes a whole lot less effort - because you'd do ajax with jQuery, and jQuery will take care of the underlying platform.
So - you can create your site faster, and with more confidence that you didn't forget something peculiar.

React is a library that helps you make reusable views. You can create components - let's say a simple login form - and reuse it accross projects. With it, you don't have to repeat it every time.

Similarly, you can create an Angular or Polymer component.

So, when developing a new site, you add a and you're done - and you know it's working in all browsers and all OS-es.

Another thing you get is testability. You can write tests for your components, and be certain that your site is built as you intended it to be built.

Finally, the frameworks like this make it a lot easier to detach yourself from the backend perspective. You just know there's some sort of backend service that'll feed you JSON for your sites, but you don't care about it.

If you do your sites without libraries and utilities, you would have to build your own components to communicate with the backend each time you start a new site or add a new resource.