What is the most underrated movement that could have a real affect on software?
What are the majority not thinking enough about?
What is the most underrated movement that could have a real affect on software?
What are the majority not thinking enough about?
For further actions, you may consider blocking this person and/or reporting abuse
Antonio | CEO at Litlyx.com -
Michael Tharrington -
Rose Michelle -
Jagroop Singh -
Top comments (97)
Web components are a huge advancement in the web platform, but most devs hadn't heard of them.
Do you have any recommended reading and tools to dive into this over the weekend? Thanks!
Scathing!
WELL...
There is this blog series everyone's talking about ๐
Lets Build Web Components! Part 1: The Standards
Benny Powers
MDN is also amazing
developer.mozilla.org/en-US/docs/W...
Lol, I was going to write "jQuery" but i thought that wouldn't write capture the essence of the problem ๐
How would you respond to push back? (Mostly from the React community from what I've seen)
In my humble opinion, the react community is too heavily invested in their library. I can understand that, given the runaway success of their library, but I do think the bubble will eventually burst. The wise developer will begin to sharpen their custom-elements-fu and should consider them for their next project.
React vs. Web Components is a False Dichotomy.
Since web components are browser standards, they are as usable within react components as
div
s are. There are some minor caveats surrounding custom events, due to the odd way that react works with the DOM, but there's a well-trodden cowpath for working around react's eccentricities on that front. Preact, by the way, largely mitigates those caveats.Although it's my opinion that web components are technically superior to React components because they are natively supported by the web browser instead of requiring developers to fight the browser, there is actually no contradiction between the two.
React is Tomorrow's MooTools
React is quite popular today, it's true, but that might not always be the case.
<span>
isn't going anywhere, neither isquerySelector
, but we've seen plenty of library frameworks fall to the wayside. In the mean time, web components have gained traction in the enterprise world due to their obvious future-proofing benefits, and interoperability between browsers and libraries.Today, Web Components are Widely Supported
Now that Firefox supports Shadow DOM and Custom Elements, and the Edge team has announced their intent to ship, the web component standards have truly arrived, and are a compelling feature of the platform. I don't think it's a coincidence that we've seen a lot of shade thrown on WC's on social media this past month. Now that the standards have landed it's a much more looming threat to all-js component models.
The FUD Around WC's is Unjustified
A lot of the react-world arguments against web components boil down to some variation on
But this is simply not true. The now-deprecated v0 standards are no longer supported, they've been replaced with the v1 standard, which as we've seen is widely supported.
While it's true that the low-level APIs described by the standards can be cumbersome, libraries and base classes like hybridsjs or lit-element smooth over those bumps with only a tiny addition to js page load sizes.
As far as features, web component libraries can do everything react can do and more without the VDOM overhead or the cognitive and tooling complexity added by that abstraction - Web component dev tools are browser/dom dev tools.
An Anecdote
I have a friend at a browser vendor. A few years back, his team was busy building browser UIs and features using react.js. Even as he praised the elegance of the one-way-data-flow-with-central-store architecture (now easily implemented with custom element base classes like GluonElement or LitElement and state containers like redux etc), he complained about the performance limits of the React JS library (his words). I suggested he check out web components, since with them the performance limits would be the browser itself, rather than a JS library. He shot off an IM to a coworker. It's a few years later and lo and behold, that same browser vendor is currently in the process of re-writing their UI components with their own web-component-based library.
Summary
React brought a lot of wonderful things to the web development community.
But it also brought a lot of baggage with it.
Today, you can factor a modular, component-based front-end app without any browser flags, build steps, bundling, or tooling other than the browser and a text editor. And it will run on all the major browsers.
It's clear to me that the future will be built on open standards rather than bespoke implementations. However much good React has done for the web community (and I hope I clearly recognized that good), it won't be able to compete with that.
Thanks for a really thoughtful reply!
Figured I'd provide some response from the React side of things. :-)
dev.to/dan_abramov/comment/6kdc
I'd say there's really no reason for the bad blood, and frankly, to me it feels immature at times and ill-informed. You can still use WCs in your framework. Take a look at this: custom-elements-everywhere.com for example.
Another point: Say I'm developing something with Vue, and I want to use a React component that I remembered because I used it in a different project, you'd have to hope there's a Vue version of that component, or roll your own. A web component you'd just plug and play, no matter the framework.
If you want to use your framework because of whatever reason, you can still leverage web components. Or not. Whichever is fine. You do you.
Additionally; Standards tend to outlive frameworks.
Yep, I agree. I don't think this trend is going to revert anytime soon, at least in home computing.
A friend of mine for example, totally non technical, has been telling me she wants to ditch her Macbook Pro because she doesn't know what to do with it. She bought it two or three years ago and now she uses it mainly to watch TV shows on Netflix :D Her plan is to replace it with an iPad and maybe a keyboard for when she has to type emails or invoices.
If you don't work with a computer most of the stuff you do is through a browser already.
I think the vision of the personal computer that Bill Gates talked about ages ago is being fulfilled by personal smartphones / tables, not by desktop computers. Instead of having a family PC people have personal devices and share things with each other. Nobody looks at old photos taken with the smartphone anyway :D
Lack of hard system limitations.
What? The advancement in storage, memory, network and CPU performance result in people creating unoptimized and bloated software. Wasting resources left and right. Usual excuse: there are plenty resources available (when you only run my software). Or people should simply upgrade their 3 year old device.
Just because I have a powerful system does not mean you can just consume resources as you see fit. Just because you can doesn't mean you should.
I don't mean you should optimize. Just keep the waste down. Electron is a good example of a wasteful stack for simple applications. You wouldn't use Eclipse's RCE for a chat application either.
Programming with pure functions, sometimes known as Functional Programming. All that mathy stuff associated with FP is pretty cool for expressibility and reuse, but it pales in comparison to the value of just using pure functions for as much of the code as is reasonable. With pure functions testing is easy and refactoring becomes very low risk. (Thinking typed FP... not as familiar with untyped.)
This extends to the front-end as well. The Elm Architecture has really taught me a lot in this regard. We have done epic refactors of our code base, fixing early mistakes. And because Elm code is pure, it was a bit of work, but it wasn't risky.
Writing pure functions is an investment in the code base, but it returns big over time.
Is it possible that the average dev shop is just too short sighted to really buy into FP?
I donโt think it is short-sightedness as much as inertia. Even if you have felt the benefits first hand, writing pure functions can be really difficult with the tools/languages devs generally use. Most languages expect mutation as a foundational principle. Every line of code is expected to be a side effect. It is going against the grain to do otherwise. And the reason most of our tools are like this is just the happenstance of historyโs unfolding.
So then once you resolve to use tools which normalize and expect pure functions, you then immediately have another crisis. You have no idea how to solve problems with pure functions. Itโs just different at times.
So I think it is only natural that these difficulties prevent people from giving it a try. I only started to discover the benefits myself pretty recently in my career (6 years ago?). And it wasnโt until even more recently that I began to be able to articulate specifically how it helps.
Fortunately a lot of languages have incorporated functional features. So that helps toward the familiarity of solving problems functionally. For example C# LINQ is a significantly liked feature that is basically lifted straight from FP.
Anyway, i just think itโs hard to do in most of our tools. And changing tools plus learning different ways to solve common problems is too much change at once for most of our teams. It took me multiple tries. Maybe as our tools start to incorporate more FP ideas, as they seem to be doing, the barrier will get smaller.
Moral Responsibility; the counter point of the 'because we can' with the question of 'should we'. Software Engineers have a responsibility to the general public regarding how our creations are used. Like any other tool in history software can do good, improve lives, help the disadvantaged. But i can also be used for ill-will and nefarious reasons. What is our responsibility as creators to the public?
Polyglotism. Systems thinking. Art of simplicity. Post capitalism. User empathy.
PWA and WebAssembly are two killer techs... but, people still prefer frontpage-like solutions ๐
iOS needs to stop intentionally lagging in support of PWAs
It feels pretty intentional, doesn't it? I get that they want to keep people in the app store, but at this point it seems pretty hostile to their customers...and the web in general.
I hope so... but Apple is so greedy for their apple-store subscription ๐คฌ
CSS Houdini! So so so cool!
I'm so jazzed for this to land
I've heard about it on fun fun function. Haven't yet looked into it.
Elaborate?
It will allow you to write JavaScript in order to make CSS more powerful -- it should also make it so that browser compatibility isn't an issue anymore. Here's more -- some features have started rolling out especially in Chrome's Canary and FireFox's Nightly
Ali it would be great to see a post from you about this technology.
Ethics in CS curricula
The implications of facial recognition software applied to a massive scale :)
Accessability. Time and again this one little thing is overlooked.
Raise your game; get your a11y on.
Some comments may only be visible to logged-in visitors. Sign in to view all comments.