Introduction to Angular

Introduction to Angular 2 (or any higher version) Framework

In this article, I am going to give a brief introduction to Angular Framework. At the end of this article, you will understand the following pointers in detail.

  1. What is Angular?
  2. Why we need Angular?
  3. What is ECMAScript?
  4. What is Typescript?
  5. Different Between AngularJS and Angular

But before understanding Angular, lets first have a look at the earlier version of Angular which is popularly known as AngularJS.

The AngularJS was released in the year 2010. Then it becomes one of the most popular frameworks for developers to develop single-page applications (SPA).  Now you may have one question in your mind i.e. already AngularJS becomes one of the most popular Frameworks for the developers and already so many applications are developed using this AngularJS then why Angular2 or any higher versions come into the market or why we should use Angular2.

Why do we need Angular?

Let us first discuss why we should use Angular 2 (or any higher versions) or the advantages of using Angular 2 (or any higher versions) to develop web applications.

Angular 2 (or any higher version) is a new but a great framework that will provide us with a great deal of flexibility and power to develop web applications. The most important point that you need to remember is it is completely rewritten from the ground. That means it is not an up-gradation from AngularJS. It is completely rewritten from the ground. It provides lots of new features as well as lots of improvements when compared with the AngularJS.

The Features and improvements provided by Angular are as follows:

Performance Improvements in Angular Application: 

The Angular 2 (or higher versions) Framework is five times faster than the Angular JS Framework. The reason for this is, it has faster initial loading, improved a lot on rendering time and provides a great deal of change detection. Angular 2 not only just improve the performance, but it also has improved the Dependency injection mechanism, modularity, and also provides great testability to test the Angular applications. If you are confused at the moment, then don’t worry, we will discuss all these features in greater detail in our upcoming articles. 

Component-Based Development in Angular Application: 

The most important point that you need to keep in mind is that in Angular application everything is a component. That means the components are the basic building blocks of an Angular application. The most important advantage of this component-based development approach is that it provides support for code reusability. That means you can reuse the same component in multiple places. This Component-based development approach also provides great support for unit testing the Angular application.

Angular Provides Mobile Support: 

The earlier versions i.e. AngularJS did not provide built-in support for mobile devices compatibility. That does not mean AngularJS applications are not run on mobile devices. It is possible to run AngularJS applications on mobile devices but to do this we need to use other frameworks along with AngularJS Framework. To keep this in mind, the Angular 2 (higher versions) framework is built from the ground to support mobile device compatibility by default. So if you develop an application using Angular 2 (or any higher versions like 4, 5, 6, 7, 8, 9) framework, then that application can run on both desktops as well as mobile devices.

Angular 2 Support Multiple Languages:

The Angular Framework supports several languages for building Angular applications. Some of the popular languages are as follows

  1. ECMAScript 5
  2. ECMAScript 6
  3. TypeScript
  4. PureScript
  5. Dart
  6. Elm

Note: Among the all available languages, in this course, we are going to use the TypeScript as the language to develop Angular applications. 

I hope now, you understood the advantages of using Angular Framework to develop applications. So, let us move forward and try to understand the official definition or Angular.

What is Angular?

Official Definition, Angular is a platform that makes it easy to build applications with the web. Angular combines declarative templates, dependency injection, end to end tooling, and integrated best practices to solve development challenges. Angular empowers developers to build applications that live on the web, mobile, or desktop.

Now let us simplify the above definition. It says that Angular an open-source front-end development platform developed by Google as well as a framework that we used to build Mobile and Desktop web applications using HTML and TypeScript.

The Angular framework is written using the TypeScript language. It implements the core and optional functionality as a set of TypeScript libraries that we need to import into our applications in order to develop angular applications.

As we discussed Angular Framework is built using the TypeScript language. So let us understand the following two key points.

Introduction to Angular Framework

What is ECMAScript?

The ECMAScript specification is a standardized specification of a scripting language developed by Brendan Eich of Netscape; initially, it was named Mocha, later LiveScript, and finally JavaScript. There are many versions of the ECMAScript which were released starting from the ECMAScript version 1 up to ECMAScript version 9. 

What is TypeScript?

The language TypeScript is open-source and it is developed and maintained by Microsoft. The TypeScript language provides several benefits are as follows while developing angular applications

  1. Intelligence support while writing code
  2. Auto-completion Facility
  3. Code navigation
  4. Strong Typing
  5. It also supports features like classes, interfaces, and inheritance as like our traditional programming languages such as C#, Java or C#.

Because of the above benefits, most of the developer’s first choice language is the TypeScript for building Angular 2 applications.

Difference between AngularJS and Angular:

Let us see the differences between AngularJS and the new Angular Framework.

  1. AngularJS was released in the year 2010 by Google.
  2. AngularJS is based on the JavaScript framework and used for creating Single Page Applications (SPA).
  3. It is still supported but no longer updated.
  4. The AngularJS architecture is based on the Model View Controller (MVC) Pattern.
  5. By default, AngularJS applications are not mobile-friendly.
  6. You can use ES5, ES6, and Dart languages to write AngularJS code.
  7. Factory, provider, service, constant and value are used for services.
  8. The AngularJS code runs only on the client-side.
Angular 2 or Any Higher Versions:
  1. The Angular2 Framework first released in Sept 2016 by Google.
  2. It is completely re-write from the AngularJS version.
  3. It updated the version regularly because of Semantic Versioning.
  4. The Angular 2 architecture is based on components.
  5. By default, Angular 2 applications are mobile-friendly.
  6. You can use ES5, ES6, TypeScript to write an Angular 2 code.
  7. In the Angular2 Framework, the class is the only place to define services.
  8. The Angular2 code can run on both client-side as well as server-side.

In our next article, I am going to discuss the Angular Versions and Versioning in detail. Here, in this article, I try to give a brief introduction to Angular Framework. I hope this article will help you with your needs. I would like to have your feedback. Please post your feedback, question, or comments about this article.

1 thought on “Introduction to Angular”

Leave a Reply

Your email address will not be published. Required fields are marked *