Over my last few years working on production JavaScript apps, I’ve noticed a concerning yet common pattern: first-class models aren’t made explicit. By “first-class models” I mean the primary entities that encompass most of your app’s data. For example, a bookstore inventory system would probably have entities like Books, Authors, and maybe Customers. The inventory system’s primary goals are to display and allow a user to interact with those models. Despite the importance of models like these, I’ve rarely seen them made explicit in frontend apps. Most apps I’ve worked in have code that looks kind of like this:
Author note: This is a letter I wrote for my teenaged sister who recently entered the workforce. Painfully aware of the tight financial situations that many of my peers in their mid-twenties find themselves in, I wrote this letter in hopes that it will help my sister find a financially sound path as she begins to plan her future. …