Code

Angular: Past, Present, and Future

Angular: Past, Present, and Future

Free Course: "Quick Start in Python"

Learn More

My first encounter with web development turned out to be quite difficult. Previously, I was engaged exclusively in backend development in Java, and the transition to JavaScript was a real challenge for me. I was irritated by multi-level callbacks, weak typing, and confusing code fragments. Moreover, working with jQuery didn't make the process any easier.

Angular combined with TypeScript attracts many developers, especially those with experience in backend development. This is due to the presence of strong types, which helps avoid many errors at the compilation stage. In addition, Angular implements the well-known MVC pattern, which makes the application architecture more understandable and structured. Using TypeScript enhances Angular's capabilities, improving code readability and maintainability. This approach promotes more efficient development and simplifies teamwork, which is especially important for complex projects.

Troubled Times

Ten years ago, which is a significant period in the development industry, there was a significant gap between desktop and web applications. Desktop applications had many features, but were distinguished by a heavy and unwieldy architecture. Web applications, in turn, were accessible through a browser, but their functionality was limited. Since then, technology has evolved significantly, and the boundaries between these two types of applications are gradually blurring. Modern web applications have become more powerful and functional, allowing them to compete with traditional desktop solutions and provide users with a more convenient and accessible experience. There is a significant difference between the developers of these applications. Some used powerful and complex programming languages ​​such as Java and C and were unwilling to hear about JavaScript. On the opposite end of the spectrum were developers who preferred lighter and more flexible technologies: HTML, CSS, JavaScript, PHP, and Ruby. These differences in approaches to application development determine not only technological preferences, but also the methods of solving problems, which in turn affects the final result and user experience.

The confrontation between backend and frontend developers at the dawn of time. Image: Ekaterina Stepanova / Skillbox

First Google took a significant step toward integrating web and desktop applications. Its libraries and Closure Tools compiler enabled developers to create web applications with functionality comparable to desktop solutions like Gmail. However, these technologies were still based on Java, leaving web developers with their tech stack on the sidelines.

Despite all the difficulties, a group of brave developers created impressive web applications using jQuery, creativity, and a little hope. Their work delighted users, but maintaining such applications became a real challenge: the codebase was enormous, and the structure was confusing and complex. This created numerous problems and made further development extremely difficult.

On the one hand, Google's heavyweight libraries limited web developers' use of HTML and CSS. On the other hand, the most daring developers created complex applications relying exclusively on pure JavaScript or jQuery. This situation highlights the contradiction in modern web development, where the choice of tools directly impacts productivity and ease of development. It is important to find a balance between using libraries and working independently with markup and style languages ​​​​to create effective and responsive web applications.

Rays of Hope

At this time, frameworks began to appear that simplified the process of creating web applications similar to Gmail. These tools allowed developers to create complex applications without requiring a deep understanding of low-level web technologies. Frameworks provided ready-made solutions and libraries, which significantly accelerated development and made it more accessible to a wider range of specialists.

The SproutCore framework became a pioneer in the field of developing web applications without using HTML and CSS. It offered widgets that made it possible to create applications, simplifying the development process and improving the user interface. SproutCore became the foundation for further innovation in building dynamic web applications.

Next on the scene came GWT, Capuccino, and similar frameworks. They avoided using pure JavaScript, converting code written in other languages ​​to JavaScript. For example, GWT used Java, and Capuccino used Objective-J. These frameworks were convenient for desktop application developers, allowing them to create web applications using familiar methods. However, they did not meet the requirements of web developers, who needed flexibility and control over their code.

The advent of Backbone, Knockout, and Ember ushered in a new era in web development. These frameworks offered developers tools for creating applications using familiar approaches. However, none of them achieved widespread popularity in the developer community.

In 2010, the programming world met its hero – Angular. This framework became a real revolution in web application development, offering developers powerful tools for creating dynamic and responsive interfaces. Angular changed the way developers approach development, providing more efficient data management and simplifying the process of creating user interfaces. Since then, Angular continues to be one of the most popular solutions among developers, contributing to the creation of modern web applications.

Angular. Origins

The story began a year ago, when Google developer Miško Hevery and his colleague Adam Abrons were working on a personal project. They dedicated their free time to this project.

The goal of this initiative was to simplify the work of web developers and designers, allowing them to effectively transform static HTML forms into dynamic solutions. This innovation significantly simplifies the development process, making it more flexible and user-friendly.

