Hypercrud: 用于可组合UI的clojure客户端/服务器框架

网友投稿 532 2022-10-30

Hypercrud: 用于可组合UI的clojure客户端/服务器框架

Hypercrud: 用于可组合UI的clojure客户端/服务器框架

hyperfiddle.cljc — a Hypermedia Function http://hyperfiddle-/

Hyperfiddle isolates your web clients from I/O, so your code can stay pure. If React.js is managed DOM, Hyperfiddle is managed network and database. This enables a new kind of composable primitive for constructing web software, with paradigm-changing implications.

Dependency coordinates — Todo

[com.hyperfiddle/hyperfiddle "0.0.0"]

Motivation

The hardest part of web dev is I/O: data sync between database, various services, UI and then back to the database. An async, slow, failure-prone concern wired throughout the full stack, and the reason why we all code the same web boilerplate over and over again, year after year.

Hyperfiddle makes data-sync invisible with immutability:

Fiddle graph captures service inter-dependencies as data (query X depends on queries Y and Z)Fiddle graph captures application essense (API, UI, database) as one concern – no frontend/backend dichotemyOptimizing I/O runtime – data sync reduces to a graph partitioning problemManaged data sync – Userland is not concerned with effects, async, errors or latencyTransport layer independence – swap transport strategies (e.g. REST, websocket) without changing your appDynamic transport strategies can automatically balance caching and latencyPlatform independence – run on any platform (e.g. browser, Node, mobile) without changing your app

Framework or library? Neither: Hyperfiddle is server infrastructure, like Apache or Nginx. There is a Clojure library for making custom servers (e.g. integrations and control over data sync) and a client library for talking to it.

How does it work?

The Cognitect stack has the right primitives to build "functional" data sync by orienting the entire stack around values and immutability.

Clojure/CLJC - Value-oriented programming on any platformEDN - Extensible notation for valuesTransit - Protocol for value interchange between foreign platformsDatomic - Database as a value(supplemented with React.js/Reagent)

Hyperfiddle uses the Cognitect stack as a basis to abstract over client/server data sync for APIs, by extending Datomic's immutable semantics to the API. Unlike REST/GraphQL/whatever, Hyperfiddle's data sync composes.

Managed I/O means, as a web dev, you are no longer concerned with remote data fetching or coding HTTP backends. In fact there is hardly any "web programming" left at all. But managed I/O is not the point. The point is: what does managed I/O make possible that wasn't possible before?

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:常用组件,快速开发框架(blur, fresco, volley, crash, log, ftp, update...)
下一篇:MacDBG 是一款OS X 平台简单易用的调试框架
相关文章

 发表评论

暂时没有评论,来抢沙发吧~