Last month, we published a major update to our application that was four months in the making. The timing of that release, it might be noted, was not great. There also isn’t much physician outreach happening right now. Yes: these may be the least significant problems COVID-19 has caused for anyone.
[One positive of the pandemic is that it’s allowed many people, myself included, an opportunity for reflection, so if you’ll allow a quick diversion: I can think of two events in my lifetime that even in the moment, seemed to mark the change of an era in real time.
The first was the fall of the Berlin Wall. I can still remember my mother on the phone with my Oma back in West Germany, watching on CNN, and as it happened–even though I was only 8 at the time–understanding that something was happening.
The second, of course, was 9/11. Nearly 20 years later, it still seems like that is the era we’ve been living in, even if our problems and priorities have changed, especially in the last decade. (The Great Recession might have a case for the third if there had been long-term reforms, but whatever momentum there might have been for that mostly fizzled out–remember Occupy Wall Street?–and the recovery that followed was in many ways business as usual.)
After almost two months of social distancing, remote learning, and reading multiple terrifying thinkpieces daily, it would now be a real surprise if the coronavirus pandemic doesn’t usher in the same kind of era-defining change. My wife and I have tried to impress upon our own kids the magnitude and significance of the situation. I wonder if my own eight-year-old might reflect on this the same way in 30 years.]
In the meantime, we’re still working on our application. Hopefully marketing and outreach will one day resume and our clients will actually get to use it!
The big change with this release is switching from a multi-page application to a single-page application (SPA). We get a big boost in performance and an overall improved experience for our users. The litany of front-end and back-end changes below were either required by or enabled by switching to a SPA.
Other specific new features and changes made in this release:
- Better integration of theming and white labeling, especially for emails, reports, and notifications.
- Easy searching for new physicians via Google. Results can be added to Ember and assigned to routes and campaigns at the same time.
- Progressive web application functionality, which lets the application be added to the home screen on mobile devices and allows enhanced caching and some offline capabilities.
- Better handling of locations, to improve route planning for users and eliminate confusion when physicians have multiple locations.
- Usability improvements throughout, especially on mobile (thank you users, who suggested bigger icons and preventing the keyboard display on select lists).
- Improved UX, focusing largely on bringing more consistency in the way items get created and edited.
For those interested in the inside baseball, more significant changes happened on the back end.
Controller and view consolidation:
Previously, we had one set of controllers that served our API, which our own front end consumed to display content. We also had another set of controllers to serve our application content, and many of them only served page stubs or duplicated an existing API endpoint. There were a lot of inefficiencies and redundancies there, and moving to a SPA allowed us to use the API controllers exclusively and simplify our view layer. It also makes our API more useful to our partners when they connect to it.
Better state management:
Our application uses the Vue.js framework, which has an optional state management module (Vuex) that we couldn’t leverage when we had an MPA. We used localstorage in the browser and some other workarounds to improve performance and provide a level of state management, but it wasn’t a particularly comprehensive approach and relied on tying a lot of pieces together (Vue, vanilla javascript, sessions, PHP templates, and localstorage). It worked and sometimes felt like a minor miracle that it did. Vuex simplifies everything, gives us more flexibility moving forward, and lowers the number of back-end requests we have to make.
One component to rule them all:
Top-level reactive sections of the application did not have a shared parent component in the multi-page application. That meant using a variety of maybe-not-best-practices to make everything work the way we wanted. (Absolute position everything? Yes! Vue mixins in place of state management? Yes! Flagrant overuse of global event buses? Also yes!). The SPA architecture nests everything in one top-level Vue component, and all those problems go away.
Template sanity:
By moving to one set of controllers and one root component, data injection at the template layer is (hurray) the same everywhere. The major effect is cleaner and more understandable application structure. It might only have an impact on the developer experience, but we do a lot of development, and care about that experience.
We’re still continuing to add features, paying particular attention to those that will be valuable and useful to our partners as they start to dig out from the effects of the pandemic. Stay healthy!