DEV Community

Siddharth
Siddharth

Posted on

Angular: Pros and Cons

Angular, maintained by Google and one of the most powerful web development frameworks out there, is a pretty good choice for web development. To help you decide whether Angular is good for you, here's a list of Angular pros and cons.

Note: We are talking about Angular (2-12), NOT Angular.js.

TL;DR

Scroll to the end of the post for a summary if you don't want to read the whole thing.

Pros

  1. Angular sites are Single Page Applications (SPA). SPAs allow us to load new pages without requesting the server, giving a more dynamic and interactive experience. For example, GMail is a SPA.
  2. Angular is feature-packed. State? Baked in. Reactivity? Baked in. Routing? Baked in. DI? Baked in. Services? Baked in.
  3. Angular is cross-platform.
    • PWAs: Use 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.
  4. Angular **optimizes your templates into code that's highly optimized for today's JavaScript virtual machines, giving you all the benefits of hand-written code with the productivity of a framework.
  5. Angular has automatic code-splitting so users only load code required to render the view they request.
  6. Angular uses TypeScript, which provides better tooling, cleaner code, and higher scalability.
  7. Angular is productive. It provides all the tools you need to scaffold apps and components. Angular provides a handy CLI which can generate production-ready apps and components with a single command.
  8. Angular's MVC Architecture makes it easy to separate styles from logic from markup.
  9. Angular has a flexible templating system which supports 1 or 2-way binding, pipes, custom structural directives, and more.
  10. Angular has built-in support for Services and Dependency Injection (DI). This further separates the business logic from your components, which provides cleaner code.
  11. Angular sets up testing frameworks automatically. With Karma for unit tests, you can know if you've broken things every time you save.
  12. Angular has a built-in animation API for high-performance, complex choreographies and animation timelines with very little code.
  13. Pre-render Angular with Angular Universal and serve the first view of your application on Node.js, .NET, PHP, and other servers for near-instant rendering in just HTML and CSS. Also paves the way for sites that optimize for SEO.

Cons

  1. Angular is a SPA, so it has limited SEO capabilities. But, you can prerender Angular using Angular Universal.
  2. Angular has a steep learning curve, But it's worth the effort, as Angular is super powerful.
  3. Angular is complex and verbose, so it's not really suitable for small apps. It's designed for complex systems.
  4. Angular has a (kind of) low ranking on some developer surveys. On The State of JavaScript, Angular has high negative opinions. On the Stack Overflow developer survey, Angular is the ninth most loved developer framework, behind React and Vue, which are at 2nd and 3rd place. Angular is the 8th most dreaded web framework, and it's the third most wanted web framework.

Summary

13 pros β€’ 4 cons

Angular is a powerful framework if you are willing to spend time and effort learning it. It has all sorts of features like DI, Services, Components, and more, but its SPA nature makes it bad at SEO. It's also not the most popular framework, owing to its steep learning curve. It's also highly focused on scalability.

Use Angular if you are building large, complex applications that should be scalable and modular.

Don't use Angular smaller apps which don't need all the complexity Angular provides. Don't use them for static sites, because of the accessibility problems and over complexity.

Top comments (8)

Collapse
 
reinoute profile image
Reinout

Not sure why you're commenting this, because the author didn't say most of these things in the article.

Actually, I think the conclusion is pretty accurate without going into "opinions" too much. Information like this should be on the front page of each library or framework, and we would have less unnecessary framework "wars".

Collapse
 
leob profile image
leob

I like it that the author is honest not just about the pros, but also about the cons of Angular - brutally honest even, with clear advice on when to use it and when not to use it. So many articles are written as advertisements for the author's favorite tool or framework, this article is not one of them.

Collapse
 
siddharthshyniben profile image
Siddharth

Thanks!

Collapse
 
waterstraal profile image
Mike Markus • Edited

The State of JavaScript has grouped AngularJS and Angular together, which explains the negativity. It's like grouping React and Ember together; it makes no sense, they are different frameworks πŸ€·β€β™‚οΈ

Collapse
 
layzee profile image
Lars Gyrup Brink Nielsen

Not in the most recent one.

Collapse
 
siddharthshyniben profile image
Siddharth

Makes sense! In the Stack Overflow survey, they were separated, and Angular.js had a really low ranking.

Collapse
 
talr98 profile image
Tal Rofe

Angular2 is more of MVVM other than MVC in my opinion.

The 2 biggest pros for me is the singleton design pattern in Angular2 (Services Injection) and the MVVM arc. Of-course these 2 could be applied also with react for example - but these 2 come built in

 
siddharthshyniben profile image
Siddharth • Edited

I wrote this list mainly from a Vanilla JavaScript Developer point of view, maybe that's why it seems biased.