All Projects → metametadata → Carry

metametadata / Carry

Licence: mit
ClojureScript application framework.

Programming Languages

clojure
4091 projects

Projects that are alternatives of or similar to Carry

Java Mvc Swing Monopoly
模仿大富翁游戏,使用Java Swing (GUI) 实现的单机游戏,遵循MVC设计模式。Created in Java. Using GUI developed with Swing, with a MVC design pattern.
Stars: ✭ 67 (-55.03%)
Mutual labels:  mvc, gui
Cutter
Free and Open Source Reverse Engineering Platform powered by rizin
Stars: ✭ 10,073 (+6660.4%)
Mutual labels:  gui, debugger
Pyrustic
Lightweight framework and software suite to help develop, package, and publish Python desktop applications
Stars: ✭ 75 (-49.66%)
Mutual labels:  framework, gui
Omnigui
A cross-platform GUI framework from scratch just to learn
Stars: ✭ 147 (-1.34%)
Mutual labels:  framework, gui
Rails
Ruby on Rails
Stars: ✭ 49,693 (+33251.01%)
Mutual labels:  framework, mvc
Php Mini Framework
PHP mini framework
Stars: ✭ 65 (-56.38%)
Mutual labels:  framework, mvc
Gracejs
A Nodejs BFF framework, build with koa2(基于koa2的标准前后端分离框架)
Stars: ✭ 1,302 (+773.83%)
Mutual labels:  framework, mvc
Recife
A powerful MVC Framework for GraphQL
Stars: ✭ 20 (-86.58%)
Mutual labels:  framework, mvc
Easyfxml
A collection of tools and libraries for easier development on the JavaFX platform!
Stars: ✭ 102 (-31.54%)
Mutual labels:  framework, gui
Appier
Joyful Python Web App development
Stars: ✭ 92 (-38.26%)
Mutual labels:  framework, mvc
Flexicms
Flexible site management system Flexi CMS
Stars: ✭ 61 (-59.06%)
Mutual labels:  framework, mvc
Denovel
A Deno Framework For Web Artisan - Inspired by Laravel
Stars: ✭ 128 (-14.09%)
Mutual labels:  framework, mvc
Gdbgui
Browser-based frontend to gdb (gnu debugger). Add breakpoints, view the stack, visualize data structures, and more in C, C++, Go, Rust, and Fortran. Run gdbgui from the terminal and a new tab will open in your browser.
Stars: ✭ 8,339 (+5496.64%)
Mutual labels:  debugger, gui
Ouzo
Ouzo Framework - PHP MVC ORM
Stars: ✭ 66 (-55.7%)
Mutual labels:  framework, mvc
Bast
Simple but Elegant Web Framework
Stars: ✭ 49 (-67.11%)
Mutual labels:  framework, mvc
Kales
Kotlin on Rails
Stars: ✭ 78 (-47.65%)
Mutual labels:  framework, mvc
C Sharp Console Gui Framework
A GUI framework for C# console applications
Stars: ✭ 838 (+462.42%)
Mutual labels:  framework, gui
Element
Programmatic UI for macOS
Stars: ✭ 855 (+473.83%)
Mutual labels:  framework, gui
Mini
Just an extremely simple naked PHP application, useful for small projects and quick prototypes. Some might call it a micro framework :)
Stars: ✭ 1,308 (+777.85%)
Mutual labels:  framework, mvc
Iframework
Simple Unity Framework
Stars: ✭ 110 (-26.17%)
Mutual labels:  framework, gui

Carry

ClojureScript single-page application framework inspired by re-frame, Elm Architecture, Redux and Cerebral.

Carry provides a structure for making GUI application code easier to modify, debug, test and be worked on by multiple programmers.

The core of the framework is a simple state management library. UI bindings, routing, debugger, etc. are implemented as separate optional packages.

Clojars Project Gitter Slack

Status

Stable. Was used in production.

I now focus on the successor Aide framework instead.

Features

Pattern

Carry enforces:

  • Separation of presentation code.
  • Events as first-class citizens.
  • Splitting event handling code into side-effectful and "pure" model updating phases.
  • Storing model in a single observable atom.

It also advises to decouple view and view model code in the presentation layer:

pattern

  • An app is defined by its initial model value, signal handler and action handler.
  • All app state is stored inside a single model atom.
  • Anyone can read model value at any given time and subscribe to its changes.
  • Signal handler performs side effects and dispatches actions.
  • Anyone can dispatch a new signal: signal handler, views, timers, etc.
  • Typically UI layer dispatches signals on UI events and subscribes to model changes to redraw the GUI when needed.
  • Model can be modified only by dispatching actions.
  • Only signal handler can dispatch actions.
  • Action handler is a pure function which returns a new model value based on an incoming action.

Example (counter app)

Demo, Source code

HTML:

<!doctype html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Carry • Counter</title>
    <link rel="icon" href="data:;base64,iVBORw0KGgo=">
</head>
<body>
    <div id="root"></div>
    <script src="js/compiled/frontend.js" type="text/javascript"></script>
</body>
</html>

Main file:

(ns app.core
  (:require [counter.core :as counter]
            [carry.core :as carry]
            [carry-reagent.core :as carry-reagent]
            [reagent.core :as r]))

(let [app (carry/app counter/blueprint)
      [_ app-view] (carry-reagent/connect app counter/view-model counter/view)]
    (r/render app-view (.getElementById js/document "root"))
    ((:dispatch-signal app) :on-start))

UI (using Reagent and carry-reagent):

(ns counter.core
  (:require [cljs.core.match :refer-macros [match]]
            [reagent.ratom :refer [reaction]]))

(defn view-model
  [model]
  {:counter (reaction (str "#" (:val @model)))})

(defn view
  [{:keys [counter] :as _view-model} dispatch]
  [:p
   @counter " "
   [:button {:on-click #(dispatch :on-increment)} "+"] " "
   [:button {:on-click #(dispatch :on-decrement)} "-"] " "
   [:button {:on-click #(dispatch :on-increment-if-odd)} "Increment if odd"] " "
   [:button {:on-click #(dispatch :on-increment-async)} "Increment async"]])

Blueprint:

(def -initial-model {:val 0})

(defn -on-signal
  [model signal _dispatch-signal dispatch-action]
  (match signal
         :on-start nil
         :on-stop nil

         :on-increment
         (dispatch-action :increment)

         :on-decrement
         (dispatch-action :decrement)

         :on-increment-if-odd
         (when (odd? (:val @model))
           (dispatch-action :increment))

         :on-increment-async
         (.setTimeout js/window #(dispatch-action :increment) 1000)))

(defn -on-action
  [model action]
  (match action
         :increment (update model :val inc)
         :decrement (update model :val dec)))

(def blueprint {:initial-model -initial-model
                :on-signal     -on-signal
                :on-action     -on-action})

Packages

UI Bindings

Middleware

Documentation

More information can be found at the project site:

License

Copyright © 2016 Yuri Govorushchenko.

Released under an MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].