adl.to-selmer-routes

Application Description Language: generate routes for user interface requests.

compose-fetch-auxlist-data

(compose-fetch-auxlist-data auxlist entity application)
Compose Clojure code to fetch data to populate this `auxlist` of a form
editing a record of this `entity` within this `application`.

compose-fetch-record

(compose-fetch-record e)
Compose Clojure code to retrieve a single record of entity `e`.

compose-get-menu-options

(compose-get-menu-options property application)
Compose Clojure code to fetch from the database menu options for this
`property` within this `application`.

file-header

(file-header application)
FIXME: write docs

generate-handler-resolver

(generate-handler-resolver application)
Dodgy, dodgy, dodgy. Generate code which will look up functions in the
manual and in this namespace. I'm sure someone who really knew what they
were doing could write this more elegantly.

handler-name

(handler-name f e a m)
Generate the name of the appropriate handler function for form `f` of
entity `e` of application `a` for method `m`, where `f`, `e`, and `a`
are expected to be elements and `m` is expected to be one of the keywords
`:put` `:get`.

make-defroutes

(make-defroutes application)
Generate a `defroutes` declaration for all routes of all forms, pages and
lists within this `application`.

make-form-get-handler-content

(make-form-get-handler-content f e a n)
Compose Clojure code to form body of an HTTP `GET` handler for the form
`f` of the entity `e` within application `a`. The argument `n`
is not used.

make-form-post-handler-content

(make-form-post-handler-content f e a n)
Generate the body of the post handler for the form `f` of
entity `e` in application `a`. The argument `n` is bound to the name
of the function, but is not currently used.

Literally the only thing the post handler has to do is to
execute the database store operation. Then it can hand off
to the get handler.

make-get-handler

(make-get-handler f e a)
Generate a Clojure function to handle HTTP `GET` requests for form, list or
page `f` of entity `e` within application `a`.

make-handlers

(make-handlers e application)
Generate all the Selmer route handlers for all the forms, lists and pages
of the entity `e` within this `application`.

make-list-get-handler-content

(make-list-get-handler-content f e a n)
Compose Clojure code to form body of an HTTP `GET` handler for the list
`f` of the entity `e` within application `a`. The argument `n` is ignored.

make-page-get-handler-content

(make-page-get-handler-content f e a n)
Compose Clojure code to form body of an HTTP `GET` handler for the page
`f` of the entity `e` within application `a`. The argument `n` is ignored.

make-post-handler

(make-post-handler f e a)
Generate an HTTP `POST` handler for the page, form or list `f` of the
entity `e` of application `a`.

make-route

(make-route m n)
Make a route for method `m` to request the resource with name `n`.

to-selmer-routes

(to-selmer-routes application)
Generate a `/routes/auto.clj` file for this `application`.