Can't wait for 2–5 years from now when most of these have failed, and the One True Way emerges.
Don't bother waiting. By that time there will be another set of frameworks.
Ways to make a web component
81–90 of 200 posts
Re: Ways to make a web component
#82I thought this was a joke at first.
But it suddenly made sense in the context of modern web frameworks and micropackages and all these different ways of doing the same thing.
But wait, I thought. Surely it was a typo and they meant to type "3" and fat-fingered it instead?
But no. It really is 33.
Which one of those 33 would be the best way of doing things for me? How much time would I have to spend evaluating enough of them?
I'm going back to HTML 4.
Re: Ways to make a web component
#83It infuriates me that the concept of composable web pages using small templates/components is not baked into the html spec and supported by browsers. Every bit of code that we write in any programming language is made of composable bits which can be imported into other bits of code. But we cannot do anything similar with html. every time any attempt at having composable component based html is made, it gets mired dow…
I appreciate how Web Components are not opinionated meanwhile Component libraries are free to innovate and build on the Web Component foundation.
Re: Ways to make a web component
#84It infuriates me that the concept of composable web pages using small templates/components is not baked into the html spec and supported by browsers. Every bit of code that we write in any programming language is made of composable bits which can be imported into other bits of code. But we cannot do anything similar with html. every time any attempt at having composable component based html is made, it gets mired dow…
Re: Ways to make a web component
#85This is neat, but I wish there were more examples than just a counter. I would never use something like Angular, React, or Vue to implement something so trivial.
Yes, the counter is simple. One reason is obviously that writing something in 30+ different framework that you need to "learn" is quite some work :) (10x more that I initially thought :D) The other reason is that a simple component actually amplify the cost of the framework. And if you think about it, with a more complex component, what you have is more HTML, more CSS and more JS but they are essentially always the s…
Ah, this is where you can use the Internet to your advantage. If you ask for help in advance, you generally won't get it, but if you post something broken or dodgy people will come out of the woodwork to correct you. So you don't need to work so hard to be correct. Just post something. Anything.
If that still isn't enough for some particular framework, just post something less than entirely complimentary about it ("I'm not entirely sure this framework is the best thing since sliced bread") and you'll be sure to get support, with a side helping of flamewar impugnment of your motives, intelligence, and ancestry, along with pithy observations about your obvious inability to recognize sliced bread if it was placed directly on your face. If you can ignore the latter you can get a lot of cross-framework comparisons done with surprisingly little effort on your part.
Re: Ways to make a web component
#86Web components to me represent the architecture I’d like to have. I think a good arch could be: 1. Build a rails/django type site, make everything work vanilla http+html etc. 2. Create standalone web components for the places you need some more interactivity, like type-ahead search box, “click to add” type thing, or a datatable So most of your performance stuff could be handled/improved on the server, focus on aggres…
It's a Rails-like framework written in Elixir (piggyback-ing off 30 years of BEAM), and LiveView changes the game by allowing you to build rich front-end application from your backend.
The way it works is that it serves you static HTML on initial load (yay SEO), and then it establishes a websocket connection to the server (very efficient thanks for BEAM), and every subsequent user interaction sends a event_name which you handle on the backend, and the backend respond with only the changed data (Phoenix can intelligently track your changes so it only sends what has actually changed), and then morphdom on the browser side patches things onto front-end.
You get the full power of interactivity but you barely have to touch any front end at all (and if you really do, it plays super well with AlpineJS, so you still get that escape hatch).
All in all, LiveView is amazing (and the surrounding technology), I just wish more people know about it!
Re: Ways to make a web component
#87Earlier quoted context omitted.
I appreciate how Web Components are not opinionated meanwhile Component libraries are free to innovate and build on the Web Component foundation.
I also love this aspect. You can experiment new things on some components without affecting the entire application.
Re: Ways to make a web component
#88Web components to me represent the architecture I’d like to have. I think a good arch could be: 1. Build a rails/django type site, make everything work vanilla http+html etc. 2. Create standalone web components for the places you need some more interactivity, like type-ahead search box, “click to add” type thing, or a datatable So most of your performance stuff could be handled/improved on the server, focus on aggres…
Have you heard about Phoenix LiveView? Sounds like what you want. It's a Rails-like framework written in Elixir (piggyback-ing off 30 years of BEAM), and LiveView changes the game by allowing you to build rich front-end application from your backend. The way it works is that it serves you static HTML on initial load (yay SEO), and then it establishes a websocket connection to the server (very efficient thanks for BEA…
Re: Ways to make a web component
#89It infuriates me that the concept of composable web pages using small templates/components is not baked into the html spec and supported by browsers. Every bit of code that we write in any programming language is made of composable bits which can be imported into other bits of code. But we cannot do anything similar with html. every time any attempt at having composable component based html is made, it gets mired dow…
SVG has the concept of re-usable components. Maybe in 10 years we can replace HTML with SVG. hides I'm sure that would make it much, much harder for people with accessible needs.
Re: Ways to make a web component
#90I love the simplicity of StencilJS. Not sure why it's adoption is so low but those guys have put a lot of work. Much better than what Google is doing with Lit Element.