Hacker News new | past | comments | ask | show | jobs | submit login

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.

Me thinks that is what people don't like.




Your comment is misguided for a few reasons:

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.


'etc etc...'

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.


>they do things that some browsers already do, but many don't do yet.

So since their browser happens to be one that doesn't do those things, why don't they fix their browser?


"They" is a funny word. It can easily include disparate groups of people while making them sound like they're the same.


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

?


I know exactly what it does. It's not a polyfill though as it supports IE9+... A polyfill is support for old browsers that don't have native support.


> It's not a polyfill though as it supports IE9+... A polyfill is support for old browsers that don't have native support.

And thus it is a polyfill indeed, since IE9 does not support HTML5 input types (and more generally HTML5 form extensions).


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


Do you not consider anything a polyfill if it doesn't support IE 1.0?


What if I wanted to just display a calendar and not a date picker?


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.


In that case an x-calendar element is conceivable. In fact, the date picker could use that as its content.

Luckily, Brick is open source, so you can file an Issue about it, and if you're interested, even submit a pull request yourself.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: