DEV Community

Cover image for Why Angular's Opinionated Approach Clicked For Me!
Akilah Littlejohn
Akilah Littlejohn

Posted on

Why Angular's Opinionated Approach Clicked For Me!

Image description

From Junior Developer to Angular Advocate: A Journey in Code Architecture

My background being involved in Opensource and Community Projects has made me obsess with organized code. In that setting, you have developers who come in and out of the project constantly, several junior developers taking their first steps with a large code base (including myself) and no dedicated engineering manager causing the architecture of these applications to be done on the fly. These codebases using other ui/js libraries got messy and often the tech stack would grow and get confusing as problems evolved. While it's safe to say that the messiness of code bases and the complexity of tech stacks aren't initially caused by JavaScript libraries themselves, these issues often arise as developers grapple with problems that extend beyond simple DOM manipulation—challenges that, quite frankly, beginners aren't yet equipped to handle effectively.
Image description
While I started learning Angular working with a friend on his personal projects, I started to see the point of learning design patterns and reactive paradigms. I didn't have to focus so much on coordinating simple state changes across my app and realized how much I relied on Typescript for the assistance it offered through my IDE's intelligent code completion and refactoring features. Eventually, I wanted to introduce Angular to every project because I saw the solutions that it offered. Unfortunately, at the time Angular had a steeper learning curve compared to some other frameworks (I dont believe that is the case anymore) . I continued to learn on my own time and grew to love Angular’s structured approach, combined with its All-inclusive toolset and community support.


Key aspects of its architecture and development philosophy.

Angular is often described as an "opinionated" framework, which means it has a strong point of view on how applications should be structured and built. Ultimately, whether Angular's opinionated nature is a benefit or a drawback depends on your individual preferences and project needs. Here are some ways in which Angular's opinions are reflected

1. Component-Based Architecture:

  • Building UIs with reusable components is like playing with Legos. You can create complex things easily by snapping together reusable pieces. Each component consists of an HTML template that declares how that component renders, a TypeScript class that defines behavior, and a CSS selector that defines how the component is used in a template.Encapsulating their own logic and design.Separating concerns keeps your code tidy, focused, and easy to maintain, like having different rooms for different tasks in your house.

2.Services and Dependency Injection:

  • Services offer focused functionalities, and Dependency Injection lets you plug them into your code like building blocks, making it flexible and adaptable.They live outside your components and handle tasks like fetching data, logging activity, or performing calculations, keeping your components clean and focused on the user interface. Think of it as dividing chores so everything runs smoothly

3.Directives:

  • Angular has three kinds of directives: components (which are directives with a template), structural directives (which change the DOM layout by adding and removing DOM elements), and attribute directives (which change the appearance or behavior of an element, component, or another directive). These directives extend the HTML in your application and give you the power to create complex behaviors in a declarative way.

4.Data Binding:

  • Angular provides a way to bind data properties of the component to the HTML template. This can be one-way (from component to view, or view to component) or two-way, which allows for interactive applications without having to write a lot of boilerplate code.

5.Routing:

  • The Angular Router enables navigation from one view to the next as users perform application tasks. It's based on a URL-based navigation scheme where each component is associated with a route. This system allows for the creation of single-page applications where navigation between different components doesn't require loading a new page.

6.TypeScript-Based:

  • Angular applications are built using TypeScript, which provides benefits like static typing, interfaces, and decorators. This enhances code quality and readability, and integrates well with Angular's dependency injection and component system.

7.Tooling:

  • The Angular CLI (Command Line Interface) is a powerful tool that enhances the Angular organized approach. It can generate code, run tests, and bundle applications for deployment, ensuring that these processes follow the Angular best practices.

Start your own Angular Journey

By enforcing specific patterns and practices, Angular ensures that different projects follow similar structures. This consistency made it easier for me to understand and contribute instantly. If you're curious about whether you'd enjoy working with Angular, I recommend trying out some tutorials and exploring the community to see if it sparks your interest.The Angular Team has really put more focus on the developers learning journey. The new docs on the new domain Angular.Dev have video tutorials, an IDE you can work with in the browser, and other resources catered to beginners.

Dedicated communities such as AngularNation, which offers curated learning resources and expert connections through selective membership, foster collaboration and skill development within a high-quality developer community. Additionally, the Angular Community Discord provides open-access, real-time support, casual discussions, and social connections. These are invaluable resources that I use personally that offer a sense of community and collaboration pushing the Angular ecosystem forward. This framework really is dear to me, I believe it made me a better developer in so many ways. You might be surprised at how much fun you can have building with this powerful framework!

Let's Connect

If you have any questions or feedback, please don't hesitate to drop them in the comments below or reach me personally.

Top comments (1)

Collapse
 
jacelynsmitth profile image
Jacelyn Sia

Angular development is set to be one of the most sought-after skills in the tech industry. With the demand for web and mobile applications growing rapidly, the need for skilled Angular developers is also on the rise. As companies continue to invest in digital transformation and online presence, they are actively looking to hire Angular developers who can create robust and scalable applications.

One of the main reasons why Angular development is the right choice for a career in 2024 is its wide adoption and popularity among developers. Angular is a widely used JavaScript framework that offers a range of features and tools for building dynamic web applications.