TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Fusion.js: A Plugin-Based Universal Web Framework

190 pointsby Chris911almost 7 years ago

15 comments

egeozcanalmost 7 years ago
Seems to use Flow instead of Typescript. I wish MS and FB just merged their projects already. Really unnecessary friction when their syntax is 90% the same AFAICT.
评论 #17664213 未加载
评论 #17664197 未加载
评论 #17667418 未加载
panoplyalmost 7 years ago
I'll use anything that the author of this article (Leo Horie) releases or is attached too. He is one of the greatest minds in JavaScript of this generation. After Angular, Vue and React I stumbled upon his framework Mithril.js and it was like I stumbled across the shroud of fucking turin, that framework is true poetry.
评论 #17666861 未加载
评论 #17669079 未加载
rtsaoalmost 7 years ago
The Fusion plugin system is rather powerful and enables colocation of related&#x2F;coupled code that would normally be spread across several places. For example, the Styletron plugin for Fusion (an integration for a CSS-in-JS implementation) will do several things:<p>* Wrap the application component tree in a React context provider component (which provides an instance that components will render styles into)<p>* On the server, extract rendered styles after SSR from provided instance and add necessary markup into the server-rendered page<p>* On the client, hydrate the provided instance from the server-rendered styles<p>* On the server and in development, set up a route handler that serves two assets, a web worker implementation and associated WebAssembly binary [1]<p>* On the client and in development, fetch and execute the web worker. Normally, this would be a somewhat difficult integration because of CSP-related issues with web workers, but because the plugin sets up its own route handlers, the requests will be same-origin, sidestepping most CSP issues that normally arise. Additionally, Fusion plugins can also modify response headers for requests, so if needed, CSP headers could also be set appropriately.<p>All the code to do this actually is related to a single concern, namely styling, but in a universal web app, such things typically requires the involvement of many different parts of the application lifecycle and both server and client code. Fusion plugins allow you to slice up the independent parts of your application logic in this fashion, somewhat analogous to how colocating HTML&#x2F;CSS&#x2F;JS for individual components in CSS-in-JSX is often much nicer than splitting apart component implementations across separate HTML&#x2F;CSS&#x2F;JS files.<p>[1]: This web worker generates debug CSS at runtime that maps rendered CSS to the source styled component definitions in JS using source maps, making it easier to reverse map the rendered CSS to the source CSS-in-JS when inspecting the DOM with the styles pane. <a href="https:&#x2F;&#x2F;github.com&#x2F;rtsao&#x2F;css-to-js-sourcemap" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;rtsao&#x2F;css-to-js-sourcemap</a>
keviningalmost 7 years ago
I&#x27;ve been working with the Fusion.js team for the last year now, and I think it&#x27;s evolved into a really interesting and modern web framework. Internally we&#x27;ve started rolling this framework to a few dozen web applications, and soon we will have hundreds of web apps running it. I think it&#x27;s a great choice to use as a base for high-performance and complex web applications.
navdalmost 7 years ago
Looks like a competitor to next.js, and from their docs built on koa.<p>It’s nice to see more libs in this space, but it seems a little over complicated to me with the “plugin” style arch.
评论 #17664243 未加载
评论 #17664224 未加载
swahalmost 7 years ago
The author seems to be the same person behind <a href="http:&#x2F;&#x2F;mithril.js.org" rel="nofollow">http:&#x2F;&#x2F;mithril.js.org</a>
评论 #17665611 未加载
KaoruAoiShihoalmost 7 years ago
Can someone write a sales pitch &#x2F; direct comparison to next.js please?<p>Does it only support react?
评论 #17664515 未加载
Bahamutalmost 7 years ago
The idea behind this looks awesome - if I understand correctly, this is to encourage people to program more to interfaces provided by plugins so that implementations can be swapped more easily. This does not require a type system either to use, which lowers the barrier.<p>The one thing I think should change though is decoupling from requiring Node from the runtime. I think the broader JS ecosystem could benefit from some of the ideas this library seems to promote.
polskibusalmost 7 years ago
Is this framework tightly bound to nodejs or can it be used with other backend stacks like asp.net core or spring?
评论 #17666784 未加载
wattyalmost 7 years ago
Looks awesome and love the focus on plugins. I also like some of the choices made, Redux, React Router, Security, etc. but going with Flow??<p>Our company has standardized on Typescript, it has practically &quot;won&quot;. Unfortunately for me, introducing Flow would get shot down.
评论 #17668733 未加载
megamindbrian2almost 7 years ago
Looks like Angular 1
评论 #17664769 未加载
erlichalmost 7 years ago
Have any of the maintainers used Next.js? What was your opinion? What does Fusion.js do differently&#x2F;better?
评论 #17667519 未加载
busstramalmost 7 years ago
This looks really promising. Amazing work! I hope this will catch on, so it can be improved even more.
calebmalmost 7 years ago
Dependency injection scares me as it feels like a move towards the JavaEE&#x2F;Spring world.
评论 #17672341 未加载
评论 #17670101 未加载
评论 #17665049 未加载
评论 #17665089 未加载
brilloutalmost 7 years ago
Reframe (<a href="https:&#x2F;&#x2F;github.com&#x2F;reframejs&#x2F;reframe" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;reframejs&#x2F;reframe</a>) is an alternative that focuses on flexibility.<p>Fusion.js locks you in, Reframe doesn&#x27;t.<p>(I&#x27;m Reframe&#x27;s main author.)
评论 #17671588 未加载