Plasmid - Web Development Platform
Iceblaze4 Code and Eng DK30 Fall 2020 3 4
Description
I would like to create an MVP of a “web editor” for Designers/Frontend developers. It should be similar to Webflow but allow full development capabilities like Unity.
Recent Updates
This project is now complete.
Day 9 (🧡) - The great refactor
After playing around with the Remali library I came to the conclusion that continuing with this approach will just create more complexity in the long term. If this was a private module I would consider it, but since I plan to expose a public plugin API, expecting users to learn yet another new system just to interact with it seems like an overkill. 😕
RxJS
RxJS is a well known and well maintained library, and although it requires a different way of thinking, it is very similar to what I envisioned with Remali in the first place. Who knows, I might refactor Remali as a utility wrapper on top of RxJS someday. 😁
For now, I managed to refactor the whole state management into RxJS and moved the Panels and Renderer logic into Plugins. This decouples them from the Plasmid runtime and makes them interchangeable with different plugins that can supply same behavior.
Day 5 - Plugin System
After a lot of writing and rewriting and writing and rewriting I finally came to a plugin system I feel good about.
Previously I wanted this to be super composable, with plugins being able to instantiate other plugins, global/private references that could be passed around and overall a configuration bonanza which could cover every possible and impossible need anyone could have… but… it ended up being exactly that a configuration spaghetti. 🤯
So I scrapped all of it and went with the most minimal approach, plugins can now be instantiated only during initial setup and only on the root instance. If some plugin needs extensibility it can expose some API for others to interact with it and vice-versa if it needs a reference to some other plugin it can instantiate it locally.
This way I moved the burden of managing potentially infinite scenarios from my runtime to whomever needs it and ironically sounds more scalable than implementing scalability myself. 😁
Day 2 - State Management
Previously, all state management was handled via Commands and Commands Manager. This, however, became a black box the moment you started passing the command references around and overall wasn’t a good DX. 😔
Ideally I would use a Flux based solution like Redux, but given the scope of updates and the fact I will need to dynamically alter the shape of the state this became a no go. 🤔
Enter…
Remali
I’ve been playing with the idea of writing a custom state management library, but there are 100 and 1 out there already and there is no point in reinventing the wheel. Instead I have made a resource-mapper. This allows me to create small pieces of state and define relationship between them which results in state automagically updating as it needs to. As such I can decouple the business logic behavior from presentational layer making this a framework-independent solution.
Overall, I spent a couple of hours rewriting the current architecture into resource maps and now everything runs faster and a lot clearer. This makes a nice baseline for the following step which is the Plugin System.
Estimated Timeframe
Oct 15th - Nov 11th
Week 1 Goal
# Bootstrapping
- [✓] Setup Svelte project
- [✓] Add Electron wrapper
- [✓] Create basic layout
- [✓] Embed Plasmid instance
# Plasmid instance
- [✓] Create Plasmid class
# Commands
- [x] Commands Manager
- [x] Command dispatching system
- [x] Command subscription system
# Remali
- [✓] Remali module
- [✓] Rewrite Architecture into resource maps
# Panels
- [✓] Panels Manager
- [✓] Panel controls
- [x] Wire Panel controls to Commands
- [✓] Wire Panel controls to Remali
Week 2 Goal
# Remali
- [✓] Rework Remali into RxJS
# Panels
- [✓] Refactor panels as a Plugin
# Navigation
- [ ] Generate navigation with Panels
- [ ] Show conditional context
# Hierarchy
- [✓] Create app hierarchy model
- [✓] Load static hierarchy
- [✓] Implement hierarchy view
# Inspector
- [ ] Figure out Inspector API and events
Week 3 Goal
TODO
Week 4 Goal
TODO