frontend-friday

It's #FrontendFriday - Nx Standalone Angular Applications

Hello #FrontendFriday-Readers, you are often faced with the architectural decision of how to set up and structure your Angular application. The obvious choice is then the Angular CLI. But are there alternatives?

 

Most people are familiar with the previous discussions about Nx: integrated vs. package-based. Since version 15.3, another option has been available to you as part of the Nx setup: the standalone variant. A standalone project in Nx means that it is not a monorepo, but has a single application at the top level of the project. This setup is similar to what the Angular CLI offers, but has some relevant differences. Nx relies on Jest for unit tests, while Angular continues to install Jasmine and Karma as dependencies. Nx also offers the option of integration tests, Playwright an option that Angular 18 does not yet support by default.

Why should you now use the standalone version of Nx instead of the Angular CLI? The main reason is that the monorepo philosophy is still maintained. This means that there is one level for libraries, which enables a more modular and scalable structure. The special thing is that a standalone project in Nx can later be easily expanded into a monorepo. This can prove difficult with a pure Angular CLI structure.

In addition, the standalone version of Nx offers further advantages:

  • Advanced caching and build optimizationsNx uses efficient caching mechanisms that can significantly reduce build times.
  • Parallel execution of tasksTasks such as linting, testing and building can be carried out in parallel, which increases the speed of development.
  • Simple imports through TypeScript path mappingThis makes it easier to work with modules and libraries.
  • ….

Nx also has many other advantages that make it a powerful tool for the development of Angular applications.

Overall, the standalone version of Nx not only makes the development of Angular applications more efficient, but also offers numerous extension options that are not available as standard in the traditional Angular CLI. For this reason, it is a very good alternative for doubleSlash when making fundamental architectural decisions.

Learn more about software architecture

Dennis Stricker

About ME

Stricker Dennis works as a passionate developer at the company doubleSlash in Friedrichshafen on Lake Constance. He completed his Master of Science degree at the Ravensburg-Weingarten University of Applied Sciences. His areas of specialization include the development and conception of modern Web applications and mobile apps in the B2B environment.

All contributions from Dennis Stricker

Learn more

Further information on our website and in our newsletter

Arrow up