I feel like I could benefit from some sycophants in the comments here as I’m not really sure what exactly this library is for and how it compares to other web frameworks. I haven’t closely kept up with JavaScript frameworks since I stopped regularly writing JavaScript nearly 10 years ago, so maybe there’s no hope for me but reading the comments it seems other people are also asking similar questions.
I think my main question is how it differs from (e.g.) react: is the goal to be fast or to have few or different dependencies. Or does it solve different problems to react (or fail to offer solutions to the problems that react was meant to solve)?
Web components = build your own custom HTML elements (in a nutshell). Instead of building complex interactive things with <div> <span> etc. and a mess of styling & JS, you ship a JS file and users create in their HTML <date-picker>, <file-open-dialog>, etc. that you defined.
React = component-based JS single-page app architecture, using a fully virtual DOM and event system, and a new template language called JSX to greatly simplify the dev experience.
React and web components are kinda orthogonal ideas. React gives you a framework for building apps using React's design choices (including breaking your page into small reusable JS components, much like web coomponents allow too). But React goes significantly further and has opinionated choices about how to build your app, how to template your components, etc.
Web components just give you a framework-independent way to ship new elements to browsers and users--that's it. You can (in theory) actually make a web component that wraps around a React component if you were really motivated.
Why you see so much buzz and mention about web components these days is that browsers have improved _greatly_ since React was brand new. Many of the reasons to reach for a big framework like React have gone away. You don't have to rely on a super complex build system, bundlers, webpack, etc. to ship your JS to users anymore--mainstream browsers have support to import JS modules directly. You don't have to template your components in JSX and add all the baggage and complexity of a build transpilation step--you can use ES6 template literal syntax.
And that's where stuff like Ficus appears to fit in. It's for folks who don't want to pull in the complexity of a huge framework like React, but still want to build pages with components instead of a mess of imperative JS, jquery, etc. There's a whole bunch of little micro frameworks like this popping up--check out Haunted for another example.
I think a better comparison if you want to research things further would be comparing React with a web component-based framework like lit-element. Lit-element uses web components for its components, but it adds on a lot of opinionated design choices in a similar vein as React. Is one framework 'better' than the other? Well... it entirely depends on your needs and preferences. They're all capable of building great pages and apps, it's kind of like fussing and fighting over the brand of paint that you might use as a painter.
These descriptions are helpful for a very focused view of one piece of a project. As somebody who writes lit-element every day, I miss React and Angular like crazy for everything else they solve and provide.
Interesting comment. Hopefully after building something with Ficus I can better appreciate Angular. The biggest issue I have is updating projects. Its fine if you only support 1 application but when you have 2 or 3, they start to end up on different versions and when you get back you have to spend a month updating to the latest versions, instead of adding tangible value to the product. Maybe I am just bitter as started on Angular 2 updated app to 3 then 4 then 5 then 6 then moved to another app for a year. Get back to app 1 and now we are 5 versions behind, and we are slowly moving forward again. Update to 7 this release and go from there, I guess.
Try React. Breaking changes are few and far between, generally very easy to update to (a few hours at most for a medium sized app), and they almost always introduce new "new way" of doing thing at least one release before the old way is removed (if it ever is).
Having worked in Angular 1 before there was such a distinction, and watched Angular as it exists now release and evolve... I hear you. React (and the huge JSX ecosystem) is much closer to what you created. And much more stable than all of that.
- Documentation outside of our own (O'reilly books, online courses, etc..)
- SO posts about issues and sticky points
- Patterns for implementation (lack of these is shitty for JR devs. The only place to learn is PR feedback)
- Popular style guides
- IDE plugins
...and many more. Like being able to list POPULAR_LIBRARY_FROM_JOB_DESC on a resume when I can finally leave this job where leadership prioritized the browser's needs over dev comfort and productivity
Also, the advantages of web components and shadow DOM have never shown up. They only make CSS and browser testing more difficult
I think my main question is how it differs from (e.g.) react: is the goal to be fast or to have few or different dependencies. Or does it solve different problems to react (or fail to offer solutions to the problems that react was meant to solve)?