Live data from Hacker News

Introduction to HTML Components

blog.mecheye.net

131–140 of 151 posts

Re: Introduction to HTML Components

#131
post #104

Earlier quoted context omitted.

It is low level API to be non-opinionated. Or at least it makes sense for me to make it like that. Same as web assembly, service worksers and others - that is a step in right direction IMO. Same as for example Python providing WSGI - you don't often use WSGI directly, you use a framework on top of it like Pyramid, Django or Flask.

> It is low level API to be non-opinionated. No API is non-opinionated. It's the opinion of its authors. And w3c's opinions invariably are to the detriment of developer experience. For example, quote from [1]: "The things like property initializers for instances that were so nice in [a previous example] aren't here. And they've been stuck in committee for reasons that, frankly, just make me grumpy" (around 22:30 mark…

> No API is non-opinionated.

It's the difference between AppCache and Service Worker.

AppCache is very easy to write, very easy to read, has a nice and simple API. It's just the wrong API, so it's functionally almost useless.

Service Worker's API is more complex because it has hooks for the user to efficiently express exactly what they need. It's less easy to write, and less easy to read, but it's flexible enough that basically every site on the web could make good use out of having a Service Worker.

Most people won't write against the Service Worker API directly, they'll use a library.

You might say that this is a flaw of the API, that it's too complex or verbose for most users to use directly, but I think there's another angle to it. There can be many libraries and those libraries can iterate quickly. There can be only so many specs, and those specs necessarily iterate slowly.

Re: Introduction to HTML Components

#132

As far I remember that time, I would say IE Components didn't succeeded, because at that time server side rendering was far more popular. I personally was doing sites in PHP and tried to avoid JS at all costs. Strange that today I'm doing exactly opposite.

And even stranger that with concerns about battery life; we should now be moving back towards server side rendering.

Unfortunately there's no real downside to eating people's battery. 99.9% of people just aren't going to know why, just that their battery dies faster.

Re: Introduction to HTML Components

#133
post #19

Earlier quoted context omitted.

I think that people that disregard Polymer fail to understand that Web Components are already here. They are fully supported on Chrome and Safari, and hopefully Firefox and EDGE will eventually catch up with them. And they have to, because Chrome and Safari own the mobile web. Polymer is transitioning to being a thin layer on top of what the browsers support, which basically means a Polyfill for Firefox and Edge, and…

> I think that people that disregard Polymer fail to understand that Web Components are already here. XHTML was "already there" too. > They are fully supported on Chrome and Safari, and hopefully Firefox and EDGE will eventually catch up with them. With React, Vue etc going strong, I don't see them going anywhere even after that. They solve less problems in a messier way.

Custom elements is like an API of six methods `connectedCallback`, `disconnectedCallback`, attributeChangedCallback`, `adoptedCallback`, `attributes` and `register`. I don't see why this must nescessarily be compared with React or Vue any more than `appendChild` or `inserBefore` or any of the other DOM APIs. High level frameworks use the current DOM APIs now and they will surely use the new APIs in the future, but that doesn't mean that you have to use them, that's in fact the whole selling point of React and Vue.

You can use custom elements in React and you can even use React in custom elements, so they are not designed to be competing technologies. Quite the opposite.

Re: Introduction to HTML Components

#134

Earlier quoted context omitted.

Both are basic front end frameworks. Polymer just happens to use a minor spec to encapsulate and expose, the smallest part of what it actually does. Polymer of all the frameworks i've had to use has had the most breaking changes. That they're turning the ship for each and every major forcing you to rewrite the entire application is kind of ironic given that their motto is "use the platform" as if suggesting stability…

Big corps like Google tend to over-engineer stuff. It's the very reason why Vue.js is so kicking ass due to its low learning curse and progressive approach. Why can't we do the same for WC standards?

It's not like Vue has been implemented in Angular. All the ass-kicking frameworks are built on W3C standards.

Re: Introduction to HTML Components

#135
post #19

Earlier quoted context omitted.

I think that people that disregard Polymer fail to understand that Web Components are already here. They are fully supported on Chrome and Safari, and hopefully Firefox and EDGE will eventually catch up with them. And they have to, because Chrome and Safari own the mobile web. Polymer is transitioning to being a thin layer on top of what the browsers support, which basically means a Polyfill for Firefox and Edge, and…

> I think that people that disregard Polymer fail to understand that Web Components are already here. No. Polymer is here. As Rob Dodson said, "Polymer is the jQuery of WebComponents". No one in their right mind would even think about writing and using WebComponents in vanilla JS. Hence we're coming back to the problem with WebComponents: they are a solution in search of a problem.

FWIW a google search on that quote shows it was from Monica Dinculescu, if you don't mind updating that attribution. Thanks!

https://meowni.ca/posts/web-components-with-otters/

Re: Introduction to HTML Components

#136
post #131

Earlier quoted context omitted.

> It is low level API to be non-opinionated. No API is non-opinionated. It's the opinion of its authors. And w3c's opinions invariably are to the detriment of developer experience. For example, quote from [1]: "The things like property initializers for instances that were so nice in [a previous example] aren't here. And they've been stuck in committee for reasons that, frankly, just make me grumpy" (around 22:30 mark…

> No API is non-opinionated. It's the difference between AppCache and Service Worker. AppCache is very easy to write, very easy to read, has a nice and simple API. It's just the wrong API, so it's functionally almost useless. Service Worker's API is more complex because it has hooks for the user to efficiently express exactly what they need. It's less easy to write, and less easy to read, but it's flexible enough tha…

What I don't understand is why people insist that WebComponents API is ServiceWorkers in this analogy, and not AppCache :)

Re: Introduction to HTML Components

#137
post #131

Earlier quoted context omitted.

> It is low level API to be non-opinionated. No API is non-opinionated. It's the opinion of its authors. And w3c's opinions invariably are to the detriment of developer experience. For example, quote from [1]: "The things like property initializers for instances that were so nice in [a previous example] aren't here. And they've been stuck in committee for reasons that, frankly, just make me grumpy" (around 22:30 mark…

> No API is non-opinionated. It's the difference between AppCache and Service Worker. AppCache is very easy to write, very easy to read, has a nice and simple API. It's just the wrong API, so it's functionally almost useless. Service Worker's API is more complex because it has hooks for the user to efficiently express exactly what they need. It's less easy to write, and less easy to read, but it's flexible enough tha…

Also, this article captures the essence for AppCache vs ServiceWorkers comparisons: https://medium.com/@firt/service-workers-replacing-appcache-...

Namely: 'I don’t think we need a “Service Worker’s jQuery”. We need to use Vanilla AppCache code.'

Same goes for a ton of other things on the web platform. Replace "Service Worker" with "Web Components", and the sentence will still remain true.

Re: Introduction to HTML Components

#138
post #21
post #9

I am not sure it is not a coincidence that the same idea keeps resurfacing. I remember reading pretty early on that HTML/XML/XHTML would eventually lead to a world where "chemists would have their own tags to represent chemical formulas" and similarly each discipline would develop their own tag language. Browsers would just know how to render them! People have tried to materialize this idea in multiple ways over time…

> Browsers would just know how to render them! They wouldn't "just know," there were supposed to be DTDs published that would tell the browser how to render that specific kind of markup.

I guess the rendering of custom XML documents was more supposed to be controlled by CSS via the processing instruction . It's a little known fact that this was actually working in Mozilla/Firefox all this time, but not anymore I suspect.

Re: Introduction to HTML Components

#139
post #20

Earlier quoted context omitted.

I was a big fan of XHTML and all related XML Components, but then politics won.

If you call web browser vendors mutinying against the W3C who was pushing XHTML 2 down their throats "politics", which lead to Apple, Mozilla and Opera creating the Web Hypertext Application Technology Working Group (WHATWG) and to HTML5--then I'm okay with the politics. Yeah, I could close my tags and validate my code with the best of them back when XHTML was a thing--but that's no way to live. I'm glad WHATWG stepp…

The way I remember it, there was a guy called Hixie something that was in charge of standards implementation at Mozilla and made a terrific job at that. But then he got hired by Opera and saw that there was no point in competing with Gecko and so he started a FUD campaign called "XHTML considered harmful" to lower market standards. He bluffed you into believing that namespaces are far too complicated for the human mind to comprehend, when in reality XHTML hadn't caught on because the CMS systems were not up to date. He did a terrific job at that, so he got hired by Google to publish a competing specification that was actually based on the way that Internet Explorer 6 parses HTML4. He did at terrific job at that, so we are finally back where we started, with a standard that lives forever while IE6 is long gone, and Goggle can scavenge the specifications from this forgotten future for ideas they can present as original. Even Mozilla played along with the HTML5 scheme, it was like watching a nuclear superpower go down in a fist fight. How can you not call that politics?

Re: Introduction to HTML Components

#140
post #67

Earlier quoted context omitted.

Adobe ImageReady... now that is giving me some flashbacks. Pun sort of intended.

we could send 60fps image diffs now, we have the bandwidth. and all the browser does is send the window size and cursor position.

We really don't.
Post reply on HN