Owners of family-run pizzerias can easily integrate an online ordering system by adding a few tags to their HTML forms. This will not only simplify the ordering process but also set up email notifications. This approach provides convenience for both customers and business owners, allowing for efficient order management and improved customer service.

The project's name was suggested by Adam Abrons. This project was created as an add-on to HTML. HTML syntax uses angle brackets, which inspired the name Angular, which translates as "angular." Angular is a powerful tool for developing web applications that allows you to create dynamic and responsive interfaces.

The domain angular.com was taken, so the developers decided to register a new domain getangular.com for their project.

This is what the first resource about Angular looked like. Screenshot: Angular Wiki

Angular gained widespread popularity thanks to a serendipitous coincidence. Brad Greene, Miško Heveri's manager at Google, tasked him with developing an internal project—the Google Feedback Tool. This application was designed to collect user feedback, including reviews of the company's products and suggestions for improvement. The development of this tool became the starting point for the creation of Angular, which subsequently became one of the most popular web application frameworks.

Miško and his two colleagues wrote about 17,000 lines of code in six months of development using the GWT framework. As the code volume increased, difficulties in understanding and debugging arose. Constantly writing new code led to confusion, which hindered further work on the project. This emphasizes the importance of code organization and the application of best programming practices to maintain its readability and ease of debugging.

Miško bet Brad that he could implement a similar project in Angular in two weeks. In the end, it took him three weeks, which still impressed Green. The new project contained only about 1,500 lines of code, a significant achievement. Green was satisfied with the result and approved further work on Angular. Thus, the two friends' pet project received official status, opening up new opportunities for its development.

Not everyone at Google was confident in the success of the new framework. Senior technical manager Urs Hölzle noted: "Don't fool yourself and others: yes, you have achieved success with one small project, but it's just a drop in the ocean by Google's standards. Real joy will come only when a larger project is implemented."

The future confirmed that Urs had not fully realized the capabilities of his creation. Angular quickly expanded beyond Google and became a popular tool among developers around the world. This web application framework has gained recognition for its flexibility and powerful functionality, making it one of the leading solutions in the field of front-end development.

Why Angular is so powerful

With the advent of Angular, designers and web developers felt a sense of relief. Previously, frameworks treated HTML and CSS as primitive tools that should not be used by experienced developers. Angular changed this approach, giving them the attention and respect they deserve. This framework integrates HTML and CSS into the development process, allowing you to create more complex and interactive web applications. As a result, Angular has become an essential tool in the arsenal of modern web developers, opening up new possibilities for implementing ideas and improving the user experience.

Developers have highly praised the concept of two-way data binding. This technology allows data changes to be instantly reflected on the web page and also saves user changes to bound variables. This approach significantly improves the interaction between the user and the interface, making it more intuitive and dynamic. Two-way data binding is an important aspect of modern web development, providing convenience and efficiency in working with user interfaces.

This technology has significantly accelerated the application development process by eliminating the need for an additional layer of processing form actions. Now developers can avoid transferring changed data to a shared storage, as well as retrieving this data to display an updated page. This allows them to focus on more efficient implementation of functionality and improving the user interface, which ultimately improves the performance and quality of the application.

Angular offers a powerful dependency injection mechanism, which greatly simplifies dependency management in applications. Although this technology has been around long before Angular and has been used in languages ​​like Java and C#, its use on the frontend has become especially relevant. Dependency injection allows developers to easily integrate essential services like HttpClient, which leads to more modular and testable code. This functionality makes Angular an attractive choice for developing scalable web applications.

Similarly, the same applies to the animation service and wrappers for the standard window and location objects, which are now available for unit testing. These tools allow developers to more effectively test the functionality of web applications by providing convenient access to UI elements and their behavior. Unit tests can now include animations and interactions with windows, significantly improving the quality and reliability of the code.

Window and location are built-in browser objects that allow you to manage windows and URLs. With them, you can open new windows, load resources at specified URLs, and change the address of the current page. The Window object is responsible for creating and managing browser windows, while the location object provides access to information about the current URL, as well as functions for changing it. These tools are essential for web developers, enabling effective user interaction and dynamically updating page content. Unit testing of browser-related objects is challenging because benchmark results can vary depending on the browser used. However, Angular offers convenient wrappers for working with these objects, significantly simplifying the testing process. Using Angular, developers can create more reliable and predictable tests for browser functions, which contributes to higher-quality web applications and a better user experience. Components can be created and reused using Angular directives. This allows for code optimization and improved structure, making development more efficient. Reusing components helps reduce development time and makes applications easier to maintain. Angular directives play a key role in creating dynamic and responsive user interfaces, which improves the overall performance of web applications.

