Angular Is a Good Choice for Enterprise Web App Development

Created: 05/22/2017
by: Roberto De Simone

Enterprises need reliable tools to easily develop and maintain small and large scale web applications with modern technologies. As it is well known to all web developers, the JavaScript ecosystem is a little bit a mess. New tools and frameworks are showing up nearly daily. As fast as they show up, they are also disappearing. Nevertheless, Angular seems to be a framework enterprises may rely on.

Angular logo with different devices in the background

Numerous enterprise apps must be replaced or have to be newly built

Enterprises are generally facing two challenges for software development:

  1. The need to digitise processes in order to keep track with the digital disruption. This requires new kinds of applications. Users are expecting web apps which have similar user experiences as apps from technical leaders. Mostly these are large scale apps which involve quite big development teams.

  2. Numerous of barely maintainable internal applications are around which have to be replaced with modern technology.

Angular component architecture and TypeScript lead to maintainable code

So what characterizes Angular for enterprise development?

Angular apps are built with a component model. Functionality is split into multiple small components with clear separation. This allows easy testing and co-working in big teams.

Angular apps will typically be built with TypeScript, like Angular itself is built with (even though this can also happen with ES6 or Dart). This object oriented approach makes the code better readable and well maintainable.

Note: There are various discussions in the JavaScript community about the pros and cons of typed JavaScript. Apart from the obvious, that an object oriented approach with type checking allows much better error checking already at development time, TypeScript in conjunction with Angular leads to a much better editor support. IDEs like Webstorm or Visual Studio Code provide code completion and code snippets, which make programming more intuitive, and they provide refactoring, which simplifies code organisation.

Angular apps are fast with Ahead of Time compilation

With the introduction of Ahead of Time Compilation (AOT) and tree shaking, the app package size got significantly smaller compared to Just in Time Compilation (JIT), and so app loading time got fast. AOT does not need anymore to include a compiler in the code as JIT requires. Tree shaking additionally removes not needed code. With lazy loading of modules loading, time can be improved even more.

Also app speed improved with AOT. As the name implies, the code is compiled at building time and not at execution time as JIT does. Since Angular 4, AOT is the recommended way to build apps - instead of JIT.

Even though the Angular team reached already significant performance improvements, further optimizations are continuously going on in order to reach faster app starts especially for mobile devices and Progressive Web Apps (PWA).

Angular CLI makes scaffolding and building a no-brainer

The Angular CLI provides to developers an easy tool for scaffolding modules, components, services, directives, pipes, classes,… But maybe more interesting is the ability to automatically build the app package out of the numerous JavaScript files. Times are gone one had to figure out webpack configurations (with the ng eject command the webpack configuration still can be modified). The ng build command allows the building of the app package without any need for configuration. With the help of parameters it is possible to distinguish between production build and test build. Of course it is also possible to build custom targets.

It is not a surprise that the Angular CLI is the recommended approach to develop Angular apps!

Angular Universal makes apps SEO (Search Engine Optimization) friendly and increases loading time

A little bit less known is Angular Universal which allows Server Side Rendering (SSR) of Angular Apps. SSR is interesting because as the name implies, the page will be built on the server, and the browser receives a ready page. This increases again app loading time and it allows web crawlers to analyse the site - it is SEO friendly. As an additional benefit, the source code is hidden on the server - a requirement for sensitive websites.

At the moment, Angular Universal apps can be built in conjunction with Node.js and ASP.NET.

Internal Google apps are developed with Angular

Last but not least it is to emphasize that also Google relies heavily on Angular to develop apps for its own use. The most prominent example maybe is Google AdWords. This is not a guarantee that we will see Angular exist also in the long term, but it is something an enterprise can rely on for decision taking.

Conclusion

Often Angular is called the new Java for enterprises. Yes, there might be some truth in it, as Java is widely spread in enterprises and Java developers seem to welcome TypeScript due to its object oriented approach.

Angular is also welcomed in Microsoft shops because TypeScript is a Microsoft product, and it shares with Anders Hejlsberg the same inventor as C# does.

On the bottom line, Angular and its ecosystem provide all necessary tools to address enterprise requirements to build successful scalable web apps.