How TypeScript Shaped our Entire Codebase for the Better

Over the last year and a half, I’ve had the pleasure of working on a web app built in TypeScript.

I came to Atomic with no web development experience at all. On my first couple of projects, I spent most of my time working on small, relatively isolated pieces of functionality for various applications: a bit of UI development here, some Rails model changes there. I’d had some exposure to JavaScript development, but not enough to really deeply understand or think critically about JavaScript engineering.

When I moved on to my most recent project, our SPA starter kit was still in its infancy, and we were starting a greenfield project from scratch. This meant that I got to witness lots of big architectural decisions and their motivations, and that I had to develop a much more holistic understanding of the application architecture than I’d ever needed before.

With that understanding came a fascination with the way that a language can shape the development process. I found TypeScript to be joyful and comfortable for development, and its influence on our system was remarkable. TypeScript shaped our design, our architecture, and our code style for things as simple as control flow. It even caught our misunderstandings of the business domain and saved us a great deal of wasted work by prompting us to clarify issues with our customer immediately.

We built a codebase that self-tests, that speaks to us when it’s feeling tension or wants to be refactored, that guides us toward solutions that cut with (not against) the grain. Now, we have a holistically healthy, robust app that responds instantly to complex, changing problem spaces.

I think that’s really exciting, which is why I decided to speak about it. I brought this talk to SoftwareGR and Full Stack Toronto 2018, and I hope to bring it to other conferences in the future. Enjoy!

The type demos are a modification of our TypeScript workshop . Check it out if you’re interested in learning TypeScript!

If you’re interested in the example application I demo in the talk, it’s a modification of our starter kit. My fork of it can be found on GitHub.