We have been working on some cool process automation products from last few months, as a nature we dig deep before we decide upon our tech-stack. While there are multiple frameworks which could have done the job, we went for Angular. Here is some thoughts on what went behind making this decision.
Angular is the third most used web framework by professionals and others in 2020, according to Stack Overflow Survey. Angular is gaining popularity and is used by the big companies out there. Why? Why is Angular so popular? Why is it used by many big companies? Let’s know everything about Angular.
What is Angular?
Angular is a TypeScript based open-source front-end web framework. Angular is developed and maintained by the Angular Team at Google and by a community of individuals and corporations. Angular is written in TypeScript. The latest version of Angular is 10(at the time of writing).
What is TypeScript?
Is Angular and AngularJS the same?
There’s often a misconception that Angular is the next version of AngularJS. Also, many use it interchangeably. Angular and AngularJS are completely different. Angular is a complete rewrite of AngularJS from the same team.
Angular is developed to address many of the challenges encountered in developing the SPA’s (Single Page Applications) and is used by many big companies and many professionals.
Why Angular is gaining popularity? What is so special about Angular?
Angular provides its users with many “out-of-the-box” features. Some of the “out-of-the-box” features of Angular are,
- Develop across all platforms (web, mobile, native mobile, native desktop). For mobile application development, there’s a framework called NativeScript.
- Detailed Documentation where developers can find all the necessary information.
- Simplified MVC (Model-View-Controller) pattern, which is the reason why it is easy to maintain even a large application.
- Reusability of components. New Default browser configuration(in v10).
- XSS (Cross-Site Scripting) Protection. Dependency Injection.
- AJAX Required libraries. Routing libraries.
- Utilities for unit testing. Forms and form Validations.
- Long term supported by Google
- Speed and Performance. Speed and Performance were an issue in older versions of Angular, after the release of the last 3 versions of Angular, Speed and Performance issues has reduced to a great extent. It is because of the Ivy compiler introduced in v8 and the complete feature is released in v9.
What is Ivy?
Ivy is the codename for Angular’s next-generation compilation and rendering pipeline. From the Angular v9, the new compiler (Ivy) and runtime instructions are used by default, instead of the older compiler and runtime known as View Engine.
As I said earlier, Ivy was introduced in v8 but it is not the default compiler for the version, if needed we can manually set Ivy as the compiler in v8. The significant point here is that we don’t have to change how we write our applications. Ivy is compatible with the existing applications, but Ivy doesn’t have the same behavior in some cases. So, to not break the applications when we switch to Ivy, Angular has migration scripts to prepare it for Ivy if necessary.
A big part of Angular is its compiler.
Advantages of Ivy
- Reach better build times and better build sizes.
- Unlock new potential features like lazy loading of components instead of modules etc.
- Backward compatibility and many more
As we know, Angular has changed its default compiler from View Engine to Ivy in v9. The code generated by Ivy is very different from the code generated by View Engine. So, code generated by View Engine cannot be consumed by Ivy, which is a huge problem because most of the libraries and components of Angular are generated using the View Engine. We need to make these compatible. But, how? With the help of ngcc. No, you need not do anything. Ngcc makes View Engine code compatible with the Ivy.
What is ngcc and its working?
The post-install script will run on every installation of node_modules.
Operations done by ngcc
- Scan the node_modules for packages by checking metadata.json files.
- Produce an Ivy compatible version for each of these packages.
Angular CLI automatically runs the ngcc for us, there’s an option to run ngcc manually too.
This all happens when we run ng serve or ng build for the first time which is the reason why it takes longer than usual for the first time we run ng serve or ng build, as ngcc will do all this magic behind the scenes for us. This doesn’t happen every time we run the application, happens again only when a new Angular library is added to the application.
Real-world applications developed in Angular
Many big companies like Apple, Microsoft, Forbes, HBO, Adobe, Nike, McDonald’s, Sony, AT&T, Google, BMW, and many use Angular. There are also many popular and daily used applications developed using Angular. Some of them are,
- Microsoft Office Home(web)
- Youtube TV
- BMW Driveaway price calculator
- Samsung Forward and many more.
Angular has many rivals but the biggest rival is React. React is becoming one of the most popular frameworks nowadays. Angular has even lost to React in Stack Overflow Survey, 2020.
Angular vs React
React on the other hand is a library that provides only “View” in MVC, we need to choose libraries that best fits our requirements(advantage). With this, we end using many independent and fast-moving libraries and it becomes our responsibility to take care of the updates, migration, maintaining the folder hierarchy and architecture. Things can go wrong more easily due to this which is a disadvantage.
React is powerful and popular because of its speed and performance. But, Angular with its latest release is no less than React, Speed and performance from Angular v8 has increased to a great extent. In the future, Angular will definitely come with many groundbreaking features.
This is all about Angular, why we need to use, some real-world projects built on Angular, and it’s internal working. Hope you like it.
Feel free to reach-out to us at firstname.lastname@example.org for any query.
Share the article
Kormoan is top-rated app development company
Over 6 years of work we’ve helped over 150 companies to build successful mobile and web apps. We offer all the necessary expertise to bring your bold idea to the market.
To Reach Us Call/Whatsapp: +91 9560186963 or Email: email@example.com