I gave a talk last week at Angular Lunch, an Angular user group in St. Louis sponsored by Oasis Digital (with whom I will be starting work as a developer and trainer after Labor Day).
In the talk, I start with the Tour of Heroes tutorial as a good example of a small Angular app, but then I show some of the additional steps that would be necessary to go to the next level for an enterprise-scale app, including modularization, replacing Promises with Observables, change detection, and integrating @ngrx.
I’ve posted the code and slides I use in the talk.
Unfortunately, the sound intermittently cuts out for a second or two on the recording, but I hope that the content comes through anyway.
I really like @ngrx/store (especially combined with its companion, @ngrx/effects). Before I knew about it, my project team had been struggling to figure out a clean way to manage the data in a large Angular app. Fortunately, we attended a talk on Managing State in Angular 2 by Kyle Cordes, in which he walked through the different approaches to managing state (all state in the main component/splitting state between components/putting state in a service/bucket brigade/etc.) and how each of them fell short. We recognized each of those stages from our attempts to wrangle state in our app. He didn’t detail ngrx or the Redux pattern in that talk, but he pointed us in that direction.
When we started looking into the official ngrx example app as a guide, we liked a lot of what we saw, but we were also frustrated by the amount of boilerplate in the Actions and use of branching instead of polymorphism in the Reducer. I spoke with Rob Wormald at ng-conf 2017 about these concerns, and he said he knew that people didn’t like that about the pattern, but that nothing in ngrx required anyone to use those techniques; there just weren’t enough existing examples of alternatives.
In order to address these issues and provide the community with an alternative approach, I’ve released ngrx-example-app-enums to show how to reduce boilerplate with enums. I’ve also extracted the key files into ngrx-enums, a small library others could use to implement the pattern on top of ngrx.
One area that was missing for me in TypeScript, though, was Enums. TypeScript has an Enum concept, but it’s nowhere nearly as powerful as Java’s Enums. Whereas TypeScript Enums are essentially namespaced groups of numbers (or strings, as of 2.4), Enums in Java are full classes. Not only can you create Java Enums that simply create a collection of namespaced strings, but you can also implement properties and logic for all of the instances (which I used to full effect in an article I wrote for OCI on extending them).
As part of my employer’s Software Engineering Tech Trends series, I have collaborated with a colleague, Mark Volkmann, to write an article on Comparison of Angular 2 and React. In the article, we started with a small ToDo app that Mark wrote for an Angular Lunch meeting to demonstrate React. I ported the app to Angular 2, and then we compared and contrasted the implementations.
That’s a quote from a blogger named Angie Jackson, and it has been one of the most important quotes for me in my secular and ethical development. It really helps me consider how three important parts of my worldview interact: Atheism, Skepticism, and Humanism.
Atheists in America by Melanie E. Brewster
Dr. Brewster’s book is an interesting collection of “testimonies” from non-believers of all walks of life in America. This book isn’t essential reading for an atheist or seeker to understand the relevant philosophical arguments, but it’s good for seeing how non-belief manifests in many aspects of life, with sections focusing on leaving faith, queer atheists, romantic relationships with theists, family and parenting, community, work, and aging.
新年快乐 – Happy New Year!
We spent the afternoon on Saturday celebrating the Chinese New Year. It was a great afternoon of a dragon dance, songs, and dancing. This isn’t something that’s part of my heritage or my wife’s heritage, so why did J and I do this for the third straight year? Because our boys are students at The Chinese School at the St. Louis Language Immersion Schools (SLLIS). Yep, D and M spend their days learning all their school subjects in Mandarin Chinese.
Ethical Culture is a bit of an odd duck. It’s a non-theistic religion, or as I like to say, “the religion for people who don’t like religion.” The movement’s founder, Felix Adler, said that it is “religious to those who are religiously-minded and to those who interpret its work religiously, and it is simply ethical to those who are not so minded.” At my congregation, the Ethical Society of St. Louis, we express this as being a “Welcoming Home for Humanists”, where we focus on “Deed Before Creed”.
But what does this mean in practice? I was asked this in an interview for the Ask an Atheist podcast in the summer of 2013, when they visited the Ethical Society of St. Louis. I answered by describing what happens at the Society on a typical Sunday morning. But there’s another aspect of our community that I didn’t mention then, but that I experienced again last week: Good Cheer.
Good Cheer is the Ethical Society of St. Louis’s annual winter festival (other Ethical Societies around the country have different names and different specifics). We have several seasonal festivals throughout the year, and we also have a Thanksgiving Festival, but Good Cheer is our biggest seasonal event. That’s probably because it is closely analogous to Christmas, the biggest holiday of the year for the majority of American culture. So, what does Good Cheer mean for us? Food, Fellowship, Fun, and Festivities
Contact by Carl Sagan
Without even noticing, just as astronomy entered a golden age most people cut themselves off from the sky.
I saw the movie based on this book when I was a teen and it was in theaters, and I’ve been getting more into Carl Sagan the past few years. I’ve enjoyed watching Sagan’s Cosmos series (and Tyson’s sequel to it), and I’ve read some of Sagan’s non-fiction before. This was the first time I had read any of Sagan’s fiction, and I found it interesting – it has given me a lot to think about.
I’m at Skepticon this weekend. It’s the nation’s largest free conference on skepticism, science, intersectionality, and atheism. It brings feminist-friendly atheism to Springfield, MO, one of the buckles of America’s broad Bible belt.
I love this conference. There are so many awesome people here talking about so many issues that are relevant to humanists, from socio-economic privilege to sexuality to Islam to secular community. There’s not a lot that is specific to parenting, but one workshop today was really relevant: CampQuest.
If you are in a secular family, and you find yourself feeling jealous when you see the other families around you send their kids to church camp, then CampQuest might be the answer for your family. CampQuest is a nationwide specifically-secular sleep-away camping opportunity for kids ages 8 and up. You can send your kids to these camps at various locations around the country to swim, hike, learn archery, learn about bugs, explore the Socratic method, and generally be comfortable in an environment without religious influence.