An unofficial client for RALLY
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
test/routes
.gitignore
CHANGELOG.md
LICENSE
README.md
_envrc
client.js
package.json
server.js
tsconfig.json
typings.json

README.md

rally-rxjs

An unofficial client for RALLY.

This is a bouzuya/b-o-a example.

This is a bouzuya/vdom-rxjs-ssr fork.

Usage

$ npm install
$ npm run build
$ npm start
$ open http://localhost:3000/

Note

directories and files

actions/        ... `type AT = A<P>; type P = ...;`
maps/           ... `type f = (action$: O<A>, state$: O<PT>) => O<A>;`
handlers/       ... `type Handler = (action$: O<A>, options: any) => O<A>;`
inits/          ... `type init = (params: any) => Promise<PT>`
props/          ... `type p = (action$: O<A>, state: <PT>) => O<PT>;`
types/          ... `type PT = { ... };`
requests/       ... `type request = (params: any) => Promise<PT>;`
routes/         ... route config file
styles/         ... less files
views/          ... `type view = (state: PT, helpers: any) => V;`
app.ts          ... `type app = (action$: O<A>, options: any) => O<A>;`
client.ts       ... client entry point. configure handlers and run app.
server.ts       ... server entry point. configure handlers and run app.

A: Action
O: Observable
PT: PropertyType
V: VTree

actions

init -> load

title: init -> load
participant Browser as B
participant Client as C
participant Server as S
B->S: http get
S->S: init state
S-->B: initial html & state
B->B: render html
B->C: run js (app)
C->C: load state
C->B: render to dom

click -> request -> render

title: click -> request -> render
participant Browser as B
participant Client as C
participant Server as S
B->C: click event
C->C: user action (click -> fetch)
C->S: fetch
S-->C: json
C->C: user action (res -> update)
C->B: render

These diagram were generated by js-sequence-diagram.

action cycle

      O<A> |
   +------>|-------+
   |       |       |
   |       |       |
FW |       |       | AP
   |       |       |
   |       |       |
   +-------|<------+
           | O<A>

O : Observable
A : Action
AP : Application
FW : Framework

rally-rxjs

CHANGELOG

License

MIT

Author

bouzuya <m@bouzuya.net> (http://bouzuya.net)