Nx Conf 2022 Recap

Published on Nov 09, 2022

tldr;

Nx Conf 2022 is in the books, and it was great. The in person group was small, but not too small. It was a great size for being able to interact with fellow attendees, speakers, and Nrwl team members. The speakers were well prepared with practical examples of how to best use Nx to improve the maintainability and architecture of your applications. Here’s a brief overview of some of my favorite talks. But I mean it when I say that just because I don’t mention a talk doesn’t mean it wasn’t good; these are simply talks that will benefit me and the projects I work on in the next few weeks. The presentations will be released soon, and when they are you should go watch them!

Generators

Many people talked about the importance of using generators, custom or community, to improve the quality of your application. Automating tasks that otherwise need to be done manually means you as a developer can be more efficient, but it also limits the number of times people can accidentally mess something up.

My favorite talk on the subject was by Lara Newsom. She gave a very practical use case for why you would use custom generators, and walked through how to create one. In 25 minutes I went from being overwhelmed by creating a generator to being ready to build one on my own. (Coincidentally, this was one of Lara’s goals for her talk. She succeeded 😉).

In Lara’s example, she showed how to compose other generators, in this case the Angular library creation generator, to limit the number of inputs available to only ones that your project actually cares about. This allows for consistency when creating the libraries, and prevents other developers from being overwhelmed about creating the libraries needed for your app. This is something that I plan on implementing for our workspace as soon as possible. I plan to do the same for creating apps and components so that everything is created with consistency and with the correct files.

Component Testing

I think we can all agree that testing is not always the highest task on our list. But it is a vital part of having a stable application. Cypress has definitely changed the way I think about writing tests. The developer experience is so smooth, and it just feels good to write tests.

The newest Cypress feature for Angular is component testing. The ability to isolate a component and test its actual display and interactivity is really appealing. The component is mounted and run in an actual browser, and can be tested to ensure it behaves and looks as it is supposed to. This is another tool in the testing tool belt, and one that I plan to spend some more time looking into.

The Cypress and Nx teams have made it easy to get things set up in your app for component testing. This is yet another example of a great development experience: the migrations are essentially handled for you, and you just reap the benefits.

CI

Multiple people also spoke about the benefit of using Nx Cloud, and the amount of time that is saved by running tests, builds, or linting while using Nx Cloud is mind-boggling. If you have things set up correctly on your CI, the amount of time your CI run takes to complete can be significantly faster than otherwise. The time is saved by caching the output of certain actions and replaying it if the affected code hasn’t changed. Thus you don’t need to continue to re-test or re-build your code. It was said that one client saves 40,000 hours a month in their CI time by using Nx Cloud. That’s likely on a fairly large app, but even smaller apps can save hours over the course of a month all of which is time back in your life and money back in your pocket.

If you need to get started with getting your CI set up properly, Nx provides a generator to add different CI workflows for you. It’s straight forward and worth the time investment up front. (Quick story: I found a bug in the generated GitHub Action, and within a couple hours of creating an issue the issue was resolved. You can’t ask for a better response time than that.) After getting the CI file from the generator, you can be up and running pretty quickly and start reaping the benefits of Nx Cloud.

General Conference Experience

I’ve been to several rounds of ng-conf and it’s always a great time, but the size of it can make you feel lost and it’s pretty easy to blend in. That was not the case at Nx Conf this year. I don’t know the final numbers, but I’d guess there were about 100 people in person, maybe slightly more, but it was a great size. It was easier to find people to talk to, and to really make connections with people. I’ve interacted with many on the Nrwl team on Twitter over the last few years, but hadn’t met many of them in person. But because of the size of the conference it was so much easier to approach them and talk to the, both during the conference and at the after party.

The Nrwl team, and ZeroSlope Events, did such a great job with everything about the conference. The hotel was great, the amenities were great, the location was great. I will definitely be shooting to make it back to the next Nx Conf.