I guess the problem most people see is, why are we making brand new HTML elements for things that are part of HTML5 and or can be done with a simple javascript file.
<x-slider></x-slider> can be replaced by <input type="range">
<x-layout> can be replaced with CSS
<x-datepicker> can be replaced with <input type="date">
etc etc...
I just don't see any reason why we need to create a whole new set of HTML elements that are not part of any HTML spec just so you don't need to add a few more characters. And 90% of these are just polyfills which already exist.
If you want a rapid HTML5 development look up Emmet and add bootstrap or some other giant framework. Don't start making brand new HTML elements that have absolutely no meaning unless there is 150kb's of JS to read them.
Under your logic, any compilation of functionality can be reduced to vanilla, long-hand, zero-abstraction, blocks of HTML, CSS, and JS functions --> Ok everyone, dubcanada has figured out that all the packages on NPM, Bower, and Component, and all the frameworks for UI and CSS, etc, along with many of the other APIs in the DOM, are not reeeeally necessary technically speaking - why did we all waste our time on all that?!?...ugg, what a ridiculous argument.
"If you want a rapid HTML5 development look up Emmet and add bootstrap or some other giant framework" - <x-massive-sarcasm> Oh yeah, duh, why didn't I think of that - wait, there are already giant frameworks that try to provide similar functionality, with less ergonomic interfaces, that are more of a management hassle, all for the low low price of 10x the wire size! Gosh, I love things that provide less utility and weight exponentially more, sign me up! </x-massive-sarcasm>
"I just don't see any reason why we need to create a whole new set of HTML elements that are not part of any HTML" - yeah, you're right, because lord knows we have this fantastic solution right now: <div><div><div><span></span><span></span></div></div></div> - who in their right mind would ever see value in lightweight, tightly encapsulated, auto-instantiating, semantically inferred, components like this: <x-switch role="input"></x-switch>, le sigh.
"Me thinks that is what people don't like." - me thinks you're going to be eating those words by the beginning of 2015.
You seem to have this strange idea that I don't like web components. But I do. In your words, your comment is misguided for a few reasons:
A. I am all for web components, if you read the parent I was replying too. I answered his question.
B. They aren't "technically speaking"... you don't need a calendar. You can create 3 dropdowns with every date. You don't need a slider you can create a dropdown with 1 to 100. I could go on and on. The reason we do this is so it is easier to use. But "technically speaking" it is not a requirement.
Any ways you seem to be a little angry at the moment, I was never attacking the product lol. I actually like the idea, and I'm a contributor/have used extensively to Montage and Broadway. I was just answering the question that the parent asked.
Actually custom html elements are part of a spec: http://www.w3.org/TR/2013/WD-custom-elements-20130514/ This method is a much cleaner approach, separating the declaration of functionality from the declaration of style. Your <input> example is convenient but does not apply to divs or other elements that could be used.
The problem is that you run out of built-in components really quick. Not sure why Mozilla chose to start with existing controls, but the point here is that it's an easy way to introduce new controls.
'look up Emmet and add bootstrap or some other giant framework. Don't start making brand new HTML elements that have absolutely no meaning unless there is 150kb's of JS to read them.'
The problem is that every framework has a different way of writing controls. This is a standardization of the control model with built-in support in the browsers (FF and Chrome at least). Doesn't take 150kb's of JS at all, or even a framework.
>why are we making brand new HTML elements for things[?]
<div class="Foo">...</div>
vs
<x-foo>...</x-foo>
Semantically, as far as machines are concerned, there is no difference between these two. For humans, however, the latter is way easier to read if there are some lines between the opening and the closing tag.
Custom elements also allow you to create your own shadow DOM, you can have your own "native" functions, and there is also some scoping for CSS.
Maybe use an html -> html translator? I agree. Modern html and css seem like one of the most confusing things I have ever tried to do, I find it analogous to doing taxes.
<x-slider> and <x-datepicker> are sorta unique amongst the components in that they are polyfill components- they do things that some browsers already do, but many don't do yet. They're also some of the most popular UI widgets from jQuery UI. We decided to do them because we thought we could make using them much easier than most existing widgets libraries. Most components are novel functionality not found in HTML5 specifications.
Support is already under way for slider in Firefox, and the rest of the input elements are in development. Why don't you contribute to the project instead of shooting off crass remarks about what "other people", "those people", or "they", need to do.
Because I have no interest in contributing to a terrible software project just because it also happens to be a terribly outdated browser. People are in fact allowed to criticize bad decisions without being obligated to fix other people's code for them.
> <x-slider></x-slider> can be replaced by <input type="range"> <x-layout> can be replaced with CSS <x-datepicker> can be replaced with <input type="date">
Did you miss the post specifically calling them
> cross-browser polyfill implementations of existing native not-yet-globally-supported elements
Polyfill != works back to the stone age, it just means providing backwards compatible functionality. Aside from that, there are some polyfills that aren't even technically possible, or would destroy performance, in older browsers
I see the reason why we would need such things, and I am a massive fan of web components and frameworks like Montage. But I also see the other side, where realistically we are just trying to reinvent a more low level language on the web browser.
I truly hate to pile on a "meta-comment", but this is already top-of-the-page and off-topic, so: I'm getting sick of comments about "why are there always so many negative comments?". There's nothing wrong with negative comments. Constructive criticism can be negative. This is the real-world, not high-self-esteem fairyland. Negative feedback/reactions are often the most useful kind.
But comments complaining about negativity are not helping anyone. Stop complaining, just use the upvote buttons to help determine what comments you like to see rise to the top.
One concern of mine is there are so many comments about "I'm sick of comments about 'why are there so many negative comments?'" In my view, we should be very careful not to criticize people who criticize people for leaving negative comments, as non-negative comments about leaving negative comments are crucial, as are negative comments about not leaving non-negative comments.
Middlebrow dismissals are pretty much the worst. Comments complaining about them may be off-topic, but at least they have some positive purpose, unlike "I don't mean to be negative, but this is totally pointless since there is something else that's kinda similar."
Actually I would find it very informative to know if there is something similar. It puts things into perspective, says something about the novelty and gives a lead to a similar tool. I will then decide what's useful an what isn't.
The problem is, there isn't anything else kinda similar - Web Components will enable things that are impossible for libs like jQuery Mobile and jQuery UI to do presenting (with any degree of sanity). The Web Component APIs will also allow us to optimize the code paths most important to component development, again, something that will never happen for random UI framework X, Y, or Z.
Commenters are partially motivated by the upvotes they receive for astute observations, which is a good thing. But this also encourages critics to compete for that "score: 5, Insightful" by finding the first chink in the armor.
I also prefer to leave it up the voters to reward/discourage behavior, rather than content campaigning.
It is like doing a mini-qual every time a new story makes it above the fold. And it is great, because the page just sits there and I get to attack it with deep nuanced arguments about stuff it didn't think about, stupid web page.
So yes, the astute observations of which the negative ones are usually the easiest to come up with (humans are choice rankers first, creators a distant n-th) get us points, and those points give us dopamine.
Remember when EVERYONE could see the points? The problem was even worse. Really, the points should go away or be delayed.
Here's what happens to me, and I'll bet it happens to other commenters too: I read a post, and when I come to a point that seems problematic, I scan the rest of the post to see if it is addressed, then come to the comments to see if it's addressed, and if it's not, I post a comment about it.
Since no post is going to be perfect, this algorithm leads to a lot of negative comments. But they do tend to be constructive.
In addition to what others have said, I think software engineering tends to attract people prone to criticize imperfect works.
(1) I was on a bus in Manhattan a few years ago, commenting to a friend that at least 10% of software engineers must show significant symptoms of OCD. Some random woman said "It's much higher. I'm a psychologist. 10% of the general population shows OCD symptoms. The incidence much is higher in software engineers." Terrible citation, but...
(2) All engineering fields are largely about quickly finding and identifying the biggest flaw in some work. If you're positively rewarded for this behavior 50+ hours per week, it's tough to unlearn this behavior outside of the office.
Edit: changed to describe engineers rather than engineering.
I like progress but I think this deserves all the criticism it gets. Okay, so it may be a cleaner way to markup richer controls on a page but it's essentially $('.some-class').controlPlugin({ opt: ... }); (I'm not saying that's how it works).
Not to mention you still have to deal with the css and js files that the control needs. Personally I would have liked to see a better way to manage assets that these plugins (and now controls) depend on. Like some kind of way to bundle everything. Then again this whole custom html tags thing wreaks of Asp.NET WebForms.
From the article:
"
Web Components promise to open up a new realm of development by letting web developers write custom, reusable HTML tags. Think of them as JavaScript plugins without the need for additional code initialization or boilerplate markup/styling.
"
So it sounds to me that is solves for use of jQuery datepicker plugins in a framework agnostic way. I for one would like to move away from using javascript, which depends on a framework, to create styled interactions on my web pages.
Me too, I would like to move away from needing to depend on things like jquery ui, but let's not forget how we got here. It might eventually get to live up to its promises, but until all browsers are at the same place in terms of compatibility anything can happen.
I honestly think WebForms had some great ideas, it was just marred by a catastrophically ugly and leaky implementation. It's easily the most painful platform I've ever worked with, but there are some things in it that were clever and worth revisiting.
Just because you begin a comment with "I don't want to sound negative" does not make your comment any less negative.
If HN is passionate about anything lately, it's been negativity.
Rant aside, Brick is now an option for rapid HTML5 development. Why is this a bad thing? Oh right, it's not.