Upward is a JavaScript library with a declarative style. You declare how things should be, and it makes sure things are and stay that way. All CSS and HTML is written in JavaScript as well, so there's a single language to write, preprocess, and run.
In the development community's struggles to integrate the front-end technologies that have emerged for mark-up, styling, and program logic, we have created a witches’ brew. We have styles inside logic, logic inside styles, logic inside mark-up, and mark-up inside logic. We have build a tangled web of templating languages, libraries, frameworks, and CSS preprocessors. We have complex build systems to preprocess, precompile, and transpile this steaming mess. We have monstrous config objects with mysterious properties fed to black box add-ons to control magic behaviors. We build assumptions upon assumptions and dependencies upon dependencies. All of this makes our systems hard to write, debug, maintain, build, and deploy.
In Upward, in contrast, everything is logic. Mark-up and styling is all described by logic. It is a purely JS, declarative world.
Upward is not a framework. It is a library, a layer, a context for declaring the relationships among objects and dynamically keeping them up to date. Upward does not make any assumptions about what you want to do. It is ultimately unopinionated.
The Upward framework is based around
-
Upwardables, values which observe themselves
-
Upwardable functions, both built-in and user-defined, which take and return upwardables
-
Upwardable objects, whose properties are upwardables
Other features include:
-
Upwardable template strings, which auto-update to reflect changes to upwardable placeholders
-
DOM Node creation Routines such as
UpElement
andUpText
which are based on upwardables, and thus auto-update themselves -
A broad selection of upward-aware data manipulation functions such as
map
. -
An API for defining CSS, which is also upward-aware and thus dynamically changeable
-
A minimalistic, upward-aware MVC framework.
-
Utilities such as timers.
-
An upward-aware test runner.
In progress, bleeding edge, changing frenetically, unusable.
Upward is written completely in TypeScrsipt.
The environment it runs in needs to support ES6 features such as Map
and Object.observe
.
It has been tested only in Chrome.
The recommended approach to bulding an app is to rollup
.
Then include the bundle and the babel browser polyfill in your HTML page:
<script src="bundle.js"></script>
TODO: Figure out how to use the module
attribute to script tags supported by recent browsers.
Upward is help in a mono-repo (a set of yarn "workspaces" inside a single repo), containing the following sub-repos:
- @upward/core: core run-tiem
- @upward/core-src: source for core. Core is compiled from this
- @upward/tests
- @upward/samples
- @upward/samples-src
oao
is used to help manage the monorepo. You can try things like oao status
.
npm install --save-dev @upward/core
You may now refer to upward modules from inside your app via:
import {U} from 'upward';
There is nothing to build here, except the docs.
Upward comes with extensive tests using its own testing harness. This testing harness can also be used for testing Upward applications. The tests are located in the separate upward-test repo.
Copyright (c) 2014-2015 Bob Myers.
Licensed under the MIT license.
"Upward" is an acronym for "Upward Propagation With ARgument Detection", if you insist.