Skip to main content

What’s the difference between AngularJS, Angular2 and Angular4?

One question that often comes out is “What is the basic difference between AngularJS, Angular 2 and Angular 4 and how to jump from Angular 2 to Angular 4?”



Angular JS was introduced in 2010 as a JavaScript framework for building client side single page web applications. So it gained popularity and the Angular team at google started to add some more features to the core. But the framework was not designed with the needs of today’s applications in mind and moreover it was totally complex. So the Angular team decided to rewrite the entire framework using TYPESCRIPT and as a result Angular 2 was released in mid 2016. The new Angular framework is completely different from the previous version and we can think of it as a completely different framework compared to the earlier one.


The decision was frustrating to most of the developers since a lot of applications have been designed using AngularJS. I personally liked the direction that Angular developers took in rewriting the entire framework according to the needs of modern software development. It is lot cleaner and much easier to understand and to work with.


 After a few minor upgrades to Angular 2, something strange happened. It went out to Angular 2.3 and suddenly Angular 4 came out. Lot of developers including myself were confused so as to what happened to Angular 3.We thought we had missed something big here. 

                                 

But there were no major changes included from Angular 2 to Angular 4.Infact it wasn’t even a major upgrade. So let me explain what happened!

Angular consists of a few different libraries that are distributed as separate node packages via NPM (Node Package Manager).For example, we have the CORE library (@angular/core) that is used in every Angular application. We have the COMPILER library (@angular/compiler), HTTP library (@angular/http) which is used to make http requests and the ROUTER library (@angular/router) which is used to add navigation to our application and a few other libraries. All these libraries were versioned the same except the ROUTER library (which is 3.3.0). So inorder to align these versions and avoid confusion in the future, angular team has decided to go directly to Angular 4.Angular 4 is not a major upgrade to Angular 2 and we can think of it as Angular 2.4.


After all this confusion about the Angular versions, the team decided to drop the version suffix and simply call the framework “ANGULAR”. So now we have two kinds of Angular.
·       AngularJS (1.x)
·       Angular (2+)

So it is recommended to use the word “Angular” rather than “Angular 2” or “Angular 4”.We should use versions only when we talk about a specific release. For example, when we want to upgrade from Angular 4 to Angular 5.Then everybody knows what the scope of this upgrade is and what are the potential upgrade changes that can impact an application.
This is all about Angular Version History.

Thanks for reading!

Comments

Popular posts from this blog

ANGULAR-2

Angular JS is an open source framework built on JavaScript. It was built by the
developers at Google. This framework was used to overcome obstacles encountered while
working with Single Page applications. Also, testing was considered as a key aspect while
building the framework. It was ensured that the framework could be easily tested. The
initial release of the framework was in October 2010.

Features of Angular 2:Components: The earlier version of Angular had a focus of Controllers but now has changed the focus to having components over controllers. Components help to
build the applications into many modules. This helps in better maintaining the
application over a period of time.

TypeScript: The newer version of Angular is based on TypeScript. This is a
superset of JavaScript and is maintained by Microsoft.

Services: Services are a set of code that can be shared by different components
of an application. So for example, if you had a data component that picked data
from a database, you …

Efficiency of an algorithm

Efficiency of an algorithm
Programmers find a tough time writing efficient code. But what exactly do we mean by efficiency? What difference does it make if we write normal code instead of an efficient code? Let’s find out with a simple example of traditional sorting problem.


The first, known as insertion sort, takes time roughly equal to c1*n2 to sort n items, where c1 is a constant that does not depend on n. That is, it takes time roughly proportional to n2. The second, merge sort, takes time roughly equal to c2*n lg n, where lg n stands for log2 n and c2 is another constant that also does not depend on n. Insertion sort usually has a smaller constant factor than merge sort, so that c1 < c2. We shall see that the constant factors can be far less significant in the running time than the dependence on the input size n.


    Where merge sort has a factor of lg n in its running time, insertion sort has a factor of n, which is much larger. Although insertion sort is usually faster than mer…

What is context in android ?

The topic of Context in Android seems to be confusing too many. People just know that Context is needed quite often to do basic things in Android. People sometimes panic because they try to do perform some operation that requires the Context and they don’t know how to “get” the right Context. I’m going to try to demystify the idea of Context in Android. A full treatment of the issue is beyond the scope of this post, but I’ll try to give a general overview so that you have a sense of what Context is and how to use it.
What exactly is Context?


Well, the documentation itself provides a rather straightforward explanation: The Context class is an “Interface to global information about an application environment". The Context class itself is declared as abstract class, whose implementation is provided by the Android OS. The documentation further provides that Context “…allows access to application-specific resources and classes, as well as up-calls for application-level operations such as…