WHY ANGULAR?

 

There are many front-end JavaScript frameworks available in the industry today, So why use Angular? Because angular is a more streamlined framework with modern code-base, more capabilities and it is much easier for programmers to learn and work with. Also it has an amazing dev-support.

 

Angular is appealing to the programmers mainly because of its concept of classes, interfaces, generics, annotations, class member variables, private/public variables, helpful compiler, and good support by familiar IDEs which makes it easier to work with Angular.

 

Now let's see what are the benefits of using angular:

Single Page Application-

 

We can create single page applications with Angular. Unlike other applications, where you click on a link and wait for another page to load, an Angular application gives you the experience similar to a desktop or mobile application where it feels like all the application resides on a single page.

 

Inside an angular application, our screen is divided into pieces called components.

Components are further made up of three parts, viz; templates, classes, and metadata. In templates, we define the HTML which gets rendered on a page.
Next are classes which contain properties and methods which are called into the template and then rendered into the page and last is metadata which tells angular that this class and template markup are components. Inside this metadata we give selectors which are custom HTML tags that can be used to tell our angular application where to load which component into the page.

Server-Side Rendering-

 

Angular provides the feature of Server Side Rendering. Most of the web applications out there are Client Side Rendered, that means all the necessary codes are bundled together and shipped to the client browser at once. With this approach, the user has to wait for a long time before all the necessary files are downloaded, which consists of framework code and application code. To resolve these problems, we need to render HTML code on the server when the user makes a request for a page, which is possible with server-side rendering.

 

If you need your pages to be reliably indexed on search engines, server-side rendering may be essential because most search engines do not parse complex JavaScript apps very well. They want plain HTML and that’s what server-side rendering delivers.

 

Implementing server-side rendering is somehow tricky on some front-end frameworks, but not in Angular.

Progressive Web Apps-

 

With angular, we can create progressive web apps. A Progressive Web App (PWA) is a web app that uses modern web capabilities to deliver an app-like experience, it aims to bring native-like experience to users of all platforms and all devices. Or we can say that the progressive web apps are web applications built with technologies that make them behave like native apps.

 

According to the standards, a progressive web app should be Reliable, Fast and Engaging. Which means that they should load instantly even if the network conditions are not so good or if there’s no network at all, should be highly interactive and provide fast user experience. i.e. smooth scrolling and animations etc. and should be engaging so the user gets an immersive experience and stays connected with the app. And we can achieve all these things with Angular.

Build Optimizer-

 

A build optimizer is a tool which is included in the ng CLI. It makes your bundles smaller using the semantic understanding of your Angular application.

 

Basically, it keeps those parts of your application which are needed and mark these as pure. This improves the tree shaking process that is provided by the existing tools that finally lets you remove the additional or extra part of the application from the build.

 

The second thing the build optimizer does, is to remove Angular decorators from your application’s run-time code. Decorators are used by the compiler, and aren’t needed at run-time and therefore, should be removed. Finally, all of these things lets you decrease the size of your JavaScript bundles, thereby letting you boot your application faster.

Speed and Performance-

 

In Angular, we use typescript, a super-set of javascript ,which is highly optimized making the app to load faster. The AOT(ahead-of-time) compiler which is used in angular is faster. Basically, the AOT compiler converts Angular TypeScript into efficient JavaScript code before the browser downloads and runs it. Using AOT gives faster rendering, fewer asynchronous requests, smaller download sizes, and it can also detect template errors earlier. This makes Angular faster in both development and production.

Cross Platform-

 

Progressive Web Apps: Angular uses modern web platform capabilities to deliver app-like experiences. High performance, offline, and zero-step installation.

 

Native: Build native mobile apps with strategies from Cordova, Ionic, or NativeScript.

 

Desktop: Create desktop-installed apps across Mac, Windows, and Linux using the same Angular methods you've learned for the web plus the ability to access native OS APIs.

Productivity–

 

Templates: Quickly create UI views with simple and powerful template syntax.

 

Angular CLI: Command line tools: start building fast, add components and tests, then instantly deploy.

 

IDEs: Get intelligent code completion, instant errors, and other feedback in popular editors and IDEs.

Full Development Story –

 

Testing: With Karma for unit tests, you can know if you've broken things every time you save. And Protractor makes your scenario tests run faster and in a stable manner.

 

Animation: Create high-performance, complex choreographies and animation timelines with very little code through Angular’s intuitive API.

 

Accessibility: Create accessible applications with ARIA-enabled components, developer guides, and built-in a11y test infrastructure.

 

 

These are only some of the core benefits of using Angular. There is much more to explore and with the upcoming versions of Angular, we might see many more features integrated with it, making it all the more powerful.