How would you build a complex app with vanilla tech?
The other day on Mastodon, Hawk Ticehurst asked…
If you were asked to build a “proper complex” web application (let’s say a full featured mastodon client or similar) and you were going to “use the platform” as much as possible how do you do it?
And i’m looking for nitty gritty details: what APIs, tools, and techniques are you using to build/handle routing, UI, data fetching, styling, state management (or not), caching (or not), etc, etc, etc?
While I’m not really interested in spec’ing out a full, detailed build, I am happy to share how I think about projects like this at a high level.
Here’s what I would do…
- A baseline of static, server-rendered HTML
- Progressively enhanced UI with dynamic rendering once JavaScript is available
From a technical perspective, I would personally probably use…
- PHP for the backend
- Web Components for the client-side JavaScript
- Flat JSON files or mySQL for the database layer
- Caching with Service Workers
- Styling with HUG CSS and Kraken
I’m not sure if I’d favoring sending JSON or server-rendered HTML for subsequent UI updates, but probably the latter.
Interestingly, I’ve built a few personal apps that are kind of, sort of like Mastodon in their basic functionality, and that’s how they all work.
What would you do?