Skip to content
Permalink
Browse files

docs: minor updates, an outline

  • Loading branch information...
erichanson committed Apr 29, 2019
1 parent 3424fb9 commit 68720c11ca3852044e106a34c8d69fb1ddcf5ccc
Showing with 53 additions and 7 deletions.
  1. +43 −0 docs/README.md
  2. +0 −3 docs/api.md
  3. +10 −4 docs/cheatsheet.md
@@ -0,0 +1,43 @@
# Aquameta Documentation

## Introduction

* The [Quickstart](quickstart.md) covers creating a simple "Hello World" application.
* The [Cheat Sheet](cheatsheet.md) covers the major patterns needed for creating applications.


## IDE Documentation

* Introduction
* Getting Started
* Resources
* Widgets
* `widget()`
* `widget.sync()`
* Database
*
* Bundles
* Stage
* Remotes
* Search
* Debugger
* Users and Authentication
* Settings
* Semantics


## Backend Documentation

* Overview
* Extensions
* [meta](../src/pg-extension/meta/)
* [bundle](../src/pg-extension/bundle/)
* [event](../src/pg-extension/event/)
* [filesystem](../src/pg-extension/filesystem/)
* [endpoint](../src/pg-extension/endpoint/)
* [widget](../src/pg-extension/widget/)
* [semantics](../src/pg-extension/semantics/)
* Server
* uwsgi_endpoint
* nginx
* pgfs

This file was deleted.

Oops, something went wrong.
@@ -13,12 +13,14 @@ Summary of Aquameta APIs and patterns.

This document assumes you know basic HTML, CSS, Javascript, jQuery. Some familiarity with PostgreSQL and Docker will be helpful as well.



## 1. Accessing the Database
Underneath the hood is a stock [PostgreSQL](http://postgresql.org/) database, which you can access via the command line (and someday a fancy user interface) to create schemas, tables, etc. for use in your application.

### open database shell
```sh
$ docker exec -it 0f84133a577e psql aquameta
$ psql aquameta -U yourusername
psql (9.6.0)
Type "help" for help.
@@ -72,9 +74,12 @@ aquameta=#
You can do a lot with PostgreSQL. Consult the [documentation](https://www.postgresql.org/docs/current/static/index.html) for more information.



## 2. Bundles
A bundle is a version-controlled collection of rows in the database, similar in function to a [git]() repository. The bundle management interface can be accessed via the browser at `/dev`, to manage bundles and create new ones, as well as stage and commit changes, and checkout previous versions of a repository.



## 3. Resources

A resource is a static base page that is served up at the specified `path`. You can put any HTML you want in a resource, but typically they look like this:
@@ -112,6 +117,8 @@ A resource is a static base page that is served up at the specified `path`. You
</html>
```



## 4. Widgets
Aquameta user interfaces are made up of widgets. A widget is a row in the database which contains fields of HTML, CSS and Javascript.

@@ -331,6 +338,7 @@ customers.forEach(function( customer ) {
```



## 6. Combining Widgets and Data via `widget.sync()`

Often times when we have a `AQ.Rowset`, we want to put a widget on the screen for each row in the rowset. We can of course iterate through the rowset with a `.forEach()` call, but `widget.sync` is a lot cooler.
@@ -362,6 +370,7 @@ widget.sync(customers, w.find('.customers_container'), function(customer) {
```



## 7. Communication Between Widgets

Widgets communicate with each other using DOM events via jQuery's [trigger()](http://api.jquery.com/trigger/) and [bind()](http://api.jquery.com/bind/). Trigger fires a named event that bubbles up the DOM tree, just like typical DOM events. Bind listens on a particular DOM element for events matching a particular name. When it receives one, it fires the specified function, passing it any arguments that the trigger was called with.
@@ -419,6 +428,3 @@ Clicking the "Compliment user" button calls the click handler function, which tr
## Conclusion

These are the basics of how to build apps with Aquameta. Thank you. The end.



0 comments on commit 68720c1

Please sign in to comment.
You can’t perform that action at this time.