4 ms·
It's really interesting to see these comments when I feel the struggle of not having this on a daily basis. I guess it's ultimately about how web development i
by rtpg 9y ago
It's really interesting to see these comments when I feel the struggle of not having this on a daily basis.
I guess it's ultimately about how web development is actually two things: web pages (posters) and web apps ("software")
Maybe when you're working on some one-off pages you don't feel much need for encapsulation, and in the end it's more trouble than it's worth.
Let's say you are working on a social network though. You'll need to display a "person widget" a bunch, in different contexts. Of course you want to have it be consistent throughout your app. Of course you want it to look the same. Of course you want encapsulation!
When you're writing a web app, your HTML isn't just layout but the entire interface. You're usually working with a huge team and need consistency. You want to be DRY.
If you have a style guide, you probably could benefit some from this. The proof is that things like JQuery UI exist, even if it's activated more through JS.
HTML is basically unreadable in so many cases because you can't encapsulate layout code into widgets. Having these tools lets you stay a bit sane when you need to build out a lot of workflows in a consistent manner.
- chenster 9y ago> I guess it's ultimately about how web development is actually two things: web pages (posters) and web apps ("software") This is what Progress Web Application tries[0](PWA https://en.wikipedia.org/wiki/Progressive_web_app https://en.wikipedia.org/wiki/Progressive_web_app), a fairly new spec, attempts to bridge the gap. Basically a normally web page will virtually be indistinguishable from a web app.