Since I don’t seem to have a blogs worth of any one topic to write about, I thought maybe something more along the lines of a cluster of small tips and tricks might work. Since I’ve been writing my Angular book over the last couple of weeks, there hasn’t been much new that I’ve discovered worth sharing. But there are a few small discoveries I’ve made. This week, they center around NgRX Effects.
When NgRX 4 came out and I discovered that the “right” way of creating Actions is to use TypeScript classes and not Object Literals, I was a bit surprised. Why would you use a Class that requires you to use the “new” keyword? Why would you put multiple classes in one file? This is insane!
For the last 18 months, I’ve been working for an organization that has what some might consider a unique requirement. Because of where our application’s data is sourced, we need to aggregate data on the client side rather than on the server. What this means is that for any one screen, we may make multiple calls to the server to grab all the data we need. Fortunately, because we adopted NgRX early in our adoption of Angular, we could avoid a lot of the headaches associated with client-side aggregation.
As I’ve been interviewing for a new contract, the question, “How do we Upgrade to Angular from …?” has come up several times. And as I’ve thought about the question, several patterns have emerged.
I made a tweak to my Angular code process over the last month or so that has resulted in greater productivity in my development environment and fewer bugs.
Now, I didn’t make this change because I thought it would improve my productivity. At least that wasn’t the primary reason. I made the change because I thought it would reduce the chance of introducing bugs into my code. And while it does reduce the number of bugs in my code, the result has been generally improved productivity.
What is this great secret?