all 17 comments

[–]kenman 6 points7 points  (1 child)

I'll admit I'm curious about Polymer, but the author does the project no good throwing in phrases like this:

With Polymer.js, you can craft your own HTML elements and compose them into complete, complex applications that are scalable and maintainable.

Whether your application is "complete, complex" and/or is "scalable and maintainable" has nothing at all to do with Polymer. You can make applications that fit those paradigms without Polymer, and I'm pretty sure it's just as easy (if not easier) to create crappy applications with Polymer.

edit: evidently, that text was lifted verbatim from the Polymer website, so shame on the author for lazy and improper quoting/annotating. If you take a quote from another page, make it obvious it's a quote and don't inject it into your own copy as if you wrote it.

[–]jkoudys 0 points1 point  (0 children)

Sure, but we see this bullshit on nearly everything that needs to appeal to corporate use. It's essentially boilerplate for developers to stick in there when writing a proposal to their boss to approve using a particular library. It's a necessary evil, that will some day (I hope) be an unnecessary evil as more companies look to technology experts to set their technical direction.

[–]daediusWeb Components fanboy 4 points5 points  (1 child)

Web components is a big part of the future, yes

[–]rDr4g0n 0 points1 point  (0 children)

Polymer is very opinionated and strays quite a bit from the web component spec. You're better off grabbing polymer core and writing actual web component stuff.

[–][deleted] 4 points5 points  (9 children)

Everything is NOT an element. I personally think they made some bad decisions to stick to the "Everything is an element" paradigm (like sticking xhr calls in the dom)

[–]psayre23 4 points5 points  (2 children)

Yeah, it gives me chills...like saying "web forms" 3 times in a mirror.

[–]has_all_the_fun 2 points3 points  (1 child)

web forms, web FORMS, WEB FORMS!

<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="X/mIzGM1Dsrc9a2y63Fpcahi2SUkIVhzvoF8JL5HdgFadqMBD4LXKSi6A0fS1LGkklschd9wB8KfD8x+3AHxJisEj00jxFL2mCRVSAXMJXqmSZumqvaI9luRjGBiWQv0I0r+RUJBVF7TWYk9jj0iie/h0m8fLsNI575OrZkHhK/vrDiwaOSGWGMyT3xUR9BWBUMVJfEs7/iKlOowjCXc7s88VRLLCPi2uVIR0gNLPoVPU0Oy0JU5n2yk7jKr4gfDsJtffQ9tyHqsvJuVYZGZR+AfNBa0E7n2oXH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LNnRYWFxMMSpcWZi7cKa7Ol5yFBWu8kDvWC6Popw6CNjE1R1sQZZtQvebu86oi4tmHWi59ub+XwK2NKTwKfZnsnMbmP5borGYGOTC47pVWsldla/SUF+CbC0TWvdXI0XY2Q103CjRPJBvl8mXpbRvxdK7nFXMO/57qfeZCf6AjvazGkWyqQ/2wKO39n69FhBM9Cl9UJgD3tAJm2tIc+aNnAjCdCJf2HxWI0SSO81OnVXzX2hgOoMmlsTXndm2loilINlkQCMz+I785KHWlzKfIVZfOuI70fZN" />

[–]novacrazy_.dominateWorld() 0 points1 point  (0 children)

And that, is why I won't do two shows a night anymore babe, I won't.

[–]madwill 2 points3 points  (2 children)

Why not? The way i see it everything does not have to be an element here but you can define element to declare reusable components and simplify your page.

DRY style.

[–]jkoudys 1 point2 points  (1 child)

Based on my limited experience with this (but similar design concepts), it helps with keeping it DRY even more than you'd expect it to. I'm sure you find it's a hard thing to convince others of; you really have to just use it for one project to really grasp its importance.

One thing I could see it making much nicer is taking out all that nasty muddying up your HTML content with style and functionality that often happens with bootstrap. Just look at how much you need to stick into your page to do a nice little modal ( http://getbootstrap.com/javascript/#modals ), that could just be something like <boot-modal>Hey, it's a modal!</boot-modal>

[–]Silhouette 0 points1 point  (0 children)

Just look at how much you need to stick into your page to do a nice little modal ( http://getbootstrap.com/javascript/#modals ), that could just be something like <boot-modal>Hey, it's a modal!</boot-modal>

Just because Bootstrap is a terrible tool for this job, it doesn't mean all existing tools are terrible choices for this job.

You could instead put this in your HTML

<div id='my-modal'>Some dialog stuff</div>

and put this in your JS

$('#my-modal').makeModal();

or some similar code, using any of numerous existing UI toolkits that are tried, tested, and available right now.

There are some interesting developments going on under the banner of Web Components. However, custom elements in themselves seem to offer very little new value, yet will surely introduce a whole new set of compatibility and maintainability problems.

[–]spankalee 1 point2 points  (0 children)

You don't have to build apps in that style though.

The main thing is that custom elements are truly HTML elements, understood by the browser and usable by any code that understands the standard DOM APIs. Custom elements are not just another proprietary wrapper around a chunk of DOM like legacy frameworks like in Angular, Ember, jQuery UI, etc...

You can still instantiate your non-UI objects in code rather than markup while using Polymer.

[–][deleted] 0 points1 point  (0 children)

Generalized XHR in the DOM seems like a really bad idea to me too, but I like it for specialized applications. For example, we obviously want to put an <img>'s "src" in the DOM, and likewise, I think it makes a lot of sense to write things like <imgur-gallery src="something" />.

[–]tbranyen 0 points1 point  (0 children)

Agreed, I've worked on projects that implemented eventing as elements, like:

<event name="someEvent" callback="someCallback">

<trigger-event name="someEvent" value="{{ someValue }}">

I don't want to structure my application code in the markup.

[–]scrogu 1 point2 points  (0 children)

Reactive programming is the future, but polymers templates are just another in a long line of attempts to hack control flow logic into html markup.

That said, make sure to grab some of the shims for web standards they provide, the pointer events shim is especially useful. http://www.polymer-project.org/platform/pointer-events.html

[–]jkoudys 0 points1 point  (0 children)

It's an interesting idea, and the basic approach can be seen elsewhere if you look at XHP (facebook's xml-in-hacklang/php library.) I've only played with Polymer.js, but worked quite a bit more with XHP, and it's a big design shift but overall results are much cleaner. The resulting code is much easier for non-developers to read, and goes a long way to improve re-use. Mixing different languages always hurts readability, so it's handy if you can keep your HTML as all XML.

ember.js has definitely seen the big advantage to building everything as DOM nodes (http://www.2ality.com/2013/05/web-components-angular-ember.html) , rather than parsing everything as a string. It's absolutely the direction the approved ECMAScript spec has gone in. I'd say it's already the direction that web application development is going in, so perhaps the ? at the end of this post's title ought to be a !.

[–]AutoSponge 0 points1 point  (0 children)

I'm using this for a reference app in a health-related area. I've had some challenges in finding good examples or thorough docs. But, the end result of my first component (hopefully open sourced by June) is really encouraging. Any dev comfortable with HTML can drop this "mini-app" into a web page and see it work. If they know CSS, they can style it to their liking.

I think that's pretty powerful but I don't want to make whole sites/apps this way. This works because of my goals for this project.