The basics
Sep. 15th, 2019 06:48 pmWell, I've been working a bit more on Eardogger (my app for movable bookmarks, see previous), and it's coming along nicely. I think! Hard to say tbh, lol.
I'm working in Node.js with Express, I'm doing all the database stuff fairly "raw," and I'm doing the frontend in "vanilla" JS (but freely using any ES2017 shit I feel like). There's a couple reasons for all those choices, but the big one is that these are all areas where I recently ran up against some kind of wall elsewhere in my professional or personal projects due to my ignorance of the raw basics of How Shit Works.
Anyway, where I'm at right now is:
- Glitch.com is kind of amazing. I'll need to move off it at some point soon, but:
- The live app updates are even better for the first three hours on a project than I ever expected.
- The starting templates are legit useful.
- The amount of stuff they let you just get away with under the hood is pretty incredible. The instant you start chafing at the web editor, it reveals itself as a fairly legit remote dev server with very fast git-based deploys. (Pro-tip: remember you can't push to master, because it's not a bare repo. Push a named branch and merge it from the console, then remember to run their special
refreshscript to kick the deploy and the web editor.)
- Express is actually kind of nice. I'd been skeptical, because the ecosystem just seems completely fucking illegible at first (and at second, and at third).* But the way it lets you compose micro-apps into a coherent whole is impressive.
- Content Security Policy has very nearly killed bookmarklets. Remember how the classic Instapaper bookmarklet would get better over time without you having to upgrade it? And remember how it would finish doing its thing without navigating you away from your page? Both of those are basically impossible now, or at least they're impossible on a low-double-digit (and ever-growing) percentage of websites. It looks like browser vendors are vaguely aware that that's bad, but they don't seem to consider it at all urgent. (For a hot minute bookmarklets were broken entirely on sites with CSP, and at least they got that sorted out. Now bookmarklets work with CSP as long as they don't fucking do anything, lmao.)
- Fucking CORS, omfg.
- At least vanilla JS keeps gradually getting better. For example,
fetch()is a much nicer replacement forXMLHttpRequest. Anyway, this app is definitely not supporting IE11. - Figuring out what's cheap at the various cloud vendors is kind of A Lot to deal with. It's looking like I can get this thing running with a free Postgres database (already got that working!) and eventually a free app container on Heroku, so that's cool; it's an open question what to do if and when it gets popular, and I'm not sure what effect the 30m "sleep" constraint on free tier will have on the UX, but that's all in the future.
* To be fair, I have this problem with like 70% of the Node and general JS ecosystems. I'll spare you my theories about why it's all like that.