3 ms·
I did a medium skim of the whole doc, so apologies if I missed anything. The following is my TL;DR takeaway: * Everything is consolidated into JSON. HTML and
by disambiguation 6y ago
I did a medium skim of the whole doc, so apologies if I missed anything.
The following is my TL;DR takeaway:
* Everything is consolidated into JSON. HTML and CSS elements are now expressed in a uniform JSON format. You can express a whole element (whole == styled + functional) as one JSON blob or define individual blobs and link them by class reference.
* By consolidating, we eliminate redundancies across the front-end landscape.
* I didn't see it explicitly, but I think it's implied that everything by default is a div, but you can define a "type" whether that's an "input" or a "style"
* CSS is called out as being too bloated and "functional", so his approach strips out everything from CSS that isn't basic cartesian positioning. The rest is deferred to javascript.
Reactions
* Overall I like it, very developer centric. I'm biased towards JSON > XML which is a plus. But just the idea of keeping track of one parser in my head for all of front end development, instead of the current 3, is a big win.
* IMO it seems like a lot of this could be achieved today in React, and It'd be cool to see a POC trans-piler that does exactly that! :)
Critiques
* Before the POC stage, special care has to go into deciding what bits of the declarative web are getting eliminated.
* ex. Relative positioning, if this gets removed I see it leading to a lot of "re-inventing the wheel" but maybe that's your intention? Everyone is already overly reliant on things like flex-box, so maybe this just results in flex-box-js :shrug
* Maybe I missed it, but there seems to be a bunch of other loose ends:
* State-management
* inheritance (both state and style)
* rendering/lifecycles
P.S. A lot of commentators are concerned you're trying to throw out the entire declarative web, but that wasn't my takeaway at all. Rather it's a call to refine the declarative foundation of the web.