DeveloPassion's Newsletter #12 - New Book and Angular 11

DeveloPassion's Newsletter #12 - New Book and Angular 11
Welcome to the 12th edition of DeveloPassion’s newsletter. Before we start, I’d like to ask all of you to help me out a bit. If you find this newsletter interesting, then please do take a bit of time to share with others on social media: With your help, others will also get a chance to discover and enjoy reading it. As an added benefit, it’ll also motivate me to continue the experience! Don’t forget that you can also follow me on Twitter and Medium where I currently publish my articles.
Upcoming book
I’ve got a big announcement to make this week. I’ve started working on a new book. This time around, I’ll be writing about concepts. Tons and tons of concepts. The book, which I’ve decided to name “Dev Concepts” is going to explain all of the ideas and principles around software development. Ideas and things that I consider to be core knowledge that all software crafters should (at the very least) be aware of. The book is mainly aimed at software developers of all levels and all horizons (back-end, front-end, full-stack, and everything in-between), but will also be of interest for junior IT architects, IT operations staff, project/team/IT managers, etc. It’s a project that I’ve had in mind for quite a while and now I’m going to make it real. I’ve met many peers, juniors, seniors, and even so-called experts who didn’t know all that much about software architecture principles, software design, code quality, IT infrastructure, IT security, or the differences between CI and CD. Also, through my one-to-one coaching sessions, I’ve found myself explaining the same things over and over. In this book, I intend to give an easy to understand explanation of what full-stack really means, what great software is made of, how to go from ideas to production-ready systems, and everything that is needed/useful between end-users and back-end systems (DNS, PKI, reverse proxies, load balancers, firewalls, WAFs, etc). I’ll explain what IT operations care about and why it matters, what back-end developers should focus on, what front-end developers need to keep an eye on, etc. So this won’t be a book full of code snippets, nor one full of pedantic points for or against tabs (tabs are better, but spaces win ‘hands’ down :p). Neither will it be a book about Angular, React, TypeScript, GraphQL, Kotlin, Rust, or whatever fancy new technology is high on the hype cycle these days. This is going to be a book about “basic”, but foundational ideas that will help its readers create a clear mental map of a wide spectrum of puzzle pieces in the IT landscape, useful for all software crafters / DevSecOps people. I’ve announced the project on Twitter, LinkedIn, Facebook, Medium, and published a behind-the-scenes look about the launch on IndieHackers; where I also plan to continue sending progress updates. The Dev Concepts book will be available end of March next year, but it’s already available for pre-order, with an early-bird offer (first come, first served). Check out the official Website for all the details. If I may ask something of you, it’s to take a minute of your time and share those links around on social media. This will help me raise awareness about the project, and, hopefully, reach and help many more people. It’s my first self-published book, so it’s a new adventure, but I’m confident I’ll complete it in time.
Angular 11
The other big news of these last few days is the release of Angular 11. I’ve published a very detailed article about it on Medium, covering everything I found out about by going through the release notes, PRs and issues. Once again, the team has fixed a huge amount of issues, including some long-standing ones. Feature-wise, Angular 11 comes with faster builder times; partly thanks to improvements in NGCC and partly thanks to TypeScript 4, which is now officially supported (3.9 support is dropped too BTW!). Another interesting feature is the automatic inlining of fonts; which can be cool for performance & First Contentful Paint (FCP). They’ve also improved the build output and made it more readable, which feels pretty good. A cool improvement is the fact that the Angular CLI now has built-in support for Hot Module Reloading (HMR), a neat feature of Webpack. Speaking about Webpack, note that Angular 11 also has experimental support for Webpack 5. I wouldn’t recommend using it at this point in time, but it’ll soon be ready for primetime. TSLint is also finally officially deprecated by Angular and guides are available to help us all migrate to ESLint. As you know, I like strongly-typed code, so it’s always a pleasure to see Angular bring improvements in this area. In Angular 11, the built-in pipes (DatePipe, CurrencyPipe, DecimalPipe, etc) have stricter type definitions, which should help us avoid subtle bugs. Security-wise, there’s also progress towards the support of Trusted Types, which is going to be awesome in the near future. And there’s much much more. Check out my article for all the details ;-)
Mocking TS method overloads with Jest
A few days back, I needed to mock an overloaded TS method and was puzzled for a bit. It wasn’t hard to do, but I thought that it’d make for an interesting article. So I wrote it and published it for you all to read :) By lack of time I couldn’t dive deeper than what the article covers (i.e., a working solution), but I’m pretty sure that there are more clever ways to handle this. If you have ideas, then don’t hesitate to chime in on Twitter; I’m curious!
Creating Moment decorators for class-validator
I’m almost ashamed to admit that I’m still using MomentJS. But it’s a fact, it’s deeply integrated into my current project and I lack time to ditch it. A few weeks back, I needed to add validation for Moment Duration objects, so I sat down and took the occasion to write an article explaining how to write custom validators for class-validator. In case some of you didn’t know, MomentJS is (long) dead. The maintainers have officially stated that they won’t make it evolve anymore; so it’s time to migrate to something newer and shinier.
Developing Microsoft Office add-ins using Angular 10+ and Nrwl NX
This week, I helped my wife to create a Microsoft Office add-in. The cool thing about that is that we can actually build Office add-ins using Web platform technologies that we all love and cherish (i.e., HTML, CSS, JS). While doing so, I’ve started playing around with Microsoft’s Yeoman generator for Office add-ins. The generator is nice since it supports generating add-ins with Angular support, but has quite a few drawbacks and quirks, as I’ve explained in my article. For one, it creates Angular 5 projects with Webpack 3 and quite some ugly other things, but there’s worse :) I hacked it a bit and ended up with a working Angular 11 based project, but I didn’t like it much; the overall build system and way to write the app felt way too alien. I didn’t want my wife to suffer because of outdated libraries and ugly code, so I dug deeper. I ended up creating a Nrwl NX workspace with an Angular app and integrated Office libraries to make it into a working Office add-in. This gave birth to the following repository as well as this article where I explain how to create Office add-ins using Angular 10+ and whatnot. Hopefully, that article will save a few souls from pain and suffering ;-)
A call for help
You might not know this about me, but I was probably one of the shyest persons on earth a few years back. I’m almost healed now, but it is still hard to call for help. Even though it ain’t easy for me, I’m asking all ~40 of you to help me. Digital marketing is still new for me, and driving attention towards my book project ain’t easy at all. That project is near and dear to my heart because it’s my passion for IT and software development that I want to share with the world. I strongly believe that this book will bring a lot of value for its readers, just like my explanations enlighten the people I coach, but the only way for them to know is to help them discover that it exists. So please go ahead and help me to share the word about the project! The official Website: http://dev-concepts.dev/ The pre-order page: https://gumroad.com/l/DevConcepts