Hacker News new | ask | show | jobs
by romaniv 3223 days ago
Components with extensibility through inheritance written in a prototype-based language. Having worked with around a dozen component-based systems over the years I'm not particularly enthusiastic.

I think it would be much better for the web if browsers had a sane API for extending behaviors of any tag via attributes. This would make things easily composable and eliminate most problems of traditional component-based systems.

    <button does-stuff does-more-stuff></button>
It would be even better if people working on these specs spent some time reading research papers on how a sane component-based system could work. For example: http://alumni.media.mit.edu/~mt/thesis/mt-thesis-Contents.ht... A lot of interesting ideas regarding extensible behaviors and ease of understanding.

Edit: And yes, I'm aware of is="" functionality. It's not exactly what I'm talking about. In fact, if the specs were designed the way I mentioned, there would be no need for making anything special for built-in elements as opposed to the new ones.

2 comments

> It would be even better if people working on these specs spent some time reading research papers on how a sane component-based system could work.

I don't know the people working on these specs, but presuming that they aren't aware of research in the area, and moreover of what has worked in practice and what hasn't, is audacious.

It's true that I don't know for sure, but I haven't seen any citations, or verbal references, or any similarities in the APIs that would indicate familiarity with the relevant research I had in mind.

Also, a lot of research in this field is done through working proof-of-concept systems, so there is no point in implying that those designs don't work "in practice".

By working in practice I don't mean "unimplementable or not", I mean the difference between CORBA and gRPC: One can argue endlessly about the benefits of one vs the other, but it's practical experience what's informed the latter of how and why the former sucked.
I think apple opposed is="" and its not implemented in their browsers.