DEV Community

Cover image for Should You Use Angular In 2022

Should You Use Angular In 2022

Kinanee Samson on July 20, 2022

Angular is a super heroic JavaScript framework for building frontend Web Applications, Angular was created and released by Google in September of 2...
Collapse
 
lorenzojkrl profile image
Lorenzo Zarantonello

Angular dev here!
I moved from React to Angular and the learning curve is way steeper, as you mentioned.

The tutorial for beginners is not great either. I was so fed up that I started to write one of my own: vitainbeta.org/2022/07/21/angular-...

On the good side, once you are into Angular you don’t need to think about which library to use for most use cases. This can be a cons as well, of course.

In big organisations, standardisation matters. Angular has an opinionated folder structure, way of doing http requests etc. I can start to work on other apps without thinking about the structure.

Just to answer your question: it depends:)

Collapse
 
kalashin1 profile image
Kinanee Samson

Some things should really be simple and straight forward, especially for beginners.

Collapse
 
lorenzojkrl profile image
Lorenzo Zarantonello

What do you think about the material in the link I posted? Does it seem simple?

Thread Thread
 
lamquocminhhuy profile image
Lam Quoc Minh Huy

I'll follow your tutorial to build a small app. I'm very new with Angular but I have some experience with NestJs (the project structure 90% same as Angular).

Thread Thread
 
lorenzojkrl profile image
Lorenzo Zarantonello

Cool! Let me know if some parts aren’t clear:)
How did you learn NestJS? Any good resource you’d like to recommend?

Thread Thread
 
lamquocminhhuy profile image
Lam Quoc Minh Huy

I've learned NestJs with this tutorials: wanago.io/2020/05/11/nestjs-api-co.... You can have a look at this link, it's very details about NestJs.

Thread Thread
 
lorenzojkrl profile image
Lorenzo Zarantonello

Interesting! It seems well done. Thanks for sharing:)

Collapse
 
snlacks profile image
Steven Lacks • Edited

I went the other way, I was doing Angular and switched to React. Career-wise there were a lot more opportunities where I was with React at the time (and still today). I don't think one is better than the other, but I feel like React as a library isn't enough for most projects, enterprise or not. Instead of adopting a React based frame work every project devolves into a mish mash of random decisions with some major flaw, like performance, pipeline issues, etc. I like React better, but 5 years after switching, I think I would recommend Angular over React because of the opinionated nature; except that the cult of functional programming and anti-Angular is very strong in a lot of development houses.

Collapse
 
lorenzojkrl profile image
Lorenzo Zarantonello

Very informative answer! Thanks for your comment!

Collapse
 
flamesoff profile image
Artem

I feel like building an application is not really straight forward with Angular, there are so many unnecessary things you need to account for when you want to build an application with Angular, I think that the framework gets in your way and that it doesn't just allow you to go straight forward to building your application.

Complete bullshit.
Unlike React, Vue and some others - Angular really follows rules. In Angular logical layers are coming OOTB. In Angular it's very difficult to write shitty, unmaintainable spaghetty code, like you can do in React.
Angular requires from developers to have some knowledge of software architecture, and in its turn provides an excellent organization of this structure: modules, components, services, pipes, routes, etc. Everything on it's place and works like a fine-tuned mechanism.
If you have problems with Angular - it problem in your hands, not it the framework.

Collapse
 
kalashin1 profile image
Kinanee Samson

The amount of energy you put into constructing this comment is the amount of energy I summon up whenever I want to work on an Angular code base.

And if you need angular to write clean code then you need to learn about project architrcture.

Collapse
 
flamesoff profile image
Artem • Edited

Yes. And this is the problem: I met only couple of people in my entire career who had decent knowledge of software architecture from those dozens of FE developers I worked with.

So answering to your statements:

And if you need angular to write clean code then you need to learn about project architrcture.

and

is the amount of energy I summon up whenever I want to work on an Angular code base.

At first, these statements conflict with each other.
At second, probably, you simply have not enough software architecture knowledge if you really have problems working with Angular code base, because anular usualy makes work on architectural solutions WAY easier than any other framework.
Also, considering the information in your profile - you do not have a major education in information technology, so to argue that one framework or another is not needed to support the correct application architecture is at least incompetent on your part. To comply with and maintain a scalable application architecture, you either have to be a very experienced developer or be educated in the subject.
This is not the kind of thing you can be taught by videos from YouTube.
This is why such frameworks were created by more experienced engineers (than you and I) to prevent their peers from making repeated architectural mistakes.

Otherwise there wouldn't be so many projects with shitty legacy code, where developers like me would be called with a request "we're willing to pay you XXX.XXX$ a year, just clean up our code.

So answer to the question of this topic is still: Yes. You may use Angular in 2022 (and later) for mid-large projects, and you will not regret it.

Thread Thread
 
kalashin1 profile image
Kinanee Samson

The fact that you highlighted my educational background and experience to prove your point.

I have built projects with angular and react, so for what's worth angular is a great way to build an application, however I don't agree with the strictness in application architecture imposed by angular. If I was not knowledgeable in the matter as you said I'd stuck to what works but experience is the best teacher and there are other ways of doing things. What I'm really worried about is toxic people like you that don't argue from their experience and skill. The fact that I didn't major in IT while in school should make you put more respect on my name and what I ship out there.

Collapse
 
gktim profile image
gkTim

Angular is very opinionated about how it does things. This can be a pro for very big teams or teams where the members changes frequently. Also it is good for very big projects.

I develop angular and vue apps.
And with vue 3 I must say I now prefer vue over angular.

Vue has a very good documentation.
The angular documentation mostly didn’t help IMO and you need to find an SO post or a tutorial.

Also vue is much faster in compile time and faster in runtime.
Also vue (or react) are more straight forward when implementing things. In Angular you often need to write mich more code. For example Value Accessor Pattern needs a lot of stuff.

But one of the most annoying things in angular is, that they often didn’t use the community best practices for things and invent there own way of doing things.
So a lot of cool things like vite, most monorepo tools etc. are not compatible with it or it takes some work to get it working.

In vue (or react) the things just run.

So for 95% of the projects I would prefer vue.

But one thing I love in angular are the reactive forms.

But as always. Everyone should work in a few frameworks and see which fits best for him and also gain experience to choose the right framework for the job.

Collapse
 
ozzythegiant profile image
Oziel Perez

Angular.js was my first ever front end framework, but when I started working with it, controllers (the early primitive version of components) were a whole new concept to me and I wrote some very sloppy code. As newer frameworks were coming in, I wanted to stick to Angular, but TypeScript got in my way and I had to leave.

Eventually I came back after learning the basics of TypeScript and I liked the overall structure of Angular apps, but I had several gripes with the framework:

  • Template syntax was too complex for my liking. Too much focus on directives and too much boilerplate to set up some child components
  • App bundles are too big; build time took way too long in my opinion (for small apps too).
  • Angular's custom CLI built on top of Webpack makes it slow to start up and hard to understand due to all the custom configurations. I much prefer Vite now across all projects regardless of framework.
  • File hell

Seeing that these things outweighed the pros for me, I ditched Angular and went with React. At the time, React ecosystem was still based on class components, and I preferred their simplicity over Angular, but hen I started to miss writing separate templates as opposed to sticking all html and css in JavaScript, which is a philosophy I quickly came to oppose.

Then I checked out Vue and immediately fell in love with it. I realized this is what was needed in the industry, a simple framework that you can use directly without a bundler and had some kind of structure to it while maintaining flexibility. Plus single file components meant no file hell. It was just a win-win for me all around. Spent several years with Vue and got used to it. Eventually I came back to React (my last experience with it was a redux project so I was aware that functional components were gaining more traction) and I found out everyone had migrated to hooks. I was appalled at how bad components looked now. Components were so sloppy, no separation of concerns whatsoever and there's a million ways to do the same things, so every React app looked way too different.

So ultimately I never came back to Angular and React and stuck with Vue, but currently there's a huge rift in that community because Vue 3 became a major breaking change for many libraries. That and because Vue 3 introduced composition API, which looks like a ripoff of React's hooks, I decided it was finally time to try out Svelte.

Now, my default framework is Svelte due do its simplicity and high performance, with Vue as a fall back for when I need a bigger ecosystem or to work on an enterprise app with other developers.

Collapse
 
retry2z profile image
Hristiyan Hristov

Very nice article just a few thing I would change is the for bundle size the way I manage my project in my main bundle there is only angular and the utilities for api calls and store management nothing else nothing more needed.

Collapse
 
maurerkrisztian profile image
Krisztián Maurer

I am an Angular developer and currently learning other frameworks. What I miss the most is the Angular state management, reactivity by default. btw nice summary 🙂