Angular. New Threats

With the opening of Pandora's box, new problems in web application development became apparent. In 2013, React, created by the Facebook team, was born. In 2014, it was joined by Vue.js, which quickly gained popularity among developers due to its simplicity and flexibility. These tools changed the approach to creating interfaces, providing developers with powerful tools for building modern web applications.

Vue.js is not backed by a large company, as its development and popularization is carried out by a team led by Evan Yu, a former Google employee and now an independent developer. Evan Yu argues that the framework was inspired by Angular but removed its unnecessary complexity, making Vue more accessible to developers.

React is a powerful JavaScript library that, when combined with other tools, allows you to develop fast and responsive web applications. This library is particularly valued for its simplicity, high performance, and low entry barrier for developers. With React, you can easily create interfaces that provide excellent user interactions, making it a popular choice in modern web development.

The most serious blow to the framework's reputation occurred in 2014, when its developers announced a new version of Angular that was not backwards compatible with previous versions. To clearly distinguish between the two branches, the old version began to be called AngularJS, and the new one, introduced as Angular 2, began to be referred to simply as Angular. This decision has caused a mixed reaction among developers and users, as it required significant effort to migrate to the new platform and adapt existing projects.

The well-being of Angular was threatened by many, even by its creators themselves. Image: Ekaterina Stepanova / Skillbox

After such news appeared, Angular users began to distrust the future of the framework. Many began to consider switching to competitors when developing new projects, and a significant number of developers actually left the platform.

Angular. Rebirth

The new Angular retains its functionality but has become more accessible to learn. Reducing the number of abstractions has significantly simplified the process of mastering the framework for developers. Now there is no need to remember the differences between factories, controllers, and services, which previously created difficulties for beginners. As a result, the code has become more understandable and readable, which contributes to efficient application development.

Angular 2 was rewritten in TypeScript, which is a superset of JavaScript. The strong typing offered by TypeScript significantly simplifies the work of developers with documentation and source code. Clearly defined types and methods serve as self-documentation, which allows for faster navigation within a project and improves code quality. The use of TypeScript in Angular 2 promotes more efficient web application development, ensuring a high degree of reliability and maintainability. Fans of vanilla JavaScript have not been left out: the ability to write code in pure JS has been preserved. Furthermore, the developers have taken a step towards Dart by launching a branch for Angular development with Dart support. This has resulted in a separate project called Angular Dart, which expands the capabilities of Angular with this programming language. Since the previous releases, numerous updates have been introduced, and at the end of 2020, Angular 11 was released. The new versions have added significant improvements and new features that have made application development even more efficient. For example, the latest updates have improved performance, added new tools for testing and optimization, and updated libraries to simplify working with components. These changes allow developers to create faster and more responsive applications that meet modern requirements.

  • Ahead-of-time (AOT) compilation — preliminary compilation. It allowed to reduce the size of packages and page load time.
  • Server-side rendering — page generation on the server. This attracted developers who wanted to reduce the initial load time; this approach also reduces the number of requests to the server and the size of scripts that users are forced to download to their computers.
  • More convenient HttpClient — thanks to the redesigned syntax, methods for accessing the server are easier and faster to write.
  • Support for multiple interface languages. It is easier to implement multilingualism at all interface levels (from menu items to messages).
  • Improved CLI (Command Line Interface) — command line interface. Allows you to quickly create various Angular structures: components, services, modules. Now you don't have to manually create files for new application elements with the correct annotations, as well as tests for them, which frees up programmers' time for really important work - for example, implementing logic.
  • New optimized Ivy renderer. It allows you to reduce the size of the final package, which pleases users of older devices. Developers also appreciate the accelerated page reloading after compilation. The renderer is still being finalized, and other improvements are planned.

Since its release, the Angular 2 framework has restored the trust of developers who were disappointed with the transition from AngularJS to legacy solutions. Angular 2 offered a modern approach to web application development, ensuring stability and performance, which attracted the attention of many programming specialists.

The new advanced Angular has become an attractive choice for enterprise developers. When building and maintaining long-term applications, the importance of a reliable framework becomes clear. Angular ensures stable releases and minimal architectural changes, allowing developers to easily adapt to new versions. For example, moving from Angular 2 to Angular 5 or even Angular 11 doesn't require significant effort, making it an ideal solution for long-term projects.