Mongo DB Persistence

6/30/2020

7:03:01 AM

mongo-leaf
Mongo DB brand

This data is being pre-fetched from mongo-nifty! It's flexible and simple to work with and uses javascript like Syntax for queries. It can be tiring fixing schema, changing code and updating the Object Relational Mapping (ORM) for the stuff at work which is SOQL. It's kinda like SQL but a bit limited. In combination with APEX, it's pretty nifty since you don't need to do extra stuff to get your data transformed into a collection or singular object. Like a single model, a list of them or even a hashtable. Stock, right out-of-the-box. I think that is rad.

This is great for data and keeping things neat, clean, and organized. This isn't to say non-relational dbs suck for consistency; we can use an Object Document Mapper (ODM) like mongoose to create the same rigidity and normalization* to keep your data looking like spreadsheets, but for my rinky-dink site, it's overkill. At that point I'd rather connect it to google sheets or something like that. I mean these are basically vanity posts that only friends or rando's on the web will encounter. I appreciate you, btw, please don't leave.

Sapper, the server framework I'm using to stitch this site together because I just had to do something new, has this ability to ask for the data before you use it like Next/Nuxt. prefetch fetches the routes to speed up navigation. This makes the user, you, have to wait less in between different pages on this site. If this site were loaded with pages, this would suuuuper convenient and even more so with preloading. By overriding/defining the preload function you can send the data to like a link or something. Conceptually, a teeny module is created that runs the function before the component is created.