DEV Community

Discussion on: Stencil: I Think I Found My Frontend Home

Collapse
 
khrome83 profile image
Zane Milakovic

The big issue for me with stencil, besides looking like angular, which I didn’t like, is the state of web components.

I don’t believe in a thick client. Web components are great in concept, but they are still a thick client solution. You are forcing a lot of things into JavaScript that don’t have to be there. You are also not ready for prime time. There are issues across the board with web components.

It’s wonderful if you love the developer experience that stencil gives you. I think it’s fine that we can disagree on that.

I think it’s really bad for the output of that to be a experience that has gaps in browser support without a lot of polyfills, and moves things into a thick client so the developer experience could be what you had.

This is why I don’t care for react as well.

Svelte is the closest I found to something that gives me the output I want. But only when paired with static site generation. And even then, you end up with things that end up as templates in h Th e JS bundle that should remain as CSS and JS.

I also don’t think we should of moved routing to the client over the server. I have unpopular opinions, but I have been doing this for 20 years.

Collapse
 
deciduously profile image
Ben Lovy • Edited

I don’t believe in a thick client.

This has generally been my leaning too, and why I like writing web servers a lot more than web clients - you're right, this is primarily a developer experience choice, but also partially educational. At least near me, TypeScript is a commonly seen job skill, and part of my motivation is working on it. I guess there's nothing stopping me from doing this in Node, which I hadn't really considered.

In general, all of these concerns are more than valid, and it's important to make sure there's continued development in that direction too. However, it is a reality, and becoming versed in it is important.

Svelte is the closest I found to something that gives me the output I want

When you refer to static site generation, do you mean Sapper specifically?

Collapse
 
khrome83 profile image
Zane Milakovic • Edited

Yeah. Sapper is not ready for prime time as a live server imho.

I use sapper for my personal blog and for my company. The work I do for my company is a heavily modified version that solved a number of pain points. We opened PR for all of them to contribute back, but they have been siting since October.

But we made a decision to only use it for static gen.

Collapse
 
jefftopia profile image
Jeff • Edited

Looking like Angular

I do think it's odd to not prefer Stencil because of the way it looks, especially given how esoteric and non-standards-like Svelte is. But that's just me.

As far as browser support and output: Stencil is building on an actual standard. The output is standards-compliant JS plus a couple of helpful utils. Every JS library does this, almost by definition. And Stencil's impact is small: smaller than react, angulary, vue, litelement, or svelt. ionicframework.com/blog/announcing...

Collapse
 
khrome83 profile image
Zane Milakovic

I mean there are many more reasons. I just don’t care for how Angular looks. But my comments were more about thick clients and the state of web components.

Web components are a standard. That is true. I am 100 percent on board with standards. But we are not ready for them. And the standard we ended up with is much worse than the standard we were suppose to get (thanks Safari).

Nothing I have seen has shown the output as smaller than Svelte. One of the reasons we ruled it out was because of browser support, and output size. But I may be miss remembering.

Either way, I will jump on web components, when it makes sense for the work that I do, and if the adoption curve gets better by the community.

In general, building them without a framework does not appeal to me. Having them, even if they are standard, does not appeal to me for numerous reasons. And using a framework to improve the developer experience, cool. But then I should be using something that builds something I actually want. Hence Svelte.

I am not hating on Stencil. It’s fine. I just don’t think I want this thick client web we make every site out of. And the current standard of web components does little to mitigate that, if we put css and html in JS.

Thread Thread
 
jefftopia profile image
Jeff

"But we are not ready for them"

Why do you say that? I definitely think we're ready for them. Apple, Amazon, and Google are all shipping them to prod.

"Nothing I have seen has shown the output smaller than Svelte"

Open the article I posted earlier and check for yourself.

Stencil is the opposite of Thick UI. 0 framework, 0 esoteric syntax as in Svelte's case, just pure web-based development with a small vdom.

Thread Thread
 
khrome83 profile image
Zane Milakovic

pianomanfrazier.com/post/comparing...

This is just one example. But yeah, it’s larger.

Web Components still require polyfills. The argument that these big companies ship them is fine, if you have the same user base as those companies and can alienate the same set of browser users.

I still have to support IE 11 for example. caniuse.com/#search=Web%20components

I mean, if they work for you, and your happy with the framework. Congrats. I don’t need to keep going against every point you want to try and dismiss. It’s simple. Moving CSS and HTML into JS is thick client still. Might be lighter weight than a virtual dom, but it has ramifications. I have to support a wider range of users than you, and hence can’t use the features without polyfills.

So like I said before, I don’t feel we are ready for mass adoptions. Most websites can’t abandon IE11 or Edge. And I won’t use a collection of polyfills just so I can develop with a framework. Why punish the user. They don’t care that your using web components. They just want the site to be fast and work. So use the technology that does that the best. For me, that is Svelte or just native HTML, CSS and JS.