Live data from Hacker News

Introduction to HTML Components

blog.mecheye.net

81–90 of 151 posts

Re: Introduction to HTML Components

#81

Personally, I think there's an important lesson here, and its the same lesson that polymer is learning as it stumbles around trying to convince people to use it. Most people don't actually derive much benefit from writing custom UI widget primitives. Certainly, that's a useful thing for a UI toolkit builder to be able to do, but tangibly, for most people, it's not actually useful. I don't have time to invest hours im…

Sure, certain concepts have been around and keep getting reimplemented but it's far too easy to confuse the old with the new.

One of the very real issues WebComponents solve is encapsulating the component functionality and styling away from everything else in a typical web page; you know, the basic separation of concerns stuff.

Certainly nothing that Microsoft proposed then has today's comparability and flexibility of today's offerings.

Microsoft didn't lack good ideas back then when they cared about the web; they were clueless about interoperability across devices and platforms. (IE for the Mac had a better but different rendering engine than IE for Windows did.) And because of their monopoly status then, they weren't to be trusted.

I also want to correct something the article mentioned, that Netscape was irrelevant back then due to Microsoft's cool features--not true. In fact, on any big project, developers had to essentially make two sites--one for Netscape users and one for IE users.

The "new" Microsoft it much better with getting their ideas out and working with other companies.

Re: Introduction to HTML Components

#82
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.

They are not a solution in search of a problem. They have a very clear problem statement, it's hard to orchestrate reusable front-end code. React's problem statement is roughly the same, but react seeks to provide more structure and functionality to the foundation of web components. The WebComponent spec is just trying to formalise that foundation.

Re: Introduction to HTML Components

#83
post #20

creating apps in html is like creating a spreadsheet in word. why didn't we stick to xml and use a language to transform it into ui.

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

To this day I'm absolutely flabbergasted that XHTML didn't win out. Well-formed XML documents, rather than a best-guess soup of broken HTML, was perfect. Absolutely perfect. I sat on the edge of my seat for 2-3 years waiting for the XHTML MIME type, with clients performing strict parsing, to become the new norm. It never happened. It's extremely sad if you think about it - we couldn't handle a world where developers had to conform to a very simple level of strictness. Imagine any backend language (C, Java, PHP, etc.) allowing you to get away with vomiting up garbage code with syntax errors, and having the compiler or interpreter best-guessing your program's logic. It's unfathomable! And yet, that is exactly what we have with HTML(5). Mind-boggling, to say the least.

Related aside: to this day, we still cannot write . We must use . All because of a multi-decade old description of a CDATA element. Sigh.

Re: Introduction to HTML Components

#84

Personally, I think there's an important lesson here, and its the same lesson that polymer is learning as it stumbles around trying to convince people to use it. Most people don't actually derive much benefit from writing custom UI widget primitives. Certainly, that's a useful thing for a UI toolkit builder to be able to do, but tangibly, for most people, it's not actually useful. I don't have time to invest hours im…

If you wanted to, with WebComponents you could easily use an x-PageFoo tag as a parent tag that orchestrates other child components. Your WebComponent is just a bunch of HTML, Javascript and CSS, it can really do what ever you want it to. It isn't a framework though, so to suggest that it doesn't provide as much as React is being a bit disingenuous, as it's not trying to. It's trying to formalise some of the foundations for things like react.

Smaller scale but for fun, in vanilla WebComponents (as implemented in Chrome) I put together a Slider that can then accept and consume child elements that add behaviour, like this:

   
      
      
       //Introduces left and right slider controls
       //Introduces slider dots
   

Re: Introduction to HTML Components

#85
post #20

Earlier quoted context omitted.

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

To this day I'm absolutely flabbergasted that XHTML didn't win out. Well-formed XML documents, rather than a best-guess soup of broken HTML, was perfect. Absolutely perfect . I sat on the edge of my seat for 2-3 years waiting for the XHTML MIME type, with clients performing strict parsing, to become the new norm. It never happened. It's extremely sad if you think about it - we couldn't handle a world where developers…

The Web 2.0 movement, ditching XHTML and pushing HTML 5 instead was exactly when I went back to focusing in native applications, only doing Web when required to do so.

Web Components look to at least we can get some of those ideas back, instead of writing workarounds with HTML/CSS/JavaScript.

Re: Introduction to HTML Components

#86
post #33

Earlier quoted context omitted.

The main problems I have with Polymer: * It's cumbersome to install. apt-get install npm && npm install bower && bower install ... this is about when I give up. Why not just include a 'polymer.js' file that just does all the work, no installs needed, no questions asked, CDN provided, batteries included, like every other client-side JavaScript library on the planet? Even the appropriate CSS can be loaded by the JavaSc…

There is no framework to make apps look iOSish on iOS and Androidish on Android. Back to native programming, I guess. Google's Flutter certainly creates apps (using mostly web technologies) that have the correct look and feel for Android and iOS from the same codebase. Keynote: Flutter (Dart Developer Summit 2016)» https://www.youtube.com/watch?v=Mx-AllVZ1VY

Flutter has nothing to do with web, it is native all the way down.

Re: Introduction to HTML Components

#87
post #20

creating apps in html is like creating a spreadsheet in word. why didn't we stick to xml and use a language to transform it into ui.

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

I know this is not a popular position here, but I like writing HTML directly (say, without markdown) and appreciate the optional tags and escapes. I can see a big opportunity may have been lost technically...

Re: Introduction to HTML Components

#88
post #33

Earlier quoted context omitted.

The main problems I have with Polymer: * It's cumbersome to install. apt-get install npm && npm install bower && bower install ... this is about when I give up. Why not just include a 'polymer.js' file that just does all the work, no installs needed, no questions asked, CDN provided, batteries included, like every other client-side JavaScript library on the planet? Even the appropriate CSS can be loaded by the JavaSc…

There is no framework to make apps look iOSish on iOS and Androidish on Android. Back to native programming, I guess. Google's Flutter certainly creates apps (using mostly web technologies) that have the correct look and feel for Android and iOS from the same codebase. Keynote: Flutter (Dart Developer Summit 2016)» https://www.youtube.com/watch?v=Mx-AllVZ1VY

Some react native frameworks do just that. https://nativebase.io/

Re: Introduction to HTML Components

#89
post #22

Earlier quoted context omitted.

> is good enough for me, [...] If it just was fully styleable. Browsers really should implement better selection of customizable standard widgets. Currently it requires too many hacks to re-style the built-in input elements. Web components feel a bit overkill for most cases.

Or maybe designers should learn to respect the platform's widgets' look and feel, which the user is familiar with and has possibly customized according to their preferences and accessibility needs.

Hah! You're kidding, right? Custom styling or "skins" has been one of the main drivers of app development since the beginnings of time. I feel that we, puritans, should just give up and accept what the masses want.

Re: Introduction to HTML Components

#90
post #10

Earlier quoted context omitted.

I really tried with Polymer (for the last few months) but it was particularly verbose. I remember implementing an " " tag, and thinking that this is so wild and "Out There" that I may simply never understand. Annoyingly, there is a whole "Hybrid" mode as well. So there is no distinction between V1 and V2. If you are confused,you go to the docs, they aren't giving you what you need, so you go to one of the sample elem…

Angular is a front-end framework for general purpose. Polymer is the library specifically to facilitate Web Component development only. So I think you are comparing apple and orange here.

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 and standard behavior.

Polymer is not the standard, just another arbitrary driver (as in: their own syntax, their own structures, their own api) for a pretty harmless spec that sets out to solve issues we haven't faced for at least 5 years.

Post reply on HN