Compass Web App for Angular Practice
I've wanted to learn web development for years and one of my problems was that I lacked the dedication and focus to build my skill before I got distracted by something else. This is a problem because web development world moves so fast that, by the time I returned, the landscape has drastically changed with something new and shiny to attract my attention. When I window-shopped Polymer/Lit, I was about to start the cycle again. But then I decided to back off for a few reasons.
First and most obvious is that I didn't yet know enough to fully leverage the advantages of web components in general, and Polymer/Lit in particular. They enable small lightweight fast web apps but only if the developer knows how to create a build pipeline to actually make it happen. I have yet to learn how to build optimization stages like tree-shaking and minimization. Without these tools, my projects would end up downloading far larger files intended for developer readability (comments, meaningful variable names, etc.) and include components I don't use. Doing so would defeat the intent of building something small lightweight.
That is closely related to the next factor: Angular framework has a ready setup of all of those things I have yet to master. Using Angular command line tools to build a new project boilerplate comes with a build pipeline that minimizes download size. I wasn't terribly impressed by my first test run of this pipeline, but since I don't yet know enough to setup my own, I definitely lack the skill to analyze why and certainly don't yet know enough to do better.
And finally, I have already invested some time into learning Angular. There may be some "sunk cost fallacy" involved here but I've decided I should get basic proficiency with one framework just so I have a baseline to compare against other frameworks. If I redirect focus to Polymer/Lit, I really don't know enough to understand its strengths and weaknesses against Angular or any other framework. How would I know if it lived up to "small lightweight fast" if I have nothing to compare it against?
Hence my next project is to redo my magnetometer web app using Angular framework. Such a simple app wouldn't need all the power of Angular, but I wanted a simple practice run while things are still fresh in my mind. I thought about converting my AS7341 sensor web app into an Angular app, but those files must be hosted on an ESP32 which has limited space. (Part of the task would be converting to use ESPAsyncWebServer which supports GZip-compressed files.) In comparison, a magnetometer app would be hosted via GitHub pages (due to https:// requirement of sensor API) and would not have such a hard size constraint. Simpler deployment tipped the scales here, so I am going with a compass app starting with putting Three.js in an Angular boilerplate app.
Source code for this project is publicly available on GitHub