Live data from Hacker News

FicusJS

docs.ficusjs.org

41–50 of 66 posts

Re: FicusJS

#41

Initial impressions: Looks like a relatively new project -- only 59 commits, all by one person, starting from last September. And based on a GitHub search for "ficusjs," it seems that no other projects mention it. It's only a bit over a thousand lines of code, and based on a cursory glance, the code is in pretty good shape. It should be able to fit entirely in your head, and for a lightweight framework, that's a good…

Adding initial impressions:

The first-blush API for defining a web component looks pretty nice and simple. Probably won't have the best performance in the world but that's fine for situations where I just want to sprinkle some interactivity to a server rendered or static site.

The store looks nice in some ways, but the actions/mutations language looks very boilerplatey and convoluted. I feel like I'd want something much simpler like jotai or zustand.

The event bus... seems on first blush like it'd be awkward to mix multiple event buses into a single component?

Re: FicusJS

#42

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…

Web components = build your own custom HTML elements (in a nutshell). Instead of building complex interactive things with etc. and a mess of styling & JS, you ship a JS file and users create in their HTML , , 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 an…

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.

Re: FicusJS

#43

Earlier quoted context omitted.

- Great question. The main thing I was looking for was going build-less and the section of Ficus docs kinda sold me on the idea. Seems we still need to use a dev-server to allow native imports like - https://modern-web.dev/docs/dev-server/overview/ - Which would allow testing and builds (if go that route) - Seems that you can use any renderer (uhtml, lit-html,htm, Preact), so what-ever I learn will be useable outside…

I work on LitElement and if you want to use it buildless you can do so with the JavaScript reactive properties API (so you don't need TypeScript or Babel decorators to declare properties) and Chrome 89's support for import maps. Generally, I think an import specifier rewriting dev server like Web Dev Server is the way to go since it'll work with so many other libraries out there.

I don't think you'll ever get away without a build chain using LitElement. If you are, I think your project is a toy, hobby, or very far from complete

Re: FicusJS

#44

Hi All, I use Angular 6 – 10 at work every day @day$job and have used Vue.js for some side projects / school related. Long story short have been looking into standard web components for my next side project and FicusJS seems to check all the boxes. Problem is there is almost no information about FicusJS other than what I can find linked off https://webcomponents.dev/new/ The other ones in the running are GitHub/Catal…

Stencil is the real deal. /$.02 Edit: ... if you're getting serious about standard web components per se.

Been using Stencil for the past year or so as a way of extending our Angular app with client-specific apps (eventually looking to open this up to clients to upload their own components / apps).

Overall it's done a good job but I still find the build system somewhat esoteric (there are a number of different approaches and it took some effort to figure out the right one for our use case).

I have noticed development has slowed down over the past couple months: https://github.com/ionic-team/stencil/graphs/commit-activity

Hoping it's more a case of it approaching maturity as opposed to it being neglected...

Re: FicusJS

#45
post #41

Initial impressions: Looks like a relatively new project -- only 59 commits, all by one person, starting from last September. And based on a GitHub search for "ficusjs," it seems that no other projects mention it. It's only a bit over a thousand lines of code, and based on a cursory glance, the code is in pretty good shape. It should be able to fit entirely in your head, and for a lightweight framework, that's a good…

Adding initial impressions: The first-blush API for defining a web component looks pretty nice and simple. Probably won't have the best performance in the world but that's fine for situations where I just want to sprinkle some interactivity to a server rendered or static site. The store looks nice in some ways, but the actions/mutations language looks very boilerplatey and convoluted. I feel like I'd want something m…

Thanks for the analysis.

The event bus is one of the more interesting concepts. You could have a single component that includes the HTML table/view component and the add item dialog component wrapped into one bigger component. When the add component closes fires event to the view component to refresh based on the new data. A global state object might be easier, but I have yet to jump on the global store (flux/redux/NgRx) wagon yet. Although I do look forward to learning about how Ficus implements the global store and how I can use the concept in future projects.

Re: FicusJS

#46
post #42

Earlier quoted context omitted.

Web components = build your own custom HTML elements (in a nutshell). Instead of building complex interactive things with etc. and a mess of styling & JS, you ship a JS file and users create in their HTML , , 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 an…

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.

Re: FicusJS

#47
So I recently got around to writing some code around a similar idea — enabling people to build websites using only components by treating data (the remaining bastion) as web components:

Demo page: https://mrman.gitlab.io/services-as-dom-elements/

Blog post describing the idea: https://vadosware.io/post/sade-pattern-services-as-dom-eleme...

Re: FicusJS

#48
post #4

Earlier quoted context omitted.

No experience with Ficus but others. I'd been trying to avoid that ceremony tooling/build step too. But, modern JS I've realized that's wasted effort. Embrace the suck.

I LOLed. I have had pretty good luck with Vue and jsdelivr. Would not call it speedy, but easy to get students going and runs on Glitch.com

My current favorite is RiotJS. One can still prototype things w/o ceremony in a single static html page + the tags to prototype

Re: FicusJS

#49

How is performance compared to something like LitElement, which does bare minimum DOM updates in place? Also, does this have any functionality to support data binding? Passing values down a hierarchy of components and injecting them into the DOM is half the battle with web components.

The DOM update mechanism is part of lit-html, not LitElement. This thing allows you to plug any rendered in it seems, but the examples all use lit-html.

I was implying LitHTML in my question, but yes, it's pluggable in LitElement. So I'll rephrase, how does it compare to LitHTML?

Re: FicusJS

#50

So I recently got around to writing some code around a similar idea — enabling people to build websites using only components by treating data (the remaining bastion) as web components: Demo page: https://mrman.gitlab.io/services-as-dom-elements/ Blog post describing the idea: https://vadosware.io/post/sade-pattern-services-as-dom-eleme...

Interesting read. I knew it was possible but think this is the first time seen so many web component libraries used on 1 single page. Bookmarked.
Post reply on HN