Project X – Like Tailwind for JavaScript
github.com
github.com
It lets you add a CRUD editing interface with automatic data syncing/saving to any element. All that's required are a few HTML data-* attributes [1].
It takes a different approach than most frameworks: it doesn't separate the data from the presentation layer. This makes it so it can make a lot of assumptions about the structure of the application and the saved data based on the hierarchy of the HTML elements.
Also, since it's based on a traditional, server-rendered stack, you don't need to include the front-end JS library 90% of the time. If the current user can't edit the page, Remake simply isn't loaded, which cuts down on the page weight dramatically.
It basically lets you have all of the benefits of a traditional, server-rendered web app, while also giving you inline data editing capabilities for free.
I just finished recording some tutorials for it 1 week ago [2]. I'd love to have some people try it out :)
I would expect development and debugging could be somewhat easier since you’ve just got annotated HTML (no build pipeline), but I would also expect that runtime performance would be worse (or at least it would be harder to write an implementation as performant).
I could see this being a very nice option for simple sites, where you just have a bit of interesting UI on the page (menus, forms) and want to write it declaratively, but going to a full-on SPA framework is overkill.
VueJs fit that description really well at version 1. I love Vue, but I feel it has moved much in the direction of a full all or nothing framework these days, especially with the mental hoops they’ve gone through in v3 (setup + hooks) to take the paradigm and make it typescript friendly.
It’s also cool that you can use the normal Vue lifecycle stuff with the composition api. Episode 129 of full stack radio podcast has a lot of good info in it!
This has inspired me to work on in my spare time a Web Components compiler for optimized at compile time custom elements (and other features) kind of like Stencil JS, but I want to use Babel as to not alienate those who don't use typescript. I'm also considering what the compilation target should be (currently I'm toying with Lit HTML, but I've looked at Incremental DOM too, or forking my own thing based on it, because Google's lack of communication around it makes me nervous.)
This is what I feel like the bundler promise is ultimately the most logical extension of, highly optimized compiled components that frameworks/libraries can hook into (the compiler, I mean) to highly optimize their builds without the developer having to worry and fret about whether their build is setup properly to be the most performant
This is my opinion of course, and its entirely possible this started long before Vue or svelte even existed, but I'm excited to see more of this now.
I feel like its what Handlebars was suppose to be, but I don't know if it ever lived up to that hype, especially performance wise (in the browser. I know its popular server side, where the performance concerns are a bit different).
EDIT: Just a heads up, it appears they're using a bit of eval (view `new Function([...args])`[0] under the hood. I'm personally not a fan of this . Too many security related edge cases not to be considered risky. I'm open to the fact I could be wrong though.
[0] https://github.com/calebporzio/project-x/blob/master/src/uti...
How would Project X fit into that? Could it replace Stimulus and Turbolinks?
I've seen a TON of projects with huge teams of contributors go belly-up just because they fell out of style, after a ton of people had implemented it because "cool!" This is almost a trope in the JS/ECMA world.
If you're looking to make something informal then all of what I just said goes out the window, but usually even my hobby stuff has a potential support cycle/lifespan.
Compared to how I work now it feels outdated, having said that, though with static site generators being a growth market, maybe markup decorators like this could be a way to get more custom UI behaviour into said sites without the kinds of massive complexity in the editing process that usually result in 'enterprise' like content management