6 ms·
I'm pretty excited about what this will do for web components development. Polyfills have come very close, but deeply nested components can become a tangled mes
by Zikes 11y ago
I'm pretty excited about what this will do for web components development. Polyfills have come very close, but deeply nested components can become a tangled mess in no time.
If anyone is interested in getting started with web components, I recommend taking a look at Google's Polymer[1] library. It's a fairly opinionated approach, but has a relatively small learning curve.
[1] https://www.polymer-project.org/1.0/ https://www.polymer-project.org/1.0/
- IshKebab 11y agoYeah Google Play music is extremely slow in Firefox and I'm pretty sure it is because of their insane Web Components polyfill.
- spankalee 11y agoPlay Music is using an old prerelease version of Polymer. When they update to the latest production Polymer it should be much, much faster.
- ashark 11y agoAre they using it for Inbox, too? The memory use on that page. Yikes. To think I used to browse the web on 64MB of RAM without ever feeling memory-constrained. Sometimes with my e-mail client also open!
- kuschku 11y agoI’ve seen cases where I’ve opened Inbox on web on android and all apps in background crashed... The memory usage is insane.
- ashark 11y agoI just checked. My Inbox is has no mail in it (in the part I have open anyway, which is the... inbox). It is using 1.01GB of memory, 858.4MB compressed. Double-u. Tee. Eff. Docs.google.com, with a spreadsheet open? 617/585MB. Still entirely unacceptable, but lower than an empty Inbox. The difference between the two should be more than enough to run both, even with a comically generous bloat allowance. (I'd written then deleted something snarky about Google notoriously rigorous hiring practices really shines when we look at software that results, but seriously, all those smart people and this is what comes out? All their web software is embarrassingly bloated. Chrome's battery drain versus Safari? Android, which seems to take Do the Worst Thing that could Possibly Work as its guiding principle? What is going on in there? Is it some sort of organizational problem?)
- kuschku 11y agoThis is exactly the issue. The products have gotten bloated, slow, unusable on older devices, and the quality of the actual service has gotten worse, too. This is just... impossible to use. Google already is the new Microsoft, and Chrome the new IE. With this, they’re also losing any other reputation they had left. Google products once used to be about the tiniest and fastest solution, working everywhere, and using the least possible resources, without any bullshit features.
- spankalee 11y agoInbox does not use Polymer
- solidr53 11y agoInbox is NOT using Polymer in any way. But the reason why it's so resource heavy is because of it's huge DOM Tree. Web Components to the rescue!
- david-given 11y agoI rejigged my personal website using Polymer and was thoroughly impressed. It's pretty heavyweight, mostly because I'm too cheap to precompile and minify my Javascript, but the modular approach means that I can now, finally, apply actual software engineering principles to building websites. The documentation could be better, and you pretty much have to like Material Design, and there could be a richer set of standard widgets available, and it desperately needs a CDN, but other than that I found it really pleasant to use. What I haven't tried is building any kind of reactive interface. It's got some support for binding elements to data, but I didn't explore that much. Anyone care to comment?
- seivan 11y agoDid you try React before switching over? How did you enjoy data-bindings after working setState() ?
- david-given 11y agoNo, I've never touched React (mostly because it seems to require precompilation). I've been meaning to check it out at some point but the barrier of having to set up a Javascript toolchain has, so far, been too high to be worth it. Before the Polymer rewrite the trivial amount of interactive stuff on my site was raw jquery.
- mbrock 11y agoFYI, React doesn't require any precompilation. You only need to include a JavaScript file. The JSX stuff is entirely optional, although almost everyone uses it. I share your fear and loathing of JavaScript compilation toolchains, and I successfully avoided all of them on a medium-sized React project. After we had a good working prototype, we started using some more tooling, but we kept it extremely simple to start with. 1. JSX tags simply compile to calls like React.createElement("a", { href: url }, ["content"]) and if you just create a short alias for that function, you don't need JSX at all. 2. If you're anything like me, things like Flux scare you by being weirdly ideological and requiring unnecessary boilerplate. You can ignore it and just use a single object to store all your state, according to the "keep it simple, stupid" philosophy. That said, I would recommend that you look at the Redux library, which is a simple and rational approach to the nebulous "Flux" concept. Redux is simple—it's just a certain design pattern that makes sense in the React context. 3. I find React.addons.update to be the most obvious and simple way of doing immutable updates to nested structures—which is what most React programs are doing all the time. People have come up with various libraries for more sophisticated immutable data structures, but you're unlikely to need them, and React.addons.update gives you 90% of the bang. Next time I have a bit of non-stressed free time, I'd like to make a repository with an example React application that's extremely simple, requiring no tooling and as much as possible avoiding "lockin" to various newfangled libraries and paradigms...
- eob 11y agoI've been using Polymer for a few months now after following the WebComponent spec for quite a while, and I'm really liking what I'm seeing. While it can admittedly lend itself to a very Java Swing-feeling development flow, that's a breath of fresh air compared to the traditional mess of web code I usually end up with. WebComponents in general (and Polymer as a particular library on top of them) I feel are going to be a 10x force multiplier for web development.
- wichert 11y agoIt might also be interested in taking a look at Aurelia (http://aurelia.io http://aurelia.io). That is a fairly new framework (still in active development, it hasn't hit 1.0 yet) which is heavily influenced by web components and seems to implement them quite well. When using their bundling gulp task I can have a full components using app that only requires a couple of HTTP requests to load.