The reblocks Reference Manual

This is the reblocks Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Thu Feb 15 07:19:52 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 reblocks

A Common Lisp web framework, successor of the Weblocks.

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependencies
Source

reblocks.asd.


2.2 reblocks/app

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependencies
Source

reblocks.asd.


2.3 reblocks/app-mop

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependencies
  • metatilities (system).
  • closer-mop (system).
Source

reblocks.asd.


2.4 reblocks/js/base

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependencies
  • parenscript (system).
  • reblocks/html (system).
  • cl-ppcre (system).
Source

reblocks.asd.


2.5 reblocks/html

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependency

spinneret (system).

Source

reblocks.asd.


2.6 reblocks/utils/string

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependencies
  • cl-fad (system).
  • metatilities (system).
Source

reblocks.asd.


2.7 reblocks/utils/list

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependency

anaphora (system).

Source

reblocks.asd.


2.8 reblocks/variables

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependency

serapeum (system).

Source

reblocks.asd.


2.9 reblocks/server

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependencies
Source

reblocks.asd.


2.10 reblocks/session

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependencies
  • alexandria (system).
  • log4cl (system).
  • lack-util (system).
  • lack-middleware-session (system).
  • lack-middleware-session (system).
  • bordeaux-threads (system).
  • trivial-garbage (system).
  • metatilities (system).
  • lack-middleware-session (system).
Source

reblocks.asd.


2.11 reblocks/hooks

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependencies
  • f-underscore (system).
  • reblocks/session (system).
  • log4cl (system).
  • metatilities (system).
  • alexandria (system).
  • 40ants-doc (system).
  • 40ants-doc/ignored-words (system).
Source

reblocks.asd.


2.12 reblocks/routes

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependency

routes (system).

Source

reblocks.asd.


2.13 reblocks/routes-error-handler

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependencies
Source

reblocks.asd.


2.14 reblocks/error-handler

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependencies
Source

reblocks.asd.


2.15 reblocks/debug

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependencies
Source

reblocks.asd.


2.16 reblocks/request

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependencies
Source

reblocks.asd.


2.17 reblocks/utils/uri

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependencies
  • f-underscore (system).
  • puri (system).
  • quri (system).
  • cl-ppcre (system).
Source

reblocks.asd.


2.18 reblocks/session-reset

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependencies
Source

reblocks.asd.


2.19 reblocks/response

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependencies
Source

reblocks.asd.


2.20 reblocks/commands

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependencies
  • alexandria (system).
  • parenscript (system).
Source

reblocks.asd.


2.21 reblocks/page

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependencies
Source

reblocks.asd.


2.22 reblocks/dependencies

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependencies
Source

reblocks.asd.


2.23 reblocks/utils/misc

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependencies
  • salza2 (system).
  • ironclad (system).
  • babel (system).
  • anaphora (system).
  • f-underscore (system).
  • closer-mop (system).
Source

reblocks.asd.


2.24 reblocks/widgets/dom

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependencies
Source

reblocks.asd.


2.25 reblocks/request-handler

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependencies
Source

reblocks.asd.


2.26 reblocks/widget

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependencies
Source

reblocks.asd.


2.27 reblocks/widgets/mop

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependencies
  • anaphora (system).
  • closer-mop (system).
Source

reblocks.asd.


2.28 reblocks/page-dependencies

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependencies
Source

reblocks.asd.


2.29 reblocks/actions

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependencies
Source

reblocks.asd.


2.30 reblocks/app-actions

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Source

reblocks.asd.


2.31 reblocks/utils/timing

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependencies
  • alexandria (system).
  • log4cl (system).
Source

reblocks.asd.


2.32 reblocks/dependencies-impl

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependencies
Source

reblocks.asd.


2.33 reblocks/welcome/app

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependency

reblocks/app (system).

Source

reblocks.asd.


2.34 reblocks/default-init

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependencies
Source

reblocks.asd.


2.35 reblocks/widgets/string-widget

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependencies
Source

reblocks.asd.


2.36 reblocks/commands-hook

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependencies
Source

reblocks.asd.


2.37 reblocks/widgets/funcall-widget

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependency

reblocks/widget (system).

Source

reblocks.asd.


2.38 reblocks/welcome/widget

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependencies
Source

reblocks.asd.


2.39 reblocks/utils/clos

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependencies
  • closer-mop (system).
  • alexandria (system).
  • metatilities (system).
Source

reblocks.asd.


2.40 reblocks/utils/i18n

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Source

reblocks.asd.


2.41 reblocks/preview

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependencies
Source

reblocks.asd.


2.42 reblocks/js/jquery

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependencies
Source

reblocks.asd.


2.43 reblocks/js

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependency

reblocks/js/base (system).

Source

reblocks.asd.


2.44 reblocks/app-dependencies

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependencies
Source

reblocks.asd.


2.45 reblocks/widgets/render-methods

Maintainer

Alexander Artemenko

Author

Alexander Artemenko

Home Page

https://40ants.com/reblocks/

Source Control

(GIT https://github.com/40ants/reblocks)

License

LLGPL

Dependencies
Source

reblocks.asd.


3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.2 reblocks/app/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/app (system).

Packages

reblocks/app.

Public Interface
Internals

3.1.3 reblocks/app-mop/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/app-mop (system).

Packages

reblocks/app-mop.

Public Interface
Internals

3.1.4 reblocks/js/base/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/js/base (system).

Packages

reblocks/js/base.

Public Interface
Internals

3.1.5 reblocks/html/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/html (system).

Packages

reblocks/html.

Public Interface
Internals

get-rendered-chunk (function).


3.1.6 reblocks/utils/string/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/utils/string (system).

Packages

reblocks/utils/string.

Public Interface
Internals

3.1.7 reblocks/utils/list/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/utils/list (system).

Packages

reblocks/utils/list.

Public Interface
Internals

3.1.8 reblocks/variables/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/variables (system).

Packages

reblocks/variables.

Public Interface

3.1.9 reblocks/server/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/server (system).

Packages

reblocks/server.

Public Interface
Internals

3.1.10 reblocks/session/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/session (system).

Packages

reblocks/session.

Public Interface
Internals

3.1.11 reblocks/hooks/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/hooks (system).

Packages

reblocks/hooks.

Public Interface
Internals

3.1.12 reblocks/routes/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/routes (system).

Packages

reblocks/routes.

Public Interface
Internals

3.1.13 reblocks/routes-error-handler/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/routes-error-handler (system).

Packages

reblocks/routes-error-handler.

Public Interface

serve (method).


3.1.14 reblocks/error-handler/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/error-handler (system).

Packages

reblocks/error-handler.

Public Interface

on-error (generic function).

Internals

3.1.15 reblocks/debug/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/debug (system).

Packages

reblocks/debug.

Public Interface
Internals

3.1.16 reblocks/request/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/request (system).

Packages

reblocks/request.

Public Interface
Internals

3.1.17 reblocks/utils/uri/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/utils/uri (system).

Packages

reblocks/utils/uri.

Public Interface

remove-parameter-from-uri (function).

Internals

3.1.18 reblocks/session-reset/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/session-reset (system).

Packages

reblocks/session-reset.

Public Interface

reset (function).

Internals

reset-session (function).


3.1.19 reblocks/response/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/response (system).

Packages

reblocks/response.

Public Interface
Internals

3.1.20 reblocks/commands/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/commands (system).

Packages

reblocks/commands.

Public Interface
Internals

3.1.21 reblocks/page/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/page (system).

Packages

reblocks/page.

Public Interface
Internals

3.1.22 reblocks/dependencies/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/dependencies (system).

Packages

reblocks/dependencies.

Public Interface
Internals

3.1.23 reblocks/utils/misc/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/utils/misc (system).

Packages

reblocks/utils/misc.

Public Interface
Internals

3.1.24 reblocks/widgets/dom/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/widgets/dom (system).

Packages

reblocks/widgets/dom.

Public Interface
Internals

ensure-dom-id (generic function).


3.1.25 reblocks/request-handler/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/request-handler (system).

Packages

reblocks/request-handler.

Public Interface
Internals

3.1.26 reblocks/widget/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/widget (system).

Packages

reblocks/widget.

Public Interface
Internals

3.1.28 reblocks/page-dependencies/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/page-dependencies (system).

Packages

reblocks/page-dependencies.

Public Interface
Internals

3.1.29 reblocks/actions/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/actions (system).

Packages

reblocks/actions.

Public Interface
Internals

3.1.30 reblocks/app-actions/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/app-actions (system).

Packages

reblocks/app-actions.

Public Interface
Internals

3.1.31 reblocks/utils/timing/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/utils/timing (system).

Packages

reblocks/utils/timing.

Public Interface
Internals

3.1.32 reblocks/dependencies-impl/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/dependencies-impl (system).

Packages

reblocks/dependencies-impl.

Public Interface

render-in-ajax-response (method).


3.1.33 reblocks/welcome/app/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/welcome/app (system).

Packages

reblocks/welcome/app.

Internals

welcome-screen-app (class).


3.1.34 reblocks/default-init/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/default-init (system).

Packages

reblocks/default-init.

Public Interface
Internals

3.1.35 reblocks/widgets/string-widget/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/widgets/string-widget (system).

Packages

reblocks/widgets/string-widget.

Public Interface

3.1.36 reblocks/commands-hook/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/commands-hook (system).

Packages

reblocks/commands-hook.


3.1.37 reblocks/widgets/funcall-widget/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/widgets/funcall-widget (system).

Packages

reblocks/widgets/funcall-widget.

Public Interface
Internals

3.1.38 reblocks/welcome/widget/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/welcome/widget (system).

Packages

reblocks/welcome/widget.

Public Interface
Internals

welcome-screen-widget (class).


3.1.39 reblocks/utils/clos/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/utils/clos (system).

Packages

reblocks/utils/clos.

Public Interface

3.1.40 reblocks/utils/i18n/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/utils/i18n (system).

Packages

reblocks/utils/i18n.

Public Interface

3.1.41 reblocks/preview/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/preview (system).

Packages

reblocks/preview.

Public Interface
Internals

3.1.42 reblocks/js/jquery/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/js/jquery (system).

Packages

reblocks/js/jquery.

Public Interface
Internals

3.1.43 reblocks/js/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/js (system).

Packages

reblocks/js.


3.1.44 reblocks/app-dependencies/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/app-dependencies (system).

Packages

reblocks/app-dependencies.

Public Interface

get-dependencies (method).


3.1.45 reblocks/widgets/render-methods/file-type.lisp

Source

reblocks.asd.

Parent Component

reblocks/widgets/render-methods (system).

Packages

reblocks/widgets/render-methods.

Public Interface

4 Packages

Packages are listed by definition order.


4.1 reblocks/welcome/widget

Source

file-type.lisp.

Use List

common-lisp.

Internals

welcome-screen-widget (class).


4.2 reblocks/debug

Source

file-type.lisp.

Use List

common-lisp.

Public Interface
Internals

4.3 reblocks/js

Source

file-type.lisp.

Use List

4.4 reblocks/request

Source

file-type.lisp.

Use List

common-lisp.

Public Interface
Internals

4.5 reblocks/server

Source

file-type.lisp.

Use List

common-lisp.

Public Interface
Internals

4.6 reblocks/app-mop

Source

file-type.lisp.

Use List

common-lisp.

Public Interface
Internals

4.7 reblocks/utils/string

Source

file-type.lisp.

Use List

common-lisp.

Public Interface
Internals

4.8 reblocks/widgets/dom

Source

file-type.lisp.

Use List

common-lisp.

Public Interface
Internals

ensure-dom-id (generic function).


4.9 reblocks/preview

Source

file-type.lisp.

Use List

common-lisp.

Public Interface
Internals

4.10 reblocks/utils/misc

Source

file-type.lisp.

Use List

common-lisp.

Public Interface
Internals

4.11 reblocks/widgets/mop

Source

file-type.lisp.

Use List

common-lisp.

Public Interface

widget-class (class).

Internals

4.12 reblocks/request-handler

Source

file-type.lisp.

Use List

common-lisp.

Public Interface
Internals

4.13 reblocks/default-init

Source

file-type.lisp.

Use List

common-lisp.

Internals

4.14 reblocks/widget

Source

file-type.lisp.

Use List

common-lisp.

Public Interface
Internals

4.15 reblocks/app

Source

file-type.lisp.

Use List
  • common-lisp.
  • f-underscore.
Public Interface
Internals

4.16 reblocks/widgets/funcall-widget

Source

file-type.lisp.

Use List

common-lisp.

Public Interface

make-funcall-widget (function).

Internals

4.17 reblocks/utils/timing

Source

file-type.lisp.

Use List

common-lisp.

Public Interface
Internals

4.18 reblocks/commands

Source

file-type.lisp.

Use List

common-lisp.

Public Interface
Internals

4.19 reblocks/routes-error-handler

Source

file-type.lisp.

Use List

common-lisp.


4.20 reblocks/app-actions

Source

file-type.lisp.

Use List

common-lisp.

Public Interface
Internals

4.21 reblocks/commands-hook

Source

file-type.lisp.

Use List

common-lisp.


4.22 reblocks/response

Source

file-type.lisp.

Use List

common-lisp.

Public Interface
Internals

4.23 reblocks/dependencies

Source

file-type.lisp.

Use List

common-lisp.

Public Interface
Internals

4.24 reblocks/routes

Source

file-type.lisp.

Use List

common-lisp.

Public Interface
Internals

4.25 reblocks/utils/i18n

Source

file-type.lisp.

Use List

common-lisp.

Public Interface

4.26 reblocks/session

Source

file-type.lisp.

Use List

common-lisp.

Public Interface
Internals

4.27 reblocks/actions

Source

file-type.lisp.

Use List

common-lisp.

Public Interface
Internals

4.28 reblocks/app-dependencies

Source

file-type.lisp.

Use List

common-lisp.


4.29 reblocks/error-handler

Source

file-type.lisp.

Use List

common-lisp.

Public Interface

on-error (generic function).

Internals

4.30 reblocks/utils/uri

Source

file-type.lisp.

Use List
  • common-lisp.
  • f-underscore.
Public Interface

remove-parameter-from-uri (function).

Internals

4.31 reblocks/widgets/render-methods

Source

file-type.lisp.

Use List

common-lisp.


4.32 reblocks/variables

Source

file-type.lisp.

Use List

common-lisp.

Public Interface

4.33 reblocks/page

Source

file-type.lisp.

Use List

common-lisp.

Public Interface
Internals

4.34 reblocks/js/jquery

Source

file-type.lisp.

Use List

common-lisp.

Internals

4.35 reblocks/hooks

Source

file-type.lisp.

Use List
  • common-lisp.
  • f-underscore.
Public Interface
Internals

4.36 reblocks/welcome/app

Source

file-type.lisp.

Use List

common-lisp.

Internals

welcome-screen-app (class).


4.37 reblocks/utils/list

Source

file-type.lisp.

Use List

common-lisp.

Public Interface
Internals

4.38 reblocks/session-reset

Source

file-type.lisp.

Use List

common-lisp.

Internals

reset-session (function).


4.39 reblocks/widgets/string-widget

Source

file-type.lisp.

Use List

common-lisp.

Public Interface

4.40 reblocks/js/base

Source

file-type.lisp.

Use List

common-lisp.

Used By List

reblocks/js.

Public Interface
Internals

4.41 reblocks/page-dependencies

Source

file-type.lisp.

Use List

common-lisp.

Public Interface
Internals

*page-dependencies* (special variable).


4.42 reblocks/utils/clos

Source

file-type.lisp.

Use List

common-lisp.

Public Interface

4.43 reblocks/dependencies-impl

Source

file-type.lisp.

Use List

common-lisp.


4.44 reblocks/html

Source

file-type.lisp.

Use List

common-lisp.

Public Interface
Internals

get-rendered-chunk (function).


5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Special variables

Special Variable: *action-string*

A string used to pass actions from a client to the server. See ’reblocks/request:get-request-action’.

Package

reblocks/variables.

Source

file-type.lisp.

Special Variable: *backtrace-on-session-init-error*
Package

reblocks/variables.

Source

file-type.lisp.

Special Variable: *cache-remote-dependencies-in*

If this variable is set to a pathname, then
remote dependencies will be cached and served as local dependencies.

This pathname should point to a directory where cached dependencies will be stored.

Package

reblocks/dependencies.

Source

file-type.lisp.

Special Variable: *current-app*

A currently active web application.

Package

reblocks/variables.

Source

file-type.lisp.

Special Variable: *default-content-type*
Package

reblocks/variables.

Source

file-type.lisp.

Special Variable: *default-samesite-policy*

Default value for SameSite header.

You will find more at [Mozilla docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite).

Package

reblocks/server.

Source

file-type.lisp.

Special Variable: *delay-between-pages-cleanup*

A number of seconds between expired pages cleanup.

Package

reblocks/variables.

Source

file-type.lisp.

Special Variable: *enable-timings*
Package

reblocks/utils/timing.

Source

file-type.lisp.

Special Variable: *extend-page-expiration-by*

A number of seconds to be added to current page expiration time when a new action is processed.

After an action processing page expiration time either will remain the same or become equal to (+ (now) *extend-page-expiration-by*).

By default, the variable is unbound and the value of *PAGES-EXPIRE-IN* is used.

Package

reblocks/variables.

Source

file-type.lisp.

Special Variable: *ignore-missing-actions*
Package

reblocks/variables.

Source

file-type.lisp.

Special Variable: *invoke-debugger-on-error*

If this variable is t, then Weblocks will start lisp’s debugger on unhandled conditions.

Package

reblocks/variables.

Source

file-type.lisp.

Special Variable: *lang*

Language to add into the root html element.

Package

reblocks/html.

Source

file-type.lisp.

Special Variable: *latest-request*

Stores last request if debug mode was enabled.

Package

reblocks/debug.

Source

file-type.lisp.

Special Variable: *latest-session*

Stores last session, to be able to clear it during development.

To clear, use function (reset-last-session).

Package

reblocks/debug.

Source

file-type.lisp.

Special Variable: *max-pages-per-session*

A number of pages per session. When it is reached, oldest pages and their actions will be expired. If NIL, then actions will live in memory forever.

Package

reblocks/variables.

Source

file-type.lisp.

Special Variable: *pages-expire-in*

A number of seconds before page and it’s actions expiration. If NIL, then actions will live in memory forever.

Package

reblocks/variables.

Source

file-type.lisp.

Special Variable: *pretty-html*

We want an HTML nice to read by default.

Package

reblocks/html.

Source

file-type.lisp.

Special Variable: *request-timeout*

Seconds until we abort a request because it took too long. This prevents threads from hogging the CPU indefinitely.

You can set this to NIL to disable timeouts (not recommended).

Package

reblocks/request-handler.

Source

file-type.lisp.

Special Variable: *stream*

Reblocks will write all output into this stream.

This stream is created for each request and available to code executed within a request as a special variable. All html should be rendered to this stream, but don’t worry, if you are using ‘with-html‘ or ‘with-html-string‘ macroses, they handle this for you.

Package

reblocks/html.

Source

file-type.lisp.

Special Variable: *timing-report-fn*
Package

reblocks/utils/timing.

Source

file-type.lisp.

Special Variable: *translation-function*
Package

reblocks/utils/i18n.

Source

file-type.lisp.


5.1.2 Macros

Macro: call-action-hook (app action-name action-arguments)

Called when action is processed.

Returns a result of REBLOCKS/ACTIONS:EVAL-ACTION generic-function application to the arguments.

Package

reblocks/hooks.

Source

file-type.lisp.

Macro: call-handle-http-request-hook (env)

Called around code reponsible for an HTTP request processing, before any application was choosen.

Accepts Lack’s HTTP request environment.

Should return a list of three items:

* HTTP status code;
* a plist of HTTP headers;
* a list of strings corresponding to the page’s content.

Package

reblocks/hooks.

Source

file-type.lisp.

Macro: call-render-hook (app)

Called when around whole page or ajax request processing. Should return HTML string.

Package

reblocks/hooks.

Source

file-type.lisp.

Macro: call-reset-session-hook (session)

Called when session is resetted for some reason.

Package

reblocks/hooks.

Source

file-type.lisp.

Macro: call-start-reblocks-hook ()

Called around code which starts all applications and a webserver.

Returns a reblocks server object.

Package

reblocks/hooks.

Source

file-type.lisp.

Macro: call-stop-reblocks-hook ()

Called around code which stops all applications and a webserver.

Returns a reblocks server object.

Package

reblocks/hooks.

Source

file-type.lisp.

Macro: defapp (name &rest initargs &key prefix subclasses slots description documentation autostart &allow-other-keys)

This macro defines the key parameters for a stand alone web application.
It defines both a class with name ’name’ and registers an instance of that class. It also instantiates a defvar with an instance of this class. This is intended to be the primary way a web application is defined.

PREFIX - an URI from where this app should be available on the server. Read more about this in the REBLOCKS/DOC/ROUTING:@ROUTING section.

SUBCLASSES - if you want to inherit subclass behavior from other webapps, you can. It’s not likely to be needed much

SLOTS - webapps are class so slots are a list of definitions just as in defclass, but as slots are likely to be rare on webapps, we make this a keyword argument.

All of the following, when present, are passed through as additional
initargs:

NAME - instantiates a username (and the default title for) a webapp. use this name to get and delete this webapp. Multiple instances of a webapp class can co-exist, so long as they have different prefixes

DESCRIPTION - A description of the application for the title page

DOCUMENTATION - Content of this argument will be added as (:documentation ...) form to the class definition.

AUTOSTART - Whether this webapp is started automatically when start-reblocks is called (primarily for backward compatibility

Package

reblocks/app.

Source

file-type.lisp.

Macro: defhook (name (&rest args) &optional docstring)

Registers a hook

Package

reblocks/hooks.

Source

file-type.lisp.

Macro: define-action (name app-class action-params &body body)

Adds a permanent action to the class’s set of permanent actions

Package

reblocks/app-actions.

Source

file-type.lisp.

Macro: defroute ((app route &key content-type) &body body)

Defines a handler for a given route. By default route should return a serialized JSON:

“‘lisp
(defroute (app /api/data)
"{"my-data": [1, 2, 3]}")
“‘

but you can redefine the content type:

“‘lisp
(defroute (app /api/data :content-type "application/xml") "<my-data><item>1</item><item>2</item></my-data>") “‘

Package

reblocks/routes.

Source

file-type.lisp.

Macro: defwidget (name direct-superclasses &body body)

A macro used to define new widget classes. Behaves exactly as
defclass, except adds REBLOCKS/WIDGETS/MOP:WIDGET-CLASS metaclass specification and inherits from REBLOCKS/WIDGET:WIDGET if no DIRECT-SUPERCLASSES are provided.

Package

reblocks/widget.

Source

file-type.lisp.

Macro: ensure-page-metadata (page name &optional default)

Like PAGE-METADATA, but if metadata piece with NAME is not found saves the DEFAULT before returning it. Secondary return value is true if NAME was
already in the metadata.

Package

reblocks/page.

Source

file-type.lisp.

Macro: on-application-hook-action (callback-name (app action-name action-arguments) &body body)

Called when action is processed.

Returns a result of REBLOCKS/ACTIONS:EVAL-ACTION generic-function application to the arguments.

Package

reblocks/hooks.

Source

file-type.lisp.

Macro: on-application-hook-handle-http-request (callback-name (env) &body body)

Called around code reponsible for an HTTP request processing, before any application was choosen.

Accepts Lack’s HTTP request environment.

Should return a list of three items:

* HTTP status code;
* a plist of HTTP headers;
* a list of strings corresponding to the page’s content.

Package

reblocks/hooks.

Source

file-type.lisp.

Macro: on-application-hook-render (callback-name (app) &body body)

Called when around whole page or ajax request processing. Should return HTML string.

Package

reblocks/hooks.

Source

file-type.lisp.

Macro: on-application-hook-reset-session (callback-name (session) &body body)

Called when session is resetted for some reason.

Package

reblocks/hooks.

Source

file-type.lisp.

Macro: on-application-hook-start-reblocks (callback-name () &body body)

Called around code which starts all applications and a webserver.

Returns a reblocks server object.

Package

reblocks/hooks.

Source

file-type.lisp.

Macro: on-application-hook-stop-reblocks (callback-name () &body body)

Called around code which stops all applications and a webserver.

Returns a reblocks server object.

Package

reblocks/hooks.

Source

file-type.lisp.

Macro: on-request-hook-action (callback-name (app action-name action-arguments) &body body)

Called when action is processed.

Returns a result of REBLOCKS/ACTIONS:EVAL-ACTION generic-function application to the arguments.

Package

reblocks/hooks.

Source

file-type.lisp.

Macro: on-request-hook-handle-http-request (callback-name (env) &body body)

Called around code reponsible for an HTTP request processing, before any application was choosen.

Accepts Lack’s HTTP request environment.

Should return a list of three items:

* HTTP status code;
* a plist of HTTP headers;
* a list of strings corresponding to the page’s content.

Package

reblocks/hooks.

Source

file-type.lisp.

Macro: on-request-hook-render (callback-name (app) &body body)

Called when around whole page or ajax request processing. Should return HTML string.

Package

reblocks/hooks.

Source

file-type.lisp.

Macro: on-request-hook-reset-session (callback-name (session) &body body)

Called when session is resetted for some reason.

Package

reblocks/hooks.

Source

file-type.lisp.

Macro: on-request-hook-start-reblocks (callback-name () &body body)

Called around code which starts all applications and a webserver.

Returns a reblocks server object.

Package

reblocks/hooks.

Source

file-type.lisp.

Macro: on-request-hook-stop-reblocks (callback-name () &body body)

Called around code which stops all applications and a webserver.

Returns a reblocks server object.

Package

reblocks/hooks.

Source

file-type.lisp.

Macro: on-session-hook-action (callback-name (app action-name action-arguments) &body body)

Called when action is processed.

Returns a result of REBLOCKS/ACTIONS:EVAL-ACTION generic-function application to the arguments.

Package

reblocks/hooks.

Source

file-type.lisp.

Macro: on-session-hook-handle-http-request (callback-name (env) &body body)

Called around code reponsible for an HTTP request processing, before any application was choosen.

Accepts Lack’s HTTP request environment.

Should return a list of three items:

* HTTP status code;
* a plist of HTTP headers;
* a list of strings corresponding to the page’s content.

Package

reblocks/hooks.

Source

file-type.lisp.

Macro: on-session-hook-render (callback-name (app) &body body)

Called when around whole page or ajax request processing. Should return HTML string.

Package

reblocks/hooks.

Source

file-type.lisp.

Macro: on-session-hook-reset-session (callback-name (session) &body body)

Called when session is resetted for some reason.

Package

reblocks/hooks.

Source

file-type.lisp.

Macro: on-session-hook-start-reblocks (callback-name () &body body)

Called around code which starts all applications and a webserver.

Returns a reblocks server object.

Package

reblocks/hooks.

Source

file-type.lisp.

Macro: on-session-hook-stop-reblocks (callback-name () &body body)

Called around code which stops all applications and a webserver.

Returns a reblocks server object.

Package

reblocks/hooks.

Source

file-type.lisp.

Macro: timing (name &body body)
Package

reblocks/utils/timing.

Source

file-type.lisp.

Macro: with-action-hook ((app action-name action-arguments) &body body)

Called when action is processed.

Returns a result of REBLOCKS/ACTIONS:EVAL-ACTION generic-function application to the arguments.

Package

reblocks/hooks.

Source

file-type.lisp.

Macro: with-app (app &body forms)

Bind variables that are both webapp-specific, or applicable to just this app, and webapp-general, or not particular to some request to this app, with regard to WEBAPP.

Package

reblocks/app.

Source

file-type.lisp.

Macro: with-collected-commands (() &body body)

Collects commands added using a call to ADD-COMMANDS during the body execution.

Commands list can be aquired using GET-COLLECTED-COMMANDS function.

Package

reblocks/commands.

Source

file-type.lisp.

Macro: with-collected-dependencies (&body body)

Use this macro to wrap code which may push new dependencies for the page or an action.

Package

reblocks/page-dependencies.

Source

file-type.lisp.

Macro: with-file-write ((stream-name path &key element-type) &body body)

Ensures that directories exists, then opens a file for write and executes a body.

Package

reblocks/utils/misc.

Source

file-type.lisp.

Macro: with-handle-http-request-hook ((env) &body body)

Called around code reponsible for an HTTP request processing, before any application was choosen.

Accepts Lack’s HTTP request environment.

Should return a list of three items:

* HTTP status code;
* a plist of HTTP headers;
* a list of strings corresponding to the page’s content.

Package

reblocks/hooks.

Source

file-type.lisp.

Macro: with-html (&body body)

Renders body using [Spinneret](https://github.com/ruricolist/spinneret) HTML generator.

Package

reblocks/html.

Source

file-type.lisp.

Macro: with-html-string (&body body)

Like WITH-HTML, but capture the output as a string.

Package

reblocks/html.

Source

file-type.lisp.

Macro: with-javascript (source &rest args)

Places ’source’ between script and CDATA elements. Used to avoid having to worry about special characters in JavaScript code.

Package

reblocks/js/base.

Source

file-type.lisp.

Macro: with-javascript-to-string (source &rest args)

Places ’source’ between script and CDATA elements. Used to avoid having to worry about special characters in JavaScript code.

Package

reblocks/js/base.

Source

file-type.lisp.

Macro: with-metadata-lock ((page) &body body)
Package

reblocks/page.

Source

file-type.lisp.

Macro: with-render-hook ((app) &body body)

Called when around whole page or ajax request processing. Should return HTML string.

Package

reblocks/hooks.

Source

file-type.lisp.

Macro: with-request ((request) &body body)

This macro binds current request and stores request path in the session if requiest is not AJAX.

Later, this value is used to determine if user refreshed the page.

Package

reblocks/request.

Source

file-type.lisp.

Macro: with-reset-session-hook ((session) &body body)

Called when session is resetted for some reason.

Package

reblocks/hooks.

Source

file-type.lisp.

Macro: with-session ((env) &body body)

Sets dynamic binding for *session* and *env*

Package

reblocks/session.

Source

file-type.lisp.

Macro: with-start-reblocks-hook (() &body body)

Called around code which starts all applications and a webserver.

Returns a reblocks server object.

Package

reblocks/hooks.

Source

file-type.lisp.

Macro: with-stop-reblocks-hook (() &body body)

Called around code which stops all applications and a webserver.

Returns a reblocks server object.

Package

reblocks/hooks.

Source

file-type.lisp.


5.1.3 Ordinary functions

Function: add-action (app-class action-name function-or-name)

Remove an action from a webapp. action-name should be a string, or it will be converted to one (to work with the macro). function-or-name is a symbol or a function object (valid object for funcall)

Package

reblocks/app-actions.

Source

file-type.lisp.

Function: add-command (name &rest args)

Pushes a new command into the stack.

After action processing these commands will be sent for execution on the client.

Package

reblocks/commands.

Source

file-type.lisp.

Function: add-commands (commands)

Pushes all commands from the list into the stack.

After action processing these commands will be sent for execution on the client.

Package

reblocks/commands.

Source

file-type.lisp.

Function: add-header (name value)

Use this function to add a HTTP header:

“‘lisp
(add-header :x-request-id "100500") “‘

Package

reblocks/response.

Source

file-type.lisp.

Function: add-retpath-to (uri &key retpath)

Adds a "retpath" GET parameter to the giving URL.

Keeps all other parameters and overwrites "retpath" parameter if it is already exists in the URL.

By default, retpath is the current page, rendered by the reblocks. This is very useful to redirect user to login page and return him to the same page where he has been before.

Package

reblocks/response.

Source

file-type.lisp.

Function: ajax-request-p (&key request)

Detects if the current request was initiated via AJAX by looking
for ‘X-Requested-With‘ http header. This function expects to be called in a dynamic hunchentoot environment.

Package

reblocks/request.

Source

file-type.lisp.

Function: alist->plist (alist)

Converts an alist to plist.

Package

reblocks/utils/list.

Source

file-type.lisp.

Function: already-loaded-p (page dependency)

Returns T, if dependency is already loaded into the page.

Package

reblocks/page-dependencies.

Source

file-type.lisp.

Function: append-custom-fields (custom-fields args)

Appends ’custom-fields’ to the end of custom fields that are already defined in ’args’.

Package

reblocks/utils/misc.

Source

file-type.lisp.

Function: call-next-hook ()

This function should be called inside a body, surrounded by ‘ON-APPLICATION-HOOK-…‘, ‘ON-SESSION-HOOK-…‘ or a ‘ON-REQUEST-HOOK-…‘ type of macro.

Package

reblocks/hooks.

Source

file-type.lisp.

Function: concatenate-keywords (&rest symbols)
Package

reblocks/utils/misc.

Source

file-type.lisp.

Function: cookies-to-set (&optional response)

Returns a list with a map cookie-name -> cookie:cookie object. Odd items in this list are cookie names and even are lists with cookie parameters.

Package

reblocks/response.

Source

file-type.lisp.

Function: current-page ()

Returns current page object. Can be useful to pass to call PAGE-METADATA.

Package

reblocks/page.

Source

file-type.lisp.

Function: delete-value (key)

Clear the session value for the currently running app.

KEY is compared using EQUAL.

Package

reblocks/session.

Source

file-type.lisp.

Function: drop-last (list)

Returns a copy of the list without the last element.

Package

reblocks/utils/list.

Source

file-type.lisp.

Function: expire ()

Deletes current session id for the browser.

On the next HTTP request a new session will be created.

Package

reblocks/session.

Source

file-type.lisp.

Function: extend-expiration-time ()

Extends expiration time of the current page.

Package

reblocks/page.

Source

file-type.lisp.

Function: find-all (sequence predicate &key key)

Returns a sequence of all elements found in ’sequence’ that match ’predicate’. If ’key’ is provides, each it is used to retreive each item before passing it to ’predicate’.

Package

reblocks/utils/list.

Source

file-type.lisp.

Function: find-own-symbol (name &optional package)

Like ‘find-symbol’, but reject symbols not really in PACKAGE.

Package

reblocks/utils/misc.

Source

file-type.lisp.

Function: find-slot-dsd (class slot-name)

Returns a direct-slot-definition object of a slot with ’slot-name’ in ’class’.

Package

reblocks/utils/clos.

Source

file-type.lisp.

Function: find-slot-esd (class slot-name)

Returns an effective-slot-definition object of a slot with ’slot-name’ in ’class’.

Package

reblocks/utils/clos.

Source

file-type.lisp.

Function: find-widget-by-id (widget-id)
Package

reblocks/page.

Source

file-type.lisp.

Function: function-designator-p (obj)

Returns true if the object is a function designator.

Package

reblocks/utils/misc.

Source

file-type.lisp.

Function: gen-id (&optional prefix)

Generates an ID unique accross the session. The generated ID can be used to create IDs for html elements, widgets, etc.

Package

reblocks/session.

Source

file-type.lisp.

Function: get-action (app action-name)

Returns the action function associated with this symbol in the current app

Package

reblocks/app-actions.

Source

file-type.lisp.

Function: get-app-actions (app)
Package

reblocks/app-actions.

Source

file-type.lisp.

Function: get-autostarting-apps ()
Package

reblocks/app-mop.

Source

file-type.lisp.

Function: get-code (&optional response)
Package

reblocks/response.

Source

file-type.lisp.

Function: get-collected-commands ()

Returns all commands created during AJAX request processing in order as they where added.

Package

reblocks/commands.

Source

file-type.lisp.

Function: get-collected-dependencies ()
Package

reblocks/page-dependencies.

Source

file-type.lisp.

Function: get-content (&optional response)
Package

reblocks/response.

Source

file-type.lisp.

Function: get-content-type (&optional response)
Package

reblocks/response.

Source

file-type.lisp.

Function: get-content-type (dependency)

Returns a MIME content type for given dependency.

It is used when dependency is served locally.

Package

reblocks/dependencies.

Source

file-type.lisp.

Function: get-cookie (name &key request)

Returns value of the cookie or nil. Name is case insensitive string.

Package

reblocks/request.

Source

file-type.lisp.

Function: get-current ()
Package

reblocks/app.

Source

file-type.lisp.

Function: get-custom-headers (&optional response)
Package

reblocks/response.

Source

file-type.lisp.

Function: get-description ()
Package

reblocks/page.

Source

file-type.lisp.

Function: (setf get-description) ()
Package

reblocks/page.

Source

file-type.lisp.

Function: get-header (name &key request)

Returns value of the HTTP header or nil. Name is case insensitive.

Package

reblocks/request.

Source

file-type.lisp.

Function: get-headers (&optional response)
Package

reblocks/response.

Source

file-type.lisp.

Function: get-host (&key request)
Package

reblocks/request.

Source

file-type.lisp.

Function: get-keywords ()
Package

reblocks/page.

Source

file-type.lisp.

Function: (setf get-keywords) ()
Package

reblocks/page.

Source

file-type.lisp.

Function: get-language ()
Package

reblocks/page.

Source

file-type.lisp.

Function: (setf get-language) ()
Package

reblocks/page.

Source

file-type.lisp.

Function: get-method (&key request)

Returns association list with GET or POST parameters for current request.

Package

reblocks/request.

Source

file-type.lisp.

Function: get-number-of-anonymous-sessions ()

Returns a number of sessions where :user key is NIL.

Package

reblocks/session.

Source

file-type.lisp.

Function: get-number-of-sessions ()
Package

reblocks/session.

Source

file-type.lisp.

Function: get-page-by-id (id)

Returns a page from a current session by it’s id.

Package

reblocks/page.

Source

file-type.lisp.

Function: get-parameter (name &key request)

Returns GET or POST parameter by name.

Package

reblocks/request.

Source

file-type.lisp.

Function: get-parameters (&key request)

Returns association list with GET or POST parameters for current request.

Package

reblocks/request.

Source

file-type.lisp.

Function: get-path (&key request with-params)

For URL http://example.com/foo/bar?blah=minor returns /foo/bar path of the request’s URL.

Package

reblocks/request.

Source

file-type.lisp.

Function: get-port (&key request)

Returns a webserver’s port.

It may be not a port a lisp server listens on but a port a reverse proxy listens on.

Package

reblocks/request.

Source

file-type.lisp.

Function: get-registered-apps ()
Package

reblocks/app-mop.

Source

file-type.lisp.

Function: get-route (path)

Returns a route, matched on given path.
If none matched, then returns nil.

Path should be a string.

This function could be useful for customizing widget rendering depending on the URL in the browser.

Package

reblocks/routes.

Source

file-type.lisp.

Function: get-scheme (&key request)
Package

reblocks/request.

Source

file-type.lisp.

Function: get-session-value (key)

Returns a value from the latest session.

Package

reblocks/debug.

Source

file-type.lisp.

Function: get-title ()
Package

reblocks/page.

Source

file-type.lisp.

Function: (setf get-title) ()
Package

reblocks/page.

Source

file-type.lisp.

Function: get-uri (&key request)

For URL http://example.com/foo/bar?blah=minor returns it as is.

Package

reblocks/request.

Source

file-type.lisp.

Function: get-value (key &optional default)

Get a session value from the currently running webapp. KEY is compared using EQUAL.

Package

reblocks/session.

Source

file-type.lisp.

Function: (setf get-value) (key)

Set a session value for the currently running webapp. KEY is compared using EQUAL.

Package

reblocks/session.

Source

file-type.lisp.

Function: gzip-file (input output &key if-exists if-does-not-exist minimum-length)

Redefined salsa2:gzip-file with more keywords.

Package

reblocks/utils/misc.

Source

file-type.lisp.

Function: hash-keys (hashtable)

Returns all keys in the hashtable.

Package

reblocks/utils/misc.

Source

file-type.lisp.

Function: immediate-response (content &key condition-class code content-type headers cookies-to-set)

Aborts request processing by signaling an [IMMEDIATE-RESPONSE][condition] and returns a given value as response.

HTTP code and headers are taken from CODE and CONTENT-TYPE.

By default, headers and cookies are taken from the current request, but additional headers and cookies may be provides in appropriate arguments.

Package

reblocks/response.

Source

file-type.lisp.

Function: in-page-context-p ()

Returns T when CURRENT-PAGE function will be able to return page instead of throwing an error.

Package

reblocks/page.

Source

file-type.lisp.

Function: in-session-p ()

Checks if session is active and data can be safely retrived or stored.

Package

reblocks/session.

Source

file-type.lisp.

Function: insert-after (newelt list index)

Destructively inserts ’newelt’ into ’list’ after ’index’.

Package

reblocks/utils/list.

Source

file-type.lisp.

Function: insert-at (newelt list index)

Destructively inserts ’newelt’ into ’list’ before ’index’.

Package

reblocks/utils/list.

Source

file-type.lisp.

Function: insert-middleware (layers new-layer &key before after)

Returns a new stack of layers inserting LAYER before or after a layer with given name.

You should not give both BEFORE and AFTER arguments. If given layer not found, the function will signal error.

Original alist LAYERS is not modified.

Package

reblocks/server.

Source

file-type.lisp.

Function: intersperse (list delimeter &key last)

Intersperses a list with a delimeter.

If ’last’ is specified, it will be used for the last delimeter, instead of ’delimeter’.

(intersperse ’(1 2 3 4 5) 0)
=> (1 0 2 0 3 0 4 0 5)

Package

reblocks/utils/list.

Source

file-type.lisp.

Function: list->assoc (lst &key map)

Nondestructively convert a list of elements to an association
list If an element of a list is a cons cell, it is left as
is. Otherwise, it is replaced with a cons cell whose ’car’ is the
element and whose ’cdr’ is a result of ’map’ applied to the
element. The ’map’ is an identity by default.

Ex:
(list->assoc ’(name age (city . location))) => ((name . name) (age . age) (city . location)) (list->assoc ’(1 (2 . 2) 3) :map #’1+) => ((1 . 2) (2 . 2) (3 . 4))

Package

reblocks/utils/list.

Source

file-type.lisp.

Function: list-starts-with (list elements &key test)

Determines if a list starts with the given elements.

Package

reblocks/utils/list.

Source

file-type.lisp.

Function: make-action (function-or-action)

Accepts a function or an existing action. If the value is a
function, adds it to the session actions and returns its unique code as a string. Otherwise, checks if the action already exists. If it does, returns the argument as is. If it does not, signals an error.

Package

reblocks/actions.

Source

file-type.lisp.

Function: make-action-url (function-or-action-code &key keep-query-params)

Accepts action code and returns a URL that can be used as ‘href‘ attribute of HTML link.

For example:

“‘cl-transcript
(reblocks/app:defapp test-app :autostart nil)

(let ((reblocks/request::*request*
(lack.request:make-request
(list :path-info "/blah/minor"
:headers (make-hash-table)))))
(reblocks/app:with-app (make-instance ’test-app) (reblocks/app-actions:define-action test-action test-app ()) (reblocks/actions:make-action-url "test-action")))
=> "/blah/minor?action=test-action"
“‘

If KEEP-QUERY-PARAMS is true (default), then all query arguments are preserved
and will be passed as arguments to the action.

Package

reblocks/actions.

Source

file-type.lisp.

Function: make-dependency (path-or-url &key system type integrity crossorigin cache-in-memory)

Creates a JavaScript dependency, served from the disk.

If the system’s name is given, then the path is calculated relatively to this system’s source root.

Package

reblocks/dependencies.

Source

file-type.lisp.

Function: make-funcall-widget (func)

Create a widget from a symbol denoting a function.

Package

reblocks/widgets/funcall-widget.

Source

file-type.lisp.

Function: make-js-action (action &key args)

Returns JS code which can be inserted into ‘onclick‘ attribute and will execute given Lisp function on click.

It accepts any function as input and produces a string with JavaScript code.

Package

reblocks/actions.

Source

file-type.lisp.

Function: make-js-form-action (action)

Returns JS code which can be inserted into ‘onsubmit‘ form’s attribute.

It accepts any function as input and produces a string with JavaScript code.

On form submit given action will be executed and all input values
will be passed as arguments.

Package

reblocks/actions.

Source

file-type.lisp.

Function: make-response (content &key code content-type headers)
Package

reblocks/response.

Source

file-type.lisp.

Function: make-session-middleware (&key samesite-policy public-session-keys)
Package

reblocks/session.

Source

file-type.lisp.

Function: make-string-widget (string &key escape-p)

Create a widget from a string.

Package

reblocks/widgets/string-widget.

Source

file-type.lisp.

Function: make-uri (new-path)

Makes a new URL, based on the current request’s URL.

If new-path can be absolute, like /logout or relative, like ./stories.

Also, it can contain a query params like /login?code=100500

Package

reblocks/response.

Source

file-type.lisp.

Function: md5 (string)
Package

reblocks/utils/misc.

Source

file-type.lisp.

Function: merge-files-with-newline (file-list saved-path)
Package

reblocks/utils/misc.

Source

file-type.lisp.

Function: ninsert (list thing pos)
Package

reblocks/utils/list.

Source

file-type.lisp.

Function: off ()
Package

reblocks/debug.

Source

file-type.lisp.

Function: on (&key track-latest-session debug-actions track-latest-request invoke-debugger-on-error)
Package

reblocks/debug.

Source

file-type.lisp.

Function: page-dependencies (page)

Returns as list of dependencies loaded into the page. Most recently loaded go first.

Package

reblocks/page-dependencies.

Source

file-type.lisp.

Function: (setf page-dependencies) (page)

Associates a list of dependencies with the page.

Package

reblocks/page-dependencies.

Source

file-type.lisp.

Function: page-metadata (page name)

Returns a metadata with NAME, bound to the current page

Package

reblocks/page.

Source

file-type.lisp.

Function: (setf page-metadata) (page name)
Package

reblocks/page.

Source

file-type.lisp.

Function: preview (widget)
Package

reblocks/preview.

Source

file-type.lisp.

Function: public-file-relative-path (type filename)

Infer FILENAME’s relative path and extension from TYPE.

Example:

(public-file-relative-path :stylesheet "navigation") => "stylesheets/navigation.css"

Package

reblocks/utils/misc.

Source

file-type.lisp.

Function: public-files-relative-paths (&rest args)

A helper function that returns a list of paths for files provided in ’args’. Each argument must be a cons cell where car is
either :stylesheet or :script and cdr is a name of the file.

Useful when generating a list of dependencies for widgets and/or the application (see the ’dependencies’ generic function and *application-dependencies*.)

Ex:
(get-public-files-paths ’(:stylesheet . "navigation")
’(:script . "effects"))
=> (#P"stylesheets/navigation.css" #P"scripts/effects.js")

Package

reblocks/utils/misc.

Source

file-type.lisp.

Function: pure-request-p ()

Detects if the current request is declared as ’pure’, i.e. affects
no widgets or internal application state, but merely is a request for information.

Such requests simply return the result of the function
that represents the action and are used by some AJAX operations to retreive information (suggest block, etc).

When such requests are satisfied, the actions have access to the session, the widgets, and all other parameters. However, none of the callbacks are executed, no widgets are sent to the client, etc.

Package

reblocks/request.

Source

file-type.lisp.

Function: push-dependencies (list-of-dependencies)

Same as ‘push-dependency’ but for the list.

Package

reblocks/page-dependencies.

Source

file-type.lisp.

Function: push-dependency (dependency)

Pushes dependency into the currently collected list of dependencies.

Makes deduplication by comparing dependencies’ urls.

Package

reblocks/page-dependencies.

Source

file-type.lisp.

Function: read-from-file (path)
Package

reblocks/utils/misc.

Source

file-type.lisp.

Function: redirect (uri)

Redirects the client to a new URI.

Package

reblocks/response.

Source

file-type.lisp.

Function: refresh-request-p ()

Determines if a request is a result of the user invoking a browser refresh function. Note that a request will not be considered a refresh if there is an action involved (even if the user hits refresh).

Package

reblocks/request.

Source

file-type.lisp.

Function: relative-path (full-path prefix-path)
Package

reblocks/utils/misc.

Source

file-type.lisp.

Function: remove-action (app-class action-name)

Removes a permanent action from a webapp

Package

reblocks/app-actions.

Source

file-type.lisp.

Function: remove-header (name &key request)

Removes a HTTP header by name, returns new instance of request without given header.

Package

reblocks/request.

Source

file-type.lisp.

Function: remove-keyword-parameter (parameter-list keyword)

Removes a keyword parameter from a parameter-list. (remove-keyword-parameter ’(1 2 3 :a 1 :b 2 :c 3) :b) => (1 2 3 :a 1 :c 3)

Package

reblocks/utils/list.

Source

file-type.lisp.

Function: remove-keyword-parameters (parameter-list &rest keywords)

Removes all parameters with keys in ’keywords’ from ’parameter-list’.

Package

reblocks/utils/list.

Source

file-type.lisp.

Function: remove-parameter-from-uri (uri parameter)

Removes the given parameter from a URI.

Package

reblocks/utils/uri.

Source

file-type.lisp.

Function: remove-spurious-slashes (str)

Condense multiple consecutively occuring slashes in STR into a single slash.

ex:

(remove-spurious-slashes "/ab/////c///")
=> "/ab/c/"

Package

reblocks/utils/string.

Source

file-type.lisp.

Function: reset ()

Reset current session.

Package

reblocks/session.

Source

file-type.lisp.

Function: reset-latest-session ()

Resets the latest session when debug mode is on.

Package

reblocks/debug.

Source

file-type.lisp.

Function: running-p (server)

Returns T if server is running and NIL otherwise.

Package

reblocks/server.

Source

file-type.lisp.

Function: safe-apply (fn &rest args)

Apply ’fn’ if it isn’t nil. Otherwise return nil.

Package

reblocks/utils/misc.

Source

file-type.lisp.

Function: safe-funcall (fn &rest args)

Funcall ’fn’ if it isn’t nil. Otherwise return nil.

Package

reblocks/utils/misc.

Source

file-type.lisp.

Function: safe-getf (list name)

Like GETF but copes with odd argument lists. Extracts the first value whose predecessor matches NAME. Returns NIL as second value if the key wasn’t found at all.

Package

reblocks/utils/list.

Source

file-type.lisp.

Function: safe-subseq (sequence start &optional end)

A safe alternative to subseq that automatically adjust indices.

Package

reblocks/utils/list.

Source

file-type.lisp.

Function: send-script (script &optional place)

Send JavaScript to the browser. The way of sending depends on whether the current request is via AJAX or not.

Script may be either a string or a list; if it is a list it will be compiled through Parenscript first.

Package

reblocks/response.

Source

file-type.lisp.

Function: servers (&optional interface port)

Returns a list of Reblocks servers.

Package

reblocks/server.

Source

file-type.lisp.

Function: set-cookie (cookie &key response)

Use this function to add Set-Cookie header:

“‘lisp
(set-cookie (list :name "user_id" :value "bob" :samesite :lax)) “‘

Cookie might include these properties:

- domain
- path
- expires
- secure
- httponly
- samesite

Package

reblocks/response.

Source

file-type.lisp.

Function: slot-equal (o1 o2 &key exclude test)

Whether O1 and O2 have identical slot contents, excluding slot names in EXCLUDE.

Two slots are considered equal if they are either both unbound or if they are both bound and pass TEST.

Signals an error when the slot names of O1 and O2 don’t match.

Package

reblocks/utils/clos.

Source

file-type.lisp.

Function: slot-value-by-path (obj path)

Retrieves a value of a slot from a hierarchy of objects. A nil on the path is ignored.

ex:
(slot-value-by-path employee ’(address street)) => "17 Sunvalley St." (slot-value-by-path employee ’(address)) => #<ADDRESS {XXX}> (slot-value-by-path employee ’address) => #<ADDRESS {XXX}> (slot-value-by-path address ’(street)) => "17 Sunvalley St." (slot-value-by-path address ’(nil street)) => "17 Sunvalley St."

obj - a CLOS object
path - a list of slot names

Package

reblocks/utils/clos.

Source

file-type.lisp.

Function: slurp-file (filepath &key element-type)
Package

reblocks/utils/misc.

Source

file-type.lisp.

Function: stable-set-difference (list-1 list-2 &key test key)

Returns a list of element of ’list-1’ that do not appear in ’list-2’.

Package

reblocks/utils/list.

Source

file-type.lisp.

Function: start (&key debug port interface server-type samesite-policy apps server-class disable-welcome-app)

Starts reblocks framework hooked into Clack server.

Set DEBUG to true in order for error messages and stack traces to be shown to the client (note: stack traces are temporarily not available due to changes in Hunchentoot 1.0.0).

Server will start all apps declared having ‘autostart t‘ in their definition unless APPS argument is provided.

Sometimes you might want your app respond on /some-uri and / return 404. In this case it is useful to set DISABLE-WELCOME-APP argument to T.

Package

reblocks/server.

Source

file-type.lisp.

Function: status ()
Package

reblocks/debug.

Source

file-type.lisp.

Function: stop (&optional interface port)

Stops Reblocks servers matching given INTERFACE and PORT.

This function deactivates all applications bound to the server and stopps a Clack server.

Returns stopped server objects.

Package

reblocks/server.

Source

file-type.lisp.

Function: stop ()
Package

reblocks/preview.

Source

file-type.lisp.

Function: string-invert-case (str)
Package

reblocks/utils/string.

Source

file-type.lisp.

Function: string-remove-left (str prefix &key ignore-case-p)

If string ’str’ starts with ’prefix’, remove ’prefix’ from the start of ’str’.

Package

reblocks/utils/string.

Source

file-type.lisp.

Function: string-remove-right (str suffix &key ignore-case-p)

If string ’str’ ends with ’suffix’, remove ’suffix’ from the end of ’str’.

Package

reblocks/utils/string.

Source

file-type.lisp.

Function: string-whitespace-p (str)

Returns true if every character in a string is a whitespace character, nil otherwise.

Package

reblocks/utils/string.

Source

file-type.lisp.

Function: symbol-status (symbol)

Returns a status of ’symbol’ in its package (internal, external, etc.)

Package

reblocks/utils/misc.

Source

file-type.lisp.

Function: translate (string &rest scope)

Translates given string by calling *translation-function* with string and ’scope’.
’scope’ is a set of function key arguments which can be :accusative-form-p
:genitive-form-p
:items-count
:preceding-count

Package

reblocks/utils/i18n.

Source

file-type.lisp.

Function: write-to-file (object path)
Package

reblocks/utils/misc.

Source

file-type.lisp.


5.1.4 Generic functions

Generic Function: attributize-name (name)

Convert objects to a format suitable for
serialization (in particular for markup languages like HTML).

Ex:
(attributize-name ’hello-world) => "hello-world"

Package

reblocks/utils/string.

Source

file-type.lisp.

Methods
Method: attributize-name ((name null))
Method: attributize-name ((name string))
Method: attributize-name ((name symbol))
Method: attributize-name ((name integer))
Generic Reader: cache-in-memory-p (object)
Package

reblocks/dependencies.

Methods
Reader Method: cache-in-memory-p ((local-dependency local-dependency))

When true, then on creation dependency will read file’s data into the memory.
This is useful for applications, deployed as a single executable file. Create such dependencies in compile time and store in a global variable.

Source

file-type.lisp.

Target Slot

cache-in-memory.

Generic Function: create-widget-from (object)

Methods of this generic should return an instance of subclass of reblocks/widget:widget
The most obvious cases are transformation of strings and functions into the widget, but these methods are already supplied by Reblocks.

If REBLOCKS/PAGE:INIT-PAGE returns an object, then CREATE-WIDGET-FROM will be called on it to create the root widget.

Package

reblocks/widget.

Source

file-type.lisp.

Methods
Method: create-widget-from ((object function))
Source

file-type.lisp.

Method: create-widget-from ((object string))
Source

file-type.lisp.

Method: create-widget-from ((object widget))

If input is already a widget, then it is returned as is.

Method: create-widget-from ((object symbol))

If input is a symbol named a widget class, then we’ll MAKE-INSTANCE of this class.

Method: create-widget-from (object)

If this method is called, that means that object is not of a proper type. Say it with an explicit error message.

Generic Function: dependency-equal (left right)

Should return T if two dependencies are considered equal. By default compares their URLs.

Package

reblocks/dependencies.

Source

file-type.lisp.

Methods
Method: dependency-equal (left right)
Generic Function: dom-id (obj)

Provides a consistent interface to identifying widgets
by their DOM id. Returns a string or nil if the object is to have no id.

Package

reblocks/widgets/dom.

Source

file-type.lisp.

Methods
Method: dom-id ((obj dom-object-mixin))
Method: dom-id ((obj symbol))
Method: dom-id ((obj function))
Method: dom-id ((obj string))
Generic Function: (setf dom-id) (obj)
Package

reblocks/widgets/dom.

Source

file-type.lisp.

Methods
Method: (setf dom-id) ((obj dom-object-mixin))
Generic Reader: escape-p (object)
Generic Writer: (setf escape-p) (object)
Package

reblocks/widgets/string-widget.

Methods
Reader Method: escape-p ((string-widget string-widget))
Writer Method: (setf escape-p) ((string-widget string-widget))

Whether to escape the output for HTML.

Source

file-type.lisp.

Target Slot

escape-p.

Generic Function: eval-action (app action-name arguments)

Evaluates the action that came with the request.

First it resolves action by trying to find ACTION-NAME inside session
or current app’s actions.
If actions wasn’t found, then EVAL-ACTION calls ON-MISSING-ACTION generic-function. Otherwise it applies arguments to the action callback.

Package

reblocks/actions.

Source

file-type.lisp.

Methods
Method: eval-action (app action-name arguments)
Generic Function: extend-page-expiration-by (app page)

Returns NIL or a number of seconds after which page should be removed from the memory.

Default method returns current value of *EXTEND-PAGE-EXPIRATION-BY* variable or *PAGES-EXPIRE-IN* variable.

Package

reblocks/page.

Source

file-type.lisp.

Methods
Method: extend-page-expiration-by (app page)
Generic Reader: get-content (object)
Package

reblocks/widgets/string-widget.

Methods
Reader Method: get-content ((string-widget string-widget))

automatically generated reader method

Source

file-type.lisp.

Target Slot

content.

Generic Writer: (setf get-content) (object)
Package

reblocks/widgets/string-widget.

Methods
Writer Method: (setf get-content) ((string-widget string-widget))

automatically generated writer method

Source

file-type.lisp.

Target Slot

content.

Generic Reader: get-crossorigin (object)
Package

reblocks/dependencies.

Methods
Reader Method: get-crossorigin ((remote-dependency remote-dependency))

automatically generated reader method

Source

file-type.lisp.

Target Slot

crossorigin.

Generic Function: get-css-classes (widget)

Returns a list of classes for the widget.
Classes may be a strings or a keywords.
By default, :widget and keyworded class name are returned. Use ‘(list* :new-class (call-next-method))‘
to add new classes.

Package

reblocks/widget.

Source

file-type.lisp.

Methods
Method: get-css-classes (widget)
Generic Function: get-dependencies (object)

Returns a list of object’s dependencies.

Object could be an application or a widget.
Reblocks will call this method for application and every widget on a page to gather necessary dependencies and to inject them into resulting HTML.

Package

reblocks/dependencies.

Source

file-type.lisp.

Methods
Method: get-dependencies ((self app))
Source

file-type.lisp.

Method: get-dependencies ((self jquery-backend))
Source

file-type.lisp.

Method: get-dependencies (object)

By default, there are no dependencies for an object.

Generic Function: get-html-tag (widget)

This method should return a keyword, like :div or :article. By default, it returns :div.
If we are inside a table, it returns :tr

Package

reblocks/widget.

Source

file-type.lisp.

Methods
Method: get-html-tag (widget)
Generic Reader: get-integrity (object)
Package

reblocks/dependencies.

Methods
Reader Method: get-integrity ((remote-dependency remote-dependency))

A hash, used by modern browsers for subresource integrity checking.

See more information at: <https://www.w3.org/TR/SRI/>

Source

file-type.lisp.

Target Slot

integrity.

Generic Function: get-path (dependency)

Returns a path on local disk to serve dependency from.

This could be a real source file or a cached version of remote dependency.

Package

reblocks/dependencies.

Source

file-type.lisp.

Methods
Method: get-path ((dependency remote-dependency))

Returns a path to cached file.

Reader Method: get-path ((local-dependency local-dependency))

automatically generated reader method

Target Slot

path.

Generic Reader: get-prefix (object)
Package

reblocks/app.

Methods
Reader Method: get-prefix ((app app))

The subtree of the URI space at this site that belongs to the webapp.

Source

file-type.lisp.

Target Slot

prefix.

Generic Function: (setf get-prefix) (app)
Package

reblocks/app.

Methods
Method: (setf get-prefix) ((app app))

Set the prefix of the webapp. Ensures normalization by removing trailing slash.

Source

file-type.lisp.

Generic Reader: get-response (obj)

Extracts response from the object. Usually, obj will be an [IMMEDIATE-RESPONSE][condition] condition.

Package

reblocks/response.

Source

file-type.lisp.

Methods
Reader Method: get-response ((condition immediate-response))
Target Slot

response.

Generic Function: get-route (dependency)

This method should return a routes:route object if dependency should ber served from local server.

Package

reblocks/dependencies.

Source

file-type.lisp.

Methods
Reader Method: get-route ((local-dependency local-dependency))

automatically generated reader method

Target Slot

route.

Method: get-route (dependency)

By default dependencies aren’t served by Lisp.

Generic Reader: get-type (object)
Package

reblocks/dependencies.

Methods
Reader Method: get-type ((dependency dependency))

automatically generated reader method

Source

file-type.lisp.

Target Slot

type.

Generic Function: get-url (dependency)

Returns URL of the dependency.

If dependency should be served by the server, second value is :local. Otherwise it is :external. Also, in first case dependency’s URL should have only path part, like /local/css/bootstrap.css.

Package

reblocks/dependencies.

Source

file-type.lisp.

Methods
Method: get-url ((dependency cached-remote-dependency))
Method: get-url ((dependency remote-dependency))
Method: get-url ((dependency local-dependency))

Returns dependency’s url and it’s type.

URL type is returned as second value and can be :local or :remote. For local-dependency it is :local.

Generic Function: handle-ajax-request (app)

This generic function is called when Reblocks processes an action called from Javascript.

Package

reblocks/request-handler.

Source

file-type.lisp.

Methods
Method: handle-ajax-request ((app app))
Generic Function: handle-request (app)

This method handles each request as it comes in from the
server. It is a hunchentoot handler and has access to all hunchentoot dynamic variables. The default implementation executes a user
action (if any) and renders the root widget wrapped in HTML
provided by ’render-page’. If the request is an AJAX request, only the dirty widgets are rendered into a JSON data structure. It also invokes user supplied ’reblocks/session:init’ method on the first request that has no session setup.

’handle-request’ immediately returns ’+http-not-found+’ if it
sees a mime type on the script name (it doesn’t handle what could be files because these mess with callback functions and break some
widgets that depend on them).

Additionally, on the first request a session is created and a client
is forced to redirect. At this point if the cookie is sent, session information is removed from the URL, otherwise the URL is left in
tact. This is done so that session information appears on the URL for clients that don’t support cookies (this way AJAX requests followed by
a refresh will work).

This function also manages lists of callback functions and calls them
at different points before and after request. See ’request-hook’.

Override this method (along with :before and :after specifiers) to customize behavior.

Package

reblocks/request-handler.

Source

file-type.lisp.

Methods
Method: handle-request ((app app))
Method: handle-request :around (app)

This wrapper sets a timeout on the request and reports response timings.

Method: handle-request :around ((app app))

This wrapper sets current application and suppresses error output from Hunchentoot.

Generic Function: humanize-name (name)

Convert objects to a human-readable string suitable
for presentation. Default implementations beautify strings and symbols.

Ex:
(humanize-name ’hello-world) => "Hello World" (humanize-name "HELLO-WORLD") => "Hello World"

Package

reblocks/utils/string.

Source

file-type.lisp.

Methods
Method: humanize-name ((name string))
Method: humanize-name ((name symbol))
Generic Function: infer-type-from (path-or-url)

Returns a keyword meaning content type of the dependency by infering it from URL or a path

Package

reblocks/dependencies.

Source

file-type.lisp.

Methods
Method: infer-type-from ((url string))
Method: infer-type-from ((path pathname))
Generic Function: init (app)

A method for this generic function should be defined to initialize application for a new user session.

It should return a widget which become a root widget.

Package

reblocks/session.

Source

file-type.lisp.

Methods
Method: init (app)
Source

file-type.lisp.

Generic Function: init-page (app url-path expire-at)

A method for this generic function should be defined to initialize a new page object.

It should return a widget which become a root widget of the page or it might return the
page with initialized root widget in case if you want to use your own subclass of the PAGE class.

Package

reblocks/page.

Source

file-type.lisp.

Methods
Method: init-page ((app preview) path expire-at)
Source

file-type.lisp.

Method: init-page ((app welcome-screen-app) url-path expire-at)
Source

file-type.lisp.

Method: init-page :around (app (path string) expire-at)

If init function returned not object inherited from widget, it calls create-widget-from method, to transform value into the widget.

Source

file-type.lisp.

Method: init-page (app (path string) expire-at)
Source

file-type.lisp.

Generic Function: init-session (app)

A method for this generic function should be defined to initialize application for a new user session.

On the moment it get called session has-map already exists and you can use GET-VALUE function to set some values.

Package

reblocks/session.

Source

file-type.lisp.

Methods
Method: init-session :before (app)
Source

file-type.lisp.

Method: init-session (app)
Generic Function: initialize-webapp (app)

A protocol for performing any special initialization on the creation of a webapp object.

Package

reblocks/app.

Source

file-type.lisp.

Methods
Method: initialize-webapp (app)
Generic Function: make-js-backend (name)

Creates a js backend instance of a given name.

Name should be a keyword like a :jquery or a :prototype.

Package

reblocks/js/base.

Source

file-type.lisp.

Methods
Method: make-js-backend ((name (eql :jquery)))
Source

file-type.lisp.

Generic Function: make-middlewares (server &key samesite-policy)

Returns an alist where keys are keywords and values are Lack middlewares or apps.

Default primary method returns alist with two keys :SESSION and :APP, where
:SESSION is a middleware and :APP is the main application.

To modify middlewares list, define method for a server subclass
and use INSERT-MIDDLEWARE function on the results of CALL-NEXT-METHOD.

SAMESITE-POLICY argument if given, should be a keyword. It’s semantic
is described at [Mozilla docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite). It’s default value is taken from *DEFAULT-SAMESITE-POLICY* variable.

Here is an example, how this generic-function can be used to run
a HTTP API on URLs with path starting from /api/:

“‘
(defmethod reblocks/server:make-middlewares ((server ultralisp-server) &rest rest)
(declare (ignore rest))

(flet ((test-app (env)
(declare (ignore env))
’(200
(:content-type "text/plain")
("Hello, World"))))
(reblocks/server:insert-middleware
(call-next-method)
(cons
:some-api
(lambda (app)
(funcall (lack.util:find-middleware :mount)
app
"/api/"
#’test-app)))
:before :app)))
“‘

Package

reblocks/server.

Source

file-type.lisp.

Methods
Method: make-middlewares ((server server) &key samesite-policy)
Generic Function: max-pages-per-session (app)

Returns NIL or a maximum number of pages to keep in the session.
Older pages will be expired and free memory.

Default method returns current value of *MAX-PAGES-PER-SESSION* variable.

Package

reblocks/page.

Source

file-type.lisp.

Methods
Method: max-pages-per-session (app)
Generic Function: object-class-name (obj)

Returns an object’s class name (i.e. "Employee"). This method is be used to present the name of an entity to the user. Override this method to change the name for particular objects.

Package

reblocks/utils/clos.

Source

file-type.lisp.

Methods
Method: object-class-name (obj)
Generic Function: on-error (app condition &key backtrace)

This method is called when some unhandled error was raised by application.
It should call reblocks/response:immediate-response like this:

(reblocks/response:immediate-response
"Unhandled condition"
:code 500)

Package

reblocks/error-handler.

Source

file-type.lisp.

Methods
Method: on-error (app condition &key backtrace)

Default implementation returns a plain text page and 500 status code.

Generic Function: on-missing-action (app action-name)

Must be overridden by application to prevent default behaviour - redirect to a root of the application. The new method should determine the behavior in this situation (e.g. redirect, signal an error, etc.).

Package

reblocks/actions.

Source

file-type.lisp.

Methods
Method: on-missing-action (app action-name)
Generic Function: on-page-load (page)

This generic function gets called when user loads a page in the browser.
It is called for all non Ajax requests.

When user reloads page multiple times, the page object can be reused.
Thus this function may be used to reset some page attributes.

Default method resets a list of loaded dependencies to ensure that all of them will be sent to the browser again.

Package

reblocks/page.

Source

file-type.lisp.

Methods
Method: on-page-load ((page page))
Source

file-type.lisp.

Generic Function: on-page-redirect (from-page to-url)

This generic function gets called when user get’s a redirect to another page.

Default method does nothing.

Package

reblocks/page.

Source

file-type.lisp.

Methods
Method: on-page-redirect (from-page to-url)
Generic Function: on-page-refresh (page)

This generic function gets called when user refreshes page in the browser.

Default method does nothing.

Package

reblocks/page.

Source

file-type.lisp.

Methods
Method: on-page-refresh (page)
Generic Reader: page-app (object)
Package

reblocks/page.

Methods
Reader Method: page-app ((page page))

automatically generated reader method

Source

file-type.lisp.

Target Slot

app.

Generic Writer: (setf page-app) (object)
Package

reblocks/page.

Methods
Writer Method: (setf page-app) ((page page))

automatically generated writer method

Source

file-type.lisp.

Target Slot

app.

Generic Function: page-expire-in (app page-path)

Returns NIL or a number of seconds after which page should be removed from the memory.

Default method returns current value of *PAGES-EXPIRE-IN* variable.

Package

reblocks/page.

Source

file-type.lisp.

Methods
Method: page-expire-in (app page-path)
Generic Reader: page-id (object)
Package

reblocks/page.

Methods
Reader Method: page-id ((page page))

automatically generated reader method

Source

file-type.lisp.

Target Slot

id.

Generic Function: page-not-found-handler (app)

This function is called when the current widget
heirarchy fails to parse a URL. The default behavior simply sets the 404 return code

Package

reblocks/request-handler.

Source

file-type.lisp.

Methods
Method: page-not-found-handler (app)
Generic Reader: page-root-widget (object)
Package

reblocks/page.

Methods
Reader Method: page-root-widget ((page page))

automatically generated reader method

Source

file-type.lisp.

Target Slot

root-widget.

Generic Writer: (setf page-root-widget) (object)
Package

reblocks/page.

Methods
Writer Method: (setf page-root-widget) ((page page))

automatically generated writer method

Source

file-type.lisp.

Target Slot

root-widget.

Generic Function: render (widget)

Define this method to render widget’s content.

Use REBLOCKS/HTML:WITH-HTML macro to render HTML. You can use any other templating engine, just ensure it writes output to REBLOCKS/HTML:*STREAM*

Outer DIV wrapper will be added automaticall. It will have CSS tags returned by GET-CSS-CLASSES.

Package

reblocks/widget.

Source

file-type.lisp.

Methods
Method: render :around (widget)

This function is intended for internal usage only.
It renders widget with surrounding HTML tag and attributes.

Source

file-type.lisp.

Method: render (widget)

By default, widget rendered with a text, suggesting to define a rendering method.

Source

file-type.lisp.

Method: render ((widget preview-widget))
Source

file-type.lisp.

Method: render ((widget welcome-screen-widget))
Source

file-type.lisp.

Method: render ((widget funcall-widget))
Source

file-type.lisp.

Method: render ((widget string-widget))
Source

file-type.lisp.

Generic Function: render (app inner-html &key dependencies)

Renders HTML page for the current application.

By default, it renders:

* HTML <head> where calls
RENDER-HEADERS generic-function and RENDER-DEPENDENCIES generic-function.
* HTML <body> where RENDER-BODY generic-function is called with APP and INNER-HTML arguments.

Package

reblocks/page.

Source

file-type.lisp.

Methods
Method: render ((app app) inner-html &key dependencies)

Default page rendering template and protocol.

Generic Function: render-body (app body-html-string)

By default, it just renders BODY-HTML-STRING as is, without escaping.

BODY-HTML-STRING argument contains a rendered widget tree, generated by REBLOCKS/WIDGET:RENDER generic-function call on the root widget.

Package

reblocks/page.

Source

file-type.lisp.

Methods
Method: render-body ((app app) body-html-string)

Default page-body rendering method

Generic Function: render-dependencies (app dependencies)

Renders links to CSS and JS dependencies.

DEPENDENCIES argument contains a list of
objects inherited from REBLOCKS/DEPENDENCIES:DEPENDENCY class.

Package

reblocks/page.

Source

file-type.lisp.

Methods
Method: render-dependencies ((app app) dependencies)
Generic Function: render-headers (app)

By default, adds <meta> entries with Content-Type, description and keywords to the app’s page.

Package

reblocks/page.

Source

file-type.lisp.

Methods
Method: render-headers ((app app))
Generic Function: render-in-ajax-response (dependency)

Returns a JS code to dynamically include a CSS or JS dependency
into a webpage on AJAX response.

This makes possible to load new styles and code for widgets which can appear on a page as a response to some action.

Package

reblocks/dependencies.

Source

file-type.lisp.

Methods
Method: render-in-ajax-response ((dependency dependency))
Source

file-type.lisp.

Method: render-in-ajax-response (dependency)
Generic Function: render-in-head (dependency)

Renders a piece of html.

Package

reblocks/dependencies.

Source

file-type.lisp.

Methods
Method: render-in-head ((dependency remote-dependency))
Method: render-in-head ((dependency dependency))
Method: render-in-head (dependency)
Generic Function: serve (dependency)

Returns two values - content and content-type.

Example output::

(values "body {background: light-green;}" "text/css")

Package

reblocks/dependencies.

Source

file-type.lisp.

Methods
Method: serve ((dependency cached-remote-dependency))

Serves remote dependency from local cache.

Method: serve ((dependency local-dependency))

Serves local dependency from the disk.

Generic Function: serve (route env)

Methods should return a list like that:

“‘lisp
(list 200 ;; status-code (list :content-type content-type) ;; headers content) ;; content “‘

Package

reblocks/routes.

Source

file-type.lisp.

Methods
Method: serve ((route static-route-from-file) env)

Returns a file’s content

Source

file-type.lisp.

Method: serve :around (route env)

This method handles unhandled exceptions, because this code is common for all routes.

Source

file-type.lisp.

Method: serve ((route dependency-route) env)
Source

file-type.lisp.

Method: serve ((route route) env)
Generic Function: serve-static-file (uri object &key content-type)

Adds a route to serve given object by static URI.

Package

reblocks/server.

Source

file-type.lisp.

Methods
Method: serve-static-file (uri (path pathname) &key content-type)
Generic Function: update (w &key inserted-after inserted-before)

This method should be called to update widget on a client.

Usually this required as a result of an action execution.

In the original Weblocks there was a mark-dirty method. This one replaces it. To make everything easier, the new protocol excludes "propagation". If you need to update other widgets, please define an "update" method for your widget. You can use :before or :after modifiers, to keep the current behavior and to add propagation code.

Package

reblocks/widget.

Source

file-type.lisp.

Methods
Method: update ((w widget) &key inserted-after inserted-before)

5.1.5 Standalone methods

Method: compute-effective-slot-definition ((class widget-class) slot-name dslotds)
Package

sb-mop.

Source

file-type.lisp.

Method: direct-slot-definition-class ((class widget-class) &rest initargs)
Package

sb-mop.

Source

file-type.lisp.

Method: effective-slot-definition-class ((class widget-class) &rest initargs)
Package

sb-mop.

Source

file-type.lisp.

Method: initialize-instance :after ((class widget-class) &key &allow-other-keys)
Source

file-type.lisp.

Method: initialize-instance :after ((self app) &rest initargs)

Add some defaults to the slots.

Source

file-type.lisp.

Method: initialize-instance :after ((dependency remote-dependency) &rest initargs)

Creating a route for the dependency if it is "local".

This way it will be possible to serve requests for this dependency from a browser.

Source

file-type.lisp.

Method: initialize-instance :after ((dependency local-dependency) &rest initargs)

Creating a route for the dependency if it is "local".

This way it will be possible to serve requests for this dependency from a browser.

Source

file-type.lisp.

Method: print-object ((server server) stream)
Source

file-type.lisp.

Method: print-object ((object remote-dependency) stream)
Source

file-type.lisp.

Method: print-object ((object local-dependency) stream)
Source

file-type.lisp.

Method: print-object ((obj page) stream)
Source

file-type.lisp.

Method: shared-initialize :after ((self app-class) slots &key autostart &allow-other-keys)
Source

file-type.lisp.

Method: validate-superclass ((self app-class) (super standard-class))
Package

sb-mop.

Source

file-type.lisp.

Method: validate-superclass ((class widget-class) (superclass standard-class))
Package

sb-mop.

Source

file-type.lisp.


5.1.6 Conditions

Condition: immediate-response
Package

reblocks/response.

Source

file-type.lisp.

Direct superclasses

condition.

Direct subclasses

redirect.

Direct methods

get-response.

Direct slots
Slot: response
Initargs

:response

Readers

get-response.

Writers

This slot is read-only.

Condition: redirect
Package

reblocks/response.

Source

file-type.lisp.

Direct superclasses

immediate-response.


5.1.7 Classes

Class: app

A class that encapsulates a unique web application and all relevant rnesources. A webapp is a unique set of dependencies and information that can be enabled or disabled independently of others. Multiple webapps can be active concurrently and incoming connections are dispatched to the root of the webapp according to a prefix parameter that defines the URLs parsed by that webapp. The webapp does not see the prefix parameter in URLs that are provided to it. You can, for instance, have different sites (e.g. mobile vs. desktop) with vastly different layout and dependencies running on the same server.

Package

reblocks/app.

Source

file-type.lisp.

Direct subclasses
Direct methods
Direct slots
Slot: name
Type

(or symbol string)

Initargs

:name

Readers

reblocks-webapp-name.

Writers

(setf reblocks-webapp-name).

Slot: description

The name of the application. This slot will be used
by ’application-page-title’ to generate the default title for each page.

Type

(or null string)

Initargs

:description

Readers

reblocks-webapp-description.

Writers

(setf reblocks-webapp-description).

Slot: js-backend

Specify a javascript backend for framework (default is :jquery)

Initform

:jquery

Initargs

:js-backend

Readers

get-js-backend.

Writers

(setf get-js-backend).

Slot: hostnames

The hostnames (a list of strings) reserved for this webapp.
See section 14.32 of RFC 2616.

Example: ’("foo.com" "www.foo.com" "shoo.bar.org")
Wildcard patterns are also allowed. Example: ’("foo.*.com")
If NIL (the default), don’t care about the hostname at all.
TODO: support regex matching here.

Type

list

Initargs

:hostnames

Readers

reblocks-webapp-hostnames.

Writers

This slot is read-only.

Slot: prefix

The subtree of the URI space at this site that belongs to the webapp.

Type

string

Initargs

:prefix

Readers

get-prefix.

Writers

This slot is read-only.

Slot: session-key
Type

symbol

Initargs

:session-key

Readers

reblocks-webapp-session-key.

Writers

(setf reblocks-webapp-session-key).

Slot: debug

Responsible for debug mode, use WEBAPP-DEBUG function for getting slot value

Package

common-lisp.

Initargs

:debug

Readers

reblocks-webapp-debug.

Writers

(setf reblocks-webapp-debug).

Class: dependency

This class represents a web-dependency. It could be CSS, JS or an image.

All dependencies are divided into REMOTE-DEPENDENCY or LOCAL-DEPENDENCY.

Package

reblocks/dependencies.

Source

file-type.lisp.

Direct subclasses
Direct methods
Direct slots
Slot: type
Package

common-lisp.

Type

(member :css :js :png :jpg :gif)

Initform

(error ":type argument is required.")

Initargs

:type

Readers

get-type.

Writers

This slot is read-only.

Class: dom-object-mixin

Represents attributes and functionality common to all DOM-renderable objects.

Package

reblocks/widgets/dom.

Source

file-type.lisp.

Direct subclasses

widget.

Direct methods
Direct slots
Slot: dom-id

The DOM id of an object. Can be a symbol, a
string or nil. When accessed through the ’dom-id’ accessor, will always become a string. Use ensure-dom-id or widget-name (for widgets) to access its underlying implementation.

Initargs

:dom-id

Class: js-backend
Package

reblocks/js/base.

Source

file-type.lisp.

Direct subclasses

jquery-backend.

Class: local-dependency

Local dependencies are served by the same webserver which renders reblocks widgets.

Each local dependency should provide a route, which will be added to the server routing table. Also, it might define a path to the file on the local file-system.

Package

reblocks/dependencies.

Source

file-type.lisp.

Direct superclasses

dependency.

Direct subclasses

cached-remote-dependency.

Direct methods
Direct slots
Slot: route
Initargs

:route

Readers

get-route.

Writers

This slot is read-only.

Slot: path
Type

(or pathname null)

Initargs

:path

Readers

get-path.

Writers

This slot is read-only.

Slot: binary
Type

(or null t)

Initargs

:binary

Readers

is-binary.

Writers

This slot is read-only.

Slot: cache-in-memory

When true, then on creation dependency will read file’s data into the memory.
This is useful for applications, deployed as a single executable file. Create such dependencies in compile time and store in a global variable.

Type

(or null t)

Initargs

:cache-in-memory

Readers

cache-in-memory-p.

Writers

This slot is read-only.

Slot: cached-data
Type

(or null simple-array)

Class: page
Package

reblocks/page.

Source

file-type.lisp.

Direct methods
Direct slots
Slot: id
Type

uuid:uuid

Initform

(uuid:make-v4-uuid)

Readers

page-id.

Writers

This slot is read-only.

Slot: path
Type

string

Initargs

:path

Readers

page-path.

Writers

This slot is read-only.

Slot: created-at
Type

local-time:timestamp

Initform

(local-time:now)

Readers

page-created-at.

Writers

This slot is read-only.

Slot: expire-at
Type

(or null local-time:timestamp)

Initargs

:expire-at

Readers

page-expire-at.

Writers

(setf page-expire-at).

Slot: code-to-action
Initform

(make-hash-table :test (quote equal))

Readers

page-actions.

Writers

This slot is read-only.

Slot: root-widget
Initargs

:root-widget

Readers

page-root-widget.

Writers

(setf page-root-widget).

Slot: id-to-widget
Initform

(serapeum:dict)

Readers

id-to-widget.

Writers

This slot is read-only.

Slot: app
Package

reblocks/app.

Initform

reblocks/variables:*current-app*

Initargs

:app

Readers

page-app.

Writers

(setf page-app).

Slot: metadata-lock
Initform

(bordeaux-threads:make-recursive-lock "page metadata")

Readers

%metadata-lock.

Writers

(setf %metadata-lock).

Slot: metadata
Initform

(make-hash-table :test (quote equal))

Readers

%page-metadata.

Writers

This slot is read-only.

Class: preview
Package

reblocks/preview.

Source

file-type.lisp.

Direct superclasses

app.

Direct methods

init-page.

Direct Default Initargs
InitargValue
:prefix/
Class: remote-dependency

Remote dependencies refer some URLs. Usually these dependencies are served from a CDN.

Package

reblocks/dependencies.

Source

file-type.lisp.

Direct superclasses

dependency.

Direct subclasses

cached-remote-dependency.

Direct methods
Direct slots
Slot: remote-url
Type

string

Initargs

:remote-url

Readers

get-remote-url.

Writers

This slot is read-only.

Slot: integrity

A hash, used by modern browsers for subresource integrity checking.

See more information at: <https://www.w3.org/TR/SRI/>

Type

(or string null)

Initargs

:integrity

Readers

get-integrity.

Writers

This slot is read-only.

Slot: crossorigin
Type

(or string null)

Initform

"anonymous"

Initargs

:crossorigin

Readers

get-crossorigin.

Writers

This slot is read-only.

Class: route

Inherit from this class to add a custom routes.

Package

reblocks/routes.

Source

file-type.lisp.

Direct superclasses

route.

Direct subclasses

static-route-from-file.

Direct methods
Direct slots
Slot: handler
Initargs

:handler

Readers

get-handler.

Writers

This slot is read-only.

Slot: content-type
Initform

"application/json"

Initargs

:content-type

Readers

get-content-type.

Writers

This slot is read-only.

Class: server

Base class for all Reblocks servers. Redefine it if you want to add additional HTTP midlewares, etc.

Package

reblocks/server.

Source

file-type.lisp.

Direct methods
Direct slots
Slot: port
Type

integer

Initargs

:port

Readers

get-port.

Writers

This slot is read-only.

Slot: interface
Type

string

Initargs

:interface

Readers

get-interface.

Writers

This slot is read-only.

Slot: server-type
Initargs

:server-type

Readers

get-server-type.

Writers

This slot is read-only.

Slot: handler
Readers

get-handler.

Writers

(setf get-handler).

Slot: routes
Initform

(reblocks/routes::make-routes)

Readers

routes.

Writers

(setf routes).

Slot: apps
Readers

apps.

Writers

(setf apps).

Class: string-widget
Package

reblocks/widgets/string-widget.

Source

file-type.lisp.

Direct superclasses

widget.

Direct methods
Direct slots
Slot: content
Type

string

Initargs

:content

Readers

get-content.

Writers

(setf get-content).

Slot: escape-p

Whether to escape the output for HTML.

Type

boolean

Initform

t

Initargs

:escape-p

Readers

escape-p.

Writers

(setf escape-p).

Class: widget

Base class for all widget objects.

Package

reblocks/widget.

Source

file-type.lisp.

Direct superclasses

dom-object-mixin.

Direct subclasses
Direct methods
Direct slots
Slot: propagate-dirty

A list of widgets which will be made
dirty when this widget is made dirty via a POST request. This slot allows setting up dependencies between widgets that will make multiple widgets update automatically during AJAX requests.

Initargs

:propagate-dirty

Readers

widget-propagate-dirty.

Writers

(setf widget-propagate-dirty).

Slot: continuation

Stores the continuation object for
widgets that were invoked via one of the do-* functions (’do-page’, etc.). When ’answer’ is called on a widget, this value is used to resume the computation.

Readers

widget-continuation.

Writers

(setf widget-continuation).

Class: widget-class

A metaclass used for all widget classes. A custom metaclass is necessary to specialize ’slot-value-using-class’.

Package

reblocks/widgets/mop.

Source

file-type.lisp.

Direct superclasses

standard-class.

Direct methods

5.2 Internals


5.2.1 Special variables

Special Variable: !get-number-of-anonymous-sessions

This variable will contain a function after the session middleware will be created.

Package

reblocks/session.

Source

file-type.lisp.

Special Variable: !get-number-of-sessions

This variable will contain a function after the session middleware will be created.

Package

reblocks/session.

Source

file-type.lisp.

Special Variable: !map-sessions

This variable will contain a function after the session middleware will be created.

Package

reblocks/session.

Source

file-type.lisp.

Special Variable: *allowed-samesite-policies*
Package

reblocks/session.

Source

file-type.lisp.

Special Variable: *application-hooks*

A request hook object used in the application scope.

Package

reblocks/hooks.

Source

file-type.lisp.

Special Variable: *apps-actions*

This hash maps app classes to hashes which store application’s actions.

Package

reblocks/app-actions.

Source

file-type.lisp.

Special Variable: *asdf-system-cache*
Package

reblocks/utils/misc.

Source

file-type.lisp.

Special Variable: *autostarting-apps*

A list of webapps to start when start-reblocks is called

Package

reblocks/app-mop.

Source

file-type.lisp.

Special Variable: *clack-output*

Here we’ll store all output from the Clack, because we don’t want it to mix with reblocks own output.

Package

reblocks/server.

Source

file-type.lisp.

Special Variable: *commands*

A list of commands to execute on a client as a result of action call.

These commands are collected during action processing and rendered to resulting JSON as some sort of JSON-rpc calls to be esecuted on a client-side.

Package

reblocks/commands.

Source

file-type.lisp.

Special Variable: *config*

Stores options of last call to (on) or nil if it newer called.

The value of this variable is returned by (status) call as a second value.

Package

reblocks/debug.

Source

file-type.lisp.

Special Variable: *current-page*
Package

reblocks/page.

Source

file-type.lisp.

Special Variable: *default-language*
Package

reblocks/page.

Source

file-type.lisp.

Special Variable: *description*
Package

reblocks/page.

Source

file-type.lisp.

Special Variable: *env*

Stores current lack environment to configure session’s behaviour.

Package

reblocks/session.

Source

file-type.lisp.

Special Variable: *jquery-dependencies*
Package

reblocks/js/jquery.

Source

file-type.lisp.

Special Variable: *js-dependencies-cache*
Package

reblocks/js/jquery.

Source

file-type.lisp.

Special Variable: *keywords*
Package

reblocks/page.

Source

file-type.lisp.

Special Variable: *language*
Package

reblocks/page.

Source

file-type.lisp.

Special Variable: *on*

When true, then Reblocks will be saving addional information useful for debugging.

Package

reblocks/debug.

Source

file-type.lisp.

Special Variable: *page-dependencies*

A list which contains all page dependencies.

Reblocks fills this list during page rendering.

Package

reblocks/page-dependencies.

Source

file-type.lisp.

Special Variable: *pages-cleaner-thread*
Package

reblocks/page.

Source

file-type.lisp.

Special Variable: *pages-cleaner-thread-lock*
Package

reblocks/page.

Source

file-type.lisp.

Special Variable: *port*

A port where preview server is listening.

Package

reblocks/preview.

Source

file-type.lisp.

Special Variable: *registered-apps*

A list of applications that the system knows about

Package

reblocks/app-mop.

Source

file-type.lisp.

Special Variable: *request*

Holds current request from a browser.

Package

reblocks/request.

Source

file-type.lisp.

Special Variable: *request-hooks*

A request hooks object used in the request scope.

Package

reblocks/hooks.

Source

file-type.lisp.

Special Variable: *response*

Current response object. It’s status code and headers can be changed when processing a request.

Package

reblocks/response.

Source

file-type.lisp.

Special Variable: *routes*

This variable will be bound to the server’s routes during request processing.
Most functions in the REBLOCKS/ROUTES package will work only when this variable is bound.

Package

reblocks/routes.

Source

file-type.lisp.

Special Variable: *server*

Will be bound to a server currently processing the request.

Package

reblocks/server.

Source

file-type.lisp.

Special Variable: *servers*
Package

reblocks/server.

Source

file-type.lisp.

Special Variable: *session*

Stores current requests’s session

Package

reblocks/session.

Source

file-type.lisp.

Special Variable: *session-hooks*

A session hooks object is stored in user’s session and should be bound to this variable by ‘prepare-hooks’ macro.

Package

reblocks/hooks.

Source

file-type.lisp.

Special Variable: *session-lock-table-lock*
Package

reblocks/session.

Source

file-type.lisp.

Special Variable: *session-locks*

Per-session locks to avoid having unrelated threads waiting.

Package

reblocks/session.

Source

file-type.lisp.

Special Variable: *timing-level*
Package

reblocks/utils/timing.

Source

file-type.lisp.

Special Variable: *title*
Package

reblocks/page.

Source

file-type.lisp.

Special Variable: *widget*
Package

reblocks/preview.

Source

file-type.lisp.


5.2.2 Macros

Macro: add-application-hook (hook-name callback-name (&rest args) &body body)
Package

reblocks/hooks.

Source

file-type.lisp.

Macro: add-request-hook (hook-name callback-name (&rest args) &body body)
Package

reblocks/hooks.

Source

file-type.lisp.

Macro: add-session-hook (hook-name callback-name (&rest args) &body body)

Registers a new session hook like that:

(add-session-hook :request update-dialog () (do-some-useful job))

Package

reblocks/hooks.

Source

file-type.lisp.

Macro: def-get-set (variable)

Generates a function get-<variable> and a corresponding setf part.

Package

reblocks/page.

Source

file-type.lisp.

Macro: prepare-hooks (&body body)

Prepares internal special variables for request processing.

It takes hooks from user session and creates an empty hooks list bound to a current request.

Package

reblocks/hooks.

Source

file-type.lisp.

Macro: with-handled-errors (&body body)
Package

reblocks/error-handler.

Source

file-type.lisp.

Macro: with-hook ((name &rest args) &rest body)

Performs nested calls of all the hooks of name, the innermost call is a closure over the body expression. All hooks take at least one argument, which is a list of inner hooks. After doing their job, they apply the first element of the list to the rest, but this machanics is hidden by add-(application|session|request)-hook macroses:

(add-session-hook :action
log-action (action)
(log:info "Before calling" action)
(call-next-hook)
(log:info "After calling" action))

Next, somewhere in the code, where action is called:

(with-hook (:action action-object)
;; any custom code here
(process action-object))

Streamlined code execution will looks like:

(defun action-handler (action-object)
(log:info "Before calling" action-object)
(process action-object)
(log:info "After calling" action-object))

Package

reblocks/hooks.

Source

file-type.lisp.

Macro: with-page-defaults (&body body)
Package

reblocks/page.

Source

file-type.lisp.

Macro: with-response (() &body body)
Package

reblocks/response.

Source

file-type.lisp.

Macro: with-session-lock ((&optional session) &body body)
Package

reblocks/session.

Source

file-type.lisp.


5.2.3 Ordinary functions

Function: %check-boundaries (list index)
Package

reblocks/utils/list.

Source

file-type.lisp.

Function: %common-init (app)
Package

reblocks/default-init.

Source

file-type.lisp.

Function: %insert-after-without-boundaries-check (newelt list index)

Destructively inserts ’newelt’ into ’list’ after ’index’.

Package

reblocks/utils/list.

Source

file-type.lisp.

Function: %js (source &rest args)

Helper function for WITH-JAVASCRIPT macros.

Package

reblocks/js/base.

Source

file-type.lisp.

Function: add-hook (hooks hook-name callback-name callback)

Adds a callback to the callbacks list with name ‘hook-name’.

Package

reblocks/hooks.

Source

file-type.lisp.

Function: add-hook-helper (hook-storage hook-name callback-name args body error-message-on-empty-storage)
Package

reblocks/hooks.

Source

file-type.lisp.

Function: add-route (route &key routes)

Inserts a new route into the routing table.

Package

reblocks/routes.

Source

file-type.lisp.

Function: add-routes (app &key routes)

Inserts all routes bound to the app into the routing table.

Package

reblocks/routes.

Source

file-type.lisp.

Function: allowed-samesite-policy-p (value)
Package

reblocks/session.

Source

file-type.lisp.

Function: app-serves-hostname-p (app hostname)

Does APP serve requests for HOSTNAME?

Package

reblocks/app.

Source

file-type.lisp.

Function: call-in-webapp (app proc)

Helper for ‘in-webapp’.

Package

reblocks/app.

Source

file-type.lisp.

Function: call-with-handled-errors (body-func)
Package

reblocks/error-handler.

Source

file-type.lisp.

Function: call-with-page-defaults (body-func)
Package

reblocks/page.

Source

file-type.lisp.

Function: call-with-response (thunk)
Package

reblocks/response.

Source

file-type.lisp.

Function: call-with-session (lack-env func)
Package

reblocks/session.

Source

file-type.lisp.

Function: call-with-session-lock (session thunk)
Package

reblocks/session.

Source

file-type.lisp.

Function: check-if-valid-class-name (name)

Ensure that the we have a valid webapp class

Package

reblocks/app.

Source

file-type.lisp.

Function: cl-symbol-to-js-symbol (symbol)

A little helper to transform symbols like :foo-baz-bar into keywords :|fooBazBar|.

Package

reblocks/commands.

Source

file-type.lisp.

Function: congruent-lambda-expression (lambda-list function)

Answer a lambda expression with LAMBDA-LIST that passes all args (assuming the call is allowed by LAMBDA-LIST) to FUNCTION, answering its result.

Package

reblocks/utils/misc.

Source

file-type.lisp.

Function: create-command (name &rest args)

Prepares command for rendering into JSON-rpc style dict.

Package

reblocks/commands.

Source

file-type.lisp.

Function: ensure-pages-cleaner-is-running ()
Package

reblocks/page.

Source

file-type.lisp.

Function: ensure-starts-with-slash (s)
Package

reblocks/utils/string.

Source

file-type.lisp.

Function: escape-script-tags (source &key delimiter)

Escape script blocks inside scripts.

Package

reblocks/js/base.

Source

file-type.lisp.

Function: eval-hook-callbacks (hooks name args)

Internal function to eval hooks from all three hook storages.

Package

reblocks/hooks.

Source

file-type.lisp.

Function: eval-next-hooks (next-hooks &rest args)

Helper function that makes it easier to write dynamic hooks.

It whould be called somewhere inside a hook, to evaluate inner hooks. But you don’t need to call it manually, just use one of add-xxxx-hook and a (call-next-hook) inside of it.

Package

reblocks/hooks.

Source

file-type.lisp.

Function: expire-pages ()

Removes from memory expired pages. This function is called periodically
from a separate thread.

Returns a multiple values with counters:

- processed-sessions
- processed-pages
- expired-sessions-count
- sessions-without-restart-count (non-expired but should be expired, if reblocks works correctly you should see 0 here) - expired-pages-count

Package

reblocks/page.

Source

file-type.lisp.

Function: extend-expiration-time-impl (app page)
Package

reblocks/page.

Source

file-type.lisp.

Function: find-app-by-name (active-apps name &key signal-error)

Get a running web application

Package

reblocks/app.

Source

file-type.lisp.

Function: find-page-by-path (session-pages path)
Package

reblocks/page.

Source

file-type.lisp.

Function: find-server (interface port)
Package

reblocks/server.

Source

file-type.lisp.

Function: generate-action-code ()

Generates unique, hard to guess action codes.

Package

reblocks/actions.

Source

file-type.lisp.

Function: get-action-name-from-request ()

Returns called action name if any action was called

Package

reblocks/request.

Source

file-type.lisp.

Function: get-callback-name (callback)
Package

reblocks/hooks.

Source

file-type.lisp.

Function: get-callback-value (callback)
Package

reblocks/hooks.

Source

file-type.lisp.

Function: get-callbacks (hooks name)

Internal function to get callbacks list from a hooks storage.

Package

reblocks/hooks.

Source

file-type.lisp.

Function: get-callbacks-names (hooks name)

Internal function to get a list of callbacks names from a hooks storage.

Package

reblocks/hooks.

Source

file-type.lisp.

Function: get-css-classes-as-string (widget)
Package

reblocks/widget.

Source

file-type.lisp.

Function: get-default-content-type-for-response ()
Package

reblocks/response.

Source

file-type.lisp.

Function: get-lock (&optional session)
Package

reblocks/session.

Source

file-type.lisp.

Function: get-or-create-session-hooks ()

A request hook object used in the session scope.

Package

reblocks/hooks.

Source

file-type.lisp.

Function: get-rendered-chunk ()

Returns a string containing HTML redered since last call to with-html, with-html-string or get-rendered-chunk.

Call to this function clears internal stream, used for rendering!

Package

reblocks/html.

Source

file-type.lisp.

Function: get-request-action (app action-name)

Gets an action from the request. If the request contains
a parameter with name equal to *ACTION-STRING* variable, the action
is looked up in the session and appropriate function is returned.
If no action is in the parameter, returns NIL. If the action
isn’t in the session (somehow invalid), raises an assertion.

Returns two values: an action and the optional page where it was instantiated.

Package

reblocks/actions.

Source

file-type.lisp.

Function: get-session-action (action-name)

Returns an action bound to the current session.

Package

reblocks/actions.

Source

file-type.lisp.

Function: handle-action-if-needed (app)
Package

reblocks/request-handler.

Source

file-type.lisp.

Function: hostname-match-p (pattern hostname)
Package

reblocks/app.

Source

file-type.lisp.

Function: initialize-session-pages ()
Package

reblocks/page.

Source

file-type.lisp.

Function: internal-make-action (action-fn &optional action-code)

Converts a function into an action that can be rendered into HTML. A unique, hard to guess string is generated for the function, and a function is added to the session hashtable under this string. The
string is then returned. When later requests come in, ’get-request-action’ machinery determines if the action string that
came with the request is stored in the hashtable, and if so, invokes
the stored function.

ACTION-FN - A function that will be called if the user initiates appropriate control (link, form, etc.) GET and POST parameters will be passed to this function as keyword arguments by the framework.

ACTION-CODE - The code to use for an action (if not specified INTERNAL-MAKE-ACTION generates a unique value for each action). Note, if you don’t provide a hard to guess code (’generate-action-code’ is used by default), the user will be vulnerable to an attack where a malicious attacker can attempt to guess a dangerour action id and send the user
a link to it. Only use guessable action codes for GET actions.

Package

reblocks/actions.

Source

file-type.lisp.

Function: log-hooks (name)

A helper function to log all known hooks with given name.

Package

reblocks/hooks.

Source

file-type.lisp.

Function: make-response-for-clack (response)
Package

reblocks/server.

Source

file-type.lisp.

Function: make-route (uri dependency)

Makes a route for dependency.

Automatically adds a prefix depending on current webapp and widget.

Package

reblocks/dependencies.

Source

file-type.lisp.

Function: make-routes ()
Package

reblocks/routes.

Source

file-type.lisp.

Function: make-server (&key port interface server-type server-class)

Makes a webserver instance.
Make instance, then start it with “start“ method.

Package

reblocks/server.

Source

file-type.lisp.

Function: map-sessions (thunk &rest keys)
Package

reblocks/session.

Source

file-type.lisp.

Function: maybe-add-trailing-slash (s)

Supply a trailing slash if needed.

Package

reblocks/utils/string.

Source

file-type.lisp.

Function: merge-files (file-list saved-path &key element-type linkage-element-fn)
Package

reblocks/utils/misc.

Source

file-type.lisp.

Function: normalize (action-name)
Package

reblocks/app-actions.

Source

file-type.lisp.

Function: page-expired-p (page)
Package

reblocks/page.

Source

file-type.lisp.

Function: pages-cleaner-loop ()
Package

reblocks/page.

Source

file-type.lisp.

Function: parse-location-hash ()
Package

reblocks/request.

Source

file-type.lisp.

Function: query-string->alist (query-string)
Package

reblocks/utils/uri.

Source

file-type.lisp.

Function: register-app-routes (server app)

Make sure the app with the "" prefix is always the last one and that there is only one!

Package

reblocks/server.

Source

file-type.lisp.

Function: register-dependencies (dependencies)

Adds dependencies to the router to make HTTP server handle them.

Package

reblocks/dependencies.

Source

file-type.lisp.

Function: register-widget (widget)
Package

reblocks/page.

Source

file-type.lisp.

Function: remove-action-from-uri (uri)

Removes the action info from a URI.

Package

reblocks/request-handler.

Source

file-type.lisp.

Function: remove-url-query-string (str)
Package

reblocks/utils/uri.

Source

file-type.lisp.

Function: report-timing (name real cpu)
Package

reblocks/utils/timing.

Source

file-type.lisp.

Function: reset-session (session)

Internal function for session reset.

Package

reblocks/session-reset.

Source

file-type.lisp.

Function: reset-session-hooks ()
Package

reblocks/hooks.

Source

file-type.lisp.

Function: search-app-for-request-handling (path-info hostname)
Package

reblocks/server.

Source

file-type.lisp.

Function: sort-webapps (webapps)
Package

reblocks/app.

Source

file-type.lisp.

Function: start-app (server app-class &rest app-args)
Package

reblocks/server.

Source

file-type.lisp.

Function: start-server (server &key debug samesite-policy)

Starts a Clack webserver, returns this server as result.

If server is already started, then logs a warning and does nothing.

Package

reblocks/server.

Source

file-type.lisp.

Function: stop-server (server)

Stops a Clack server, but does not deactivates active applications, use ‘stop’ function for that.

Package

reblocks/server.

Source

file-type.lisp.

Function: strip-trailing-slashes (str)

Relentlessly strip all trailing slashes from STR.
A string solely consisting of slashes is no special case.

Returns the number of stripped slashes as second value.

Package

reblocks/utils/string.

Source

file-type.lisp.

Function: unattributized-name (name &optional type-marker)

Call ‘attributize-name’ with NAME and modify the result to be a variant that is still usable in all cases where ‘attributize-name’ results can be used, but is extremely unlikely to ever be returned by ‘attributize-name’.

TYPE-MARKER is just a label for human discernment of the different users of this function.

Package

reblocks/utils/string.

Source

file-type.lisp.

Function: webapp-debug (&optional app)

Whether APP is in debug mode.

Package

reblocks/app.

Source

file-type.lisp.

Function: webapp-description (&optional app)

Returns the description of the web application. Please note, this description will be used for the composition of the page title displayed to the user. See ’application-page-title’ for details.

Package

reblocks/app.

Source

file-type.lisp.

Function: webapp-hostnames (&optional app)

Returns the hostnames this application will serve requests for.

Package

reblocks/app.

Source

file-type.lisp.

Function: webapp-name (&optional app)

Returns the name of the web application (also see ’defwebapp’). Please note, this name will be used for the composition of the page title displayed to the user. See ’application-page-title’ for details.

Package

reblocks/app.

Source

file-type.lisp.


5.2.4 Generic functions

Generic Reader: %metadata-lock (object)
Package

reblocks/page.

Methods
Reader Method: %metadata-lock ((page page))

automatically generated reader method

Source

file-type.lisp.

Target Slot

metadata-lock.

Generic Writer: (setf %metadata-lock) (object)
Package

reblocks/page.

Methods
Writer Method: (setf %metadata-lock) ((page page))

automatically generated writer method

Source

file-type.lisp.

Target Slot

metadata-lock.

Generic Reader: %page-metadata (object)
Package

reblocks/page.

Methods
Reader Method: %page-metadata ((page page))

automatically generated reader method

Source

file-type.lisp.

Target Slot

metadata.

Generic Reader: apps (object)
Package

reblocks/server.

Methods
Reader Method: apps ((server server))

automatically generated reader method

Source

file-type.lisp.

Target Slot

apps.

Generic Writer: (setf apps) (object)
Package

reblocks/server.

Methods
Writer Method: (setf apps) ((server server))

automatically generated writer method

Source

file-type.lisp.

Target Slot

apps.

Generic Function: ensure-dom-id (obj)

Ensure that the object has a ’dom-id’ and return
it. ’dom-id’ is lazily generated on first read, because its creation requires a session to be present. Returns a string, symbol, or nil.

Package

reblocks/widgets/dom.

Source

file-type.lisp.

Methods
Method: ensure-dom-id ((obj dom-object-mixin))
Generic Function: finalize-webapp (app)

Called when the app has been pulled off the running list to perform any webapp specific cleanup

Package

reblocks/app.

Source

file-type.lisp.

Methods
Method: finalize-webapp (app)
Generic Reader: get-content-type (object)
Package

reblocks/server.

Methods
Reader Method: get-content-type ((static-route-from-file static-route-from-file))

automatically generated reader method

Source

file-type.lisp.

Target Slot

content-type.

Generic Reader: get-content-type (object)
Package

reblocks/routes.

Methods
Reader Method: get-content-type ((route route))

automatically generated reader method

Source

file-type.lisp.

Target Slot

content-type.

Generic Reader: get-dependency (object)
Package

reblocks/dependencies.

Methods
Reader Method: get-dependency ((dependency-route dependency-route))

automatically generated reader method

Source

file-type.lisp.

Target Slot

dependency.

Generic Reader: get-function (object)
Package

reblocks/widgets/funcall-widget.

Methods
Reader Method: get-function ((funcall-widget funcall-widget))

automatically generated reader method

Source

file-type.lisp.

Target Slot

function.

Generic Writer: (setf get-function) (object)
Package

reblocks/widgets/funcall-widget.

Methods
Writer Method: (setf get-function) ((funcall-widget funcall-widget))

automatically generated writer method

Source

file-type.lisp.

Target Slot

function.

Generic Reader: get-handler (object)
Package

reblocks/server.

Methods
Reader Method: get-handler ((server server))

automatically generated reader method

Source

file-type.lisp.

Target Slot

handler.

Generic Writer: (setf get-handler) (object)
Package

reblocks/server.

Methods
Writer Method: (setf get-handler) ((server server))

automatically generated writer method

Source

file-type.lisp.

Target Slot

handler.

Generic Reader: get-handler (object)
Package

reblocks/routes.

Methods
Reader Method: get-handler ((route route))

automatically generated reader method

Source

file-type.lisp.

Target Slot

handler.

Generic Reader: get-interface (object)
Package

reblocks/server.

Methods
Reader Method: get-interface ((server server))

automatically generated reader method

Source

file-type.lisp.

Target Slot

interface.

Generic Reader: get-js-backend (object)
Generic Writer: (setf get-js-backend) (object)
Package

reblocks/app.

Methods
Reader Method: get-js-backend ((app app))
Writer Method: (setf get-js-backend) ((app app))

Specify a javascript backend for framework (default is :jquery)

Source

file-type.lisp.

Target Slot

js-backend.

Generic Reader: get-path (object)
Package

reblocks/server.

Methods
Reader Method: get-path ((static-route-from-file static-route-from-file))

automatically generated reader method

Source

file-type.lisp.

Target Slot

path.

Generic Reader: get-port (object)
Package

reblocks/server.

Methods
Reader Method: get-port ((server server))

automatically generated reader method

Source

file-type.lisp.

Target Slot

port.

Generic Reader: get-remote-url (object)
Package

reblocks/dependencies.

Methods
Reader Method: get-remote-url ((remote-dependency remote-dependency))

automatically generated reader method

Source

file-type.lisp.

Target Slot

remote-url.

Generic Reader: get-server-type (object)
Package

reblocks/server.

Methods
Reader Method: get-server-type ((server server))

automatically generated reader method

Source

file-type.lisp.

Target Slot

server-type.

Generic Function: handle-http-request (server env)

Handles HTTP request, passed by Clack

Package

reblocks/server.

Source

file-type.lisp.

Methods
Method: handle-http-request ((server server) env)

Reblocks HTTP dispatcher.
This function serves all started applications and their static files.

Method: handle-http-request :around ((server server) env)
Generic Function: handle-normal-request (app)
Package

reblocks/request-handler.

Methods
Method: handle-normal-request ((app app))
Source

file-type.lisp.

Generic Reader: id-to-widget (object)
Package

reblocks/page.

Methods
Reader Method: id-to-widget ((page page))

automatically generated reader method

Source

file-type.lisp.

Target Slot

id-to-widget.

Generic Reader: is-binary (object)
Package

reblocks/dependencies.

Methods
Reader Method: is-binary ((local-dependency local-dependency))

automatically generated reader method

Source

file-type.lisp.

Target Slot

binary.

Generic Function: on-timing-end (level name)
Package

reblocks/utils/timing.

Methods
Method: on-timing-end (level name)
Source

file-type.lisp.

Generic Function: on-timing-start (level name)
Package

reblocks/utils/timing.

Methods
Method: on-timing-start (level name)
Source

file-type.lisp.

Generic Reader: page-actions (object)
Package

reblocks/page.

Methods
Reader Method: page-actions ((page page))

automatically generated reader method

Source

file-type.lisp.

Target Slot

code-to-action.

Generic Reader: page-created-at (object)
Package

reblocks/page.

Methods
Reader Method: page-created-at ((page page))

automatically generated reader method

Source

file-type.lisp.

Target Slot

created-at.

Generic Reader: page-expire-at (object)
Package

reblocks/page.

Methods
Reader Method: page-expire-at ((page page))

automatically generated reader method

Source

file-type.lisp.

Target Slot

expire-at.

Generic Writer: (setf page-expire-at) (object)
Package

reblocks/page.

Methods
Writer Method: (setf page-expire-at) ((page page))

automatically generated writer method

Source

file-type.lisp.

Target Slot

expire-at.

Generic Reader: page-path (object)
Package

reblocks/page.

Methods
Reader Method: page-path ((page page))

automatically generated reader method

Source

file-type.lisp.

Target Slot

path.

Generic Reader: reblocks-webapp-debug (object)
Generic Writer: (setf reblocks-webapp-debug) (object)
Package

reblocks/app.

Methods
Reader Method: reblocks-webapp-debug ((app app))
Writer Method: (setf reblocks-webapp-debug) ((app app))

Responsible for debug mode, use WEBAPP-DEBUG function for getting slot value

Source

file-type.lisp.

Target Slot

debug.

Generic Reader: reblocks-webapp-description (object)
Generic Writer: (setf reblocks-webapp-description) (object)
Package

reblocks/app.

Methods
Reader Method: reblocks-webapp-description ((app app))
Writer Method: (setf reblocks-webapp-description) ((app app))

The name of the application. This slot will be used
by ’application-page-title’ to generate the default title for each page.

Source

file-type.lisp.

Target Slot

description.

Generic Reader: reblocks-webapp-hostnames (object)
Package

reblocks/app.

Methods
Reader Method: reblocks-webapp-hostnames ((app app))

The hostnames (a list of strings) reserved for this webapp.
See section 14.32 of RFC 2616.

Example: ’("foo.com" "www.foo.com" "shoo.bar.org")
Wildcard patterns are also allowed. Example: ’("foo.*.com")
If NIL (the default), don’t care about the hostname at all.
TODO: support regex matching here.

Source

file-type.lisp.

Target Slot

hostnames.

Generic Reader: reblocks-webapp-name (object)
Package

reblocks/app.

Methods
Reader Method: reblocks-webapp-name ((app app))

automatically generated reader method

Source

file-type.lisp.

Target Slot

name.

Generic Writer: (setf reblocks-webapp-name) (object)
Package

reblocks/app.

Methods
Writer Method: (setf reblocks-webapp-name) ((app app))

automatically generated writer method

Source

file-type.lisp.

Target Slot

name.

Generic Reader: reblocks-webapp-session-key (object)
Package

reblocks/app.

Methods
Reader Method: reblocks-webapp-session-key ((app app))

automatically generated reader method

Source

file-type.lisp.

Target Slot

session-key.

Generic Writer: (setf reblocks-webapp-session-key) (object)
Package

reblocks/app.

Methods
Writer Method: (setf reblocks-webapp-session-key) ((app app))

automatically generated writer method

Source

file-type.lisp.

Target Slot

session-key.

Generic Function: render-page-with-widgets (app)

Renders a full HTML by collecting header elements, dependencies and inner HTML and inserting them into the ‘render’ method.

This function will be called inside WITH-PAGE-DEFAULTS block,
where such variables as *TITLE* are bound to their default values. These variables can be changed by user during widgets or page rendering.

Package

reblocks/page.

Source

file-type.lisp.

Methods
Method: render-page-with-widgets ((app app))
Source

file-type.lisp.

Generic Reader: routes (object)
Package

reblocks/server.

Methods
Reader Method: routes ((server server))

automatically generated reader method

Source

file-type.lisp.

Target Slot

routes.

Generic Writer: (setf routes) (object)
Package

reblocks/server.

Methods
Writer Method: (setf routes) ((server server))

automatically generated writer method

Source

file-type.lisp.

Target Slot

routes.

Generic Reader: webapp-class-home-package (object)
Generic Writer: (setf webapp-class-home-package) (object)
Package

reblocks/app-mop.

Methods
Reader Method: webapp-class-home-package ((app-class app-class))
Writer Method: (setf webapp-class-home-package) ((app-class app-class))

The current package when I was defined.

Source

file-type.lisp.

Target Slot

home-package.

Generic Reader: widget-continuation (object)
Generic Writer: (setf widget-continuation) (object)
Package

reblocks/widget.

Methods
Reader Method: widget-continuation ((widget widget))
Writer Method: (setf widget-continuation) ((widget widget))

Stores the continuation object for
widgets that were invoked via one of the do-* functions (’do-page’, etc.). When ’answer’ is called on a widget, this value is used to resume the computation.

Source

file-type.lisp.

Target Slot

continuation.

Generic Reader: widget-propagate-dirty (object)
Generic Writer: (setf widget-propagate-dirty) (object)
Package

reblocks/widget.

Methods
Reader Method: widget-propagate-dirty ((widget widget))
Writer Method: (setf widget-propagate-dirty) ((widget widget))

A list of widgets which will be made
dirty when this widget is made dirty via a POST request. This slot allows setting up dependencies between widgets that will make multiple widgets update automatically during AJAX requests.

Source

file-type.lisp.

Target Slot

propagate-dirty.

Generic Reader: widget-slot-affects-dirty-status-p (object)
Generic Writer: (setf widget-slot-affects-dirty-status-p) (object)
Package

reblocks/widgets/mop.

Methods
Reader Method: widget-slot-affects-dirty-status-p ((widget-slot-definition-mixin widget-slot-definition-mixin))
Writer Method: (setf widget-slot-affects-dirty-status-p) ((widget-slot-definition-mixin widget-slot-definition-mixin))

When set to true (the
default is NIL), the widget will be made dirty when this slot is modified.

Source

file-type.lisp.

Target Slot

affects-dirty-status-p.

Generic Reader: widget-slot-parameter-name (object)
Generic Writer: (setf widget-slot-parameter-name) (object)
Package

reblocks/widgets/mop.

Methods
Reader Method: widget-slot-parameter-name ((widget-slot-definition-mixin widget-slot-definition-mixin))
Writer Method: (setf widget-slot-parameter-name) ((widget-slot-definition-mixin widget-slot-definition-mixin))

When supplied, provides a string or
symbol which will be used to extract values from a URI GET parameter

Source

file-type.lisp.

Target Slot

parameter-name.


5.2.5 Classes

Class: app-class

The class of all webapp classes.

Package

reblocks/app-mop.

Source

file-type.lisp.

Direct superclasses

standard-class.

Direct methods
Direct slots
Slot: home-package

The current package when I was defined.

Initform

*package*

Readers

webapp-class-home-package.

Writers

(setf webapp-class-home-package).

Class: cached-remote-dependency

This is subclass of remote dependency which is
downloaded and stored in the local cache and served by lisp image.

You don’t’ need to create it manually, just set *cache-remote-dependencies-in* variable to a path where to store data before all (make-dependency...) will be made, and they will create cached-remote-dependency instead of remote-dependency objects automatically.

Package

reblocks/dependencies.

Source

file-type.lisp.

Direct superclasses
Direct methods
Class: dependency-route
Package

reblocks/dependencies.

Source

file-type.lisp.

Direct superclasses

route.

Direct methods
Direct slots
Slot: dependency
Initargs

:dependency

Readers

get-dependency.

Writers

This slot is read-only.

Class: funcall-widget
Package

reblocks/widgets/funcall-widget.

Source

file-type.lisp.

Direct superclasses

widget.

Direct methods
Direct slots
Slot: function
Package

common-lisp.

Type

(or symbol function)

Initargs

:function

Readers

get-function.

Writers

(setf get-function).

Class: hooks

A data structure that maintains appropriate
callback functions used to hook into request evaluation.

Package

reblocks/hooks.

Source

file-type.lisp.

Direct slots
Slot: hooks
Initform

(make-hash-table)

Class: internal-iterator-mixin-and-array-iterator
Package

reblocks/default-init.

Source

file-type.lisp.

Direct superclasses
  • array-iterator.
  • internal-iterator-mixin.
Class: jquery-backend
Package

reblocks/js/jquery.

Source

file-type.lisp.

Direct superclasses

js-backend.

Direct methods

get-dependencies.

Class: preview-widget
Package

reblocks/preview.

Source

file-type.lisp.

Direct superclasses

widget.

Direct methods

render.

Class: static-route-from-file
Package

reblocks/server.

Source

file-type.lisp.

Direct superclasses

route.

Direct methods
Direct slots
Slot: path
Initargs

:path

Readers

get-path.

Writers

This slot is read-only.

Slot: content-type
Initargs

:content-type

Readers

get-content-type.

Writers

This slot is read-only.

Class: welcome-screen-app

Idea of this app is to have some default application will be served on "/" prefix when there is no other app for "/" prefix is defined.

Package

reblocks/welcome/app.

Source

file-type.lisp.

Direct superclasses

app.

Direct methods

init-page.

Direct Default Initargs
InitargValue
:prefix/
Class: welcome-screen-widget
Package

reblocks/welcome/widget.

Source

file-type.lisp.

Direct superclasses

widget.

Direct methods

render.

Class: widget-direct-slot-definition

Allows specifying custom widget properties.

Package

reblocks/widgets/mop.

Source

file-type.lisp.

Direct superclasses
Class: widget-effective-slot-definition

Allows specifying custom widget properties.

Package

reblocks/widgets/mop.

Source

file-type.lisp.

Direct superclasses
Class: widget-slot-definition-mixin

A mixin class used in
’widget-direct-slot-definition’ and ’widget-effective-slot-definition’ to allow specifying custom widget properties.

Package

reblocks/widgets/mop.

Source

file-type.lisp.

Direct subclasses
Direct methods
Direct slots
Slot: affects-dirty-status-p

When set to true (the
default is NIL), the widget will be made dirty when this slot is modified.

Initargs

:affects-dirty-status-p

Readers

widget-slot-affects-dirty-status-p.

Writers

(setf widget-slot-affects-dirty-status-p).

Slot: parameter-name

When supplied, provides a string or
symbol which will be used to extract values from a URI GET parameter

Initargs

:uri-parameter

Readers

widget-slot-parameter-name.

Writers

(setf widget-slot-parameter-name).


5.2.6 Types

Type: samesite-policy-type ()
Package

reblocks/session.

Source

file-type.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   %   (  
A   C   D   E   F   G   H   I   L   M   N   O   P   Q   R   S   T   U   V   W  
Index Entry  Section

%
%check-boundaries: Private ordinary functions
%common-init: Private ordinary functions
%insert-after-without-boundaries-check: Private ordinary functions
%js: Private ordinary functions
%metadata-lock: Private generic functions
%metadata-lock: Private generic functions
%page-metadata: Private generic functions
%page-metadata: Private generic functions

(
(setf %metadata-lock): Private generic functions
(setf %metadata-lock): Private generic functions
(setf apps): Private generic functions
(setf apps): Private generic functions
(setf dom-id): Public generic functions
(setf dom-id): Public generic functions
(setf escape-p): Public generic functions
(setf escape-p): Public generic functions
(setf get-content): Public generic functions
(setf get-content): Public generic functions
(setf get-description): Public ordinary functions
(setf get-function): Private generic functions
(setf get-function): Private generic functions
(setf get-handler): Private generic functions
(setf get-handler): Private generic functions
(setf get-js-backend): Private generic functions
(setf get-js-backend): Private generic functions
(setf get-keywords): Public ordinary functions
(setf get-language): Public ordinary functions
(setf get-prefix): Public generic functions
(setf get-prefix): Public generic functions
(setf get-title): Public ordinary functions
(setf get-value): Public ordinary functions
(setf page-app): Public generic functions
(setf page-app): Public generic functions
(setf page-dependencies): Public ordinary functions
(setf page-expire-at): Private generic functions
(setf page-expire-at): Private generic functions
(setf page-metadata): Public ordinary functions
(setf page-root-widget): Public generic functions
(setf page-root-widget): Public generic functions
(setf reblocks-webapp-debug): Private generic functions
(setf reblocks-webapp-debug): Private generic functions
(setf reblocks-webapp-description): Private generic functions
(setf reblocks-webapp-description): Private generic functions
(setf reblocks-webapp-name): Private generic functions
(setf reblocks-webapp-name): Private generic functions
(setf reblocks-webapp-session-key): Private generic functions
(setf reblocks-webapp-session-key): Private generic functions
(setf routes): Private generic functions
(setf routes): Private generic functions
(setf webapp-class-home-package): Private generic functions
(setf webapp-class-home-package): Private generic functions
(setf widget-continuation): Private generic functions
(setf widget-continuation): Private generic functions
(setf widget-propagate-dirty): Private generic functions
(setf widget-propagate-dirty): Private generic functions
(setf widget-slot-affects-dirty-status-p): Private generic functions
(setf widget-slot-affects-dirty-status-p): Private generic functions
(setf widget-slot-parameter-name): Private generic functions
(setf widget-slot-parameter-name): Private generic functions

A
add-action: Public ordinary functions
add-application-hook: Private macros
add-command: Public ordinary functions
add-commands: Public ordinary functions
add-header: Public ordinary functions
add-hook: Private ordinary functions
add-hook-helper: Private ordinary functions
add-request-hook: Private macros
add-retpath-to: Public ordinary functions
add-route: Private ordinary functions
add-routes: Private ordinary functions
add-session-hook: Private macros
ajax-request-p: Public ordinary functions
alist->plist: Public ordinary functions
allowed-samesite-policy-p: Private ordinary functions
already-loaded-p: Public ordinary functions
app-serves-hostname-p: Private ordinary functions
append-custom-fields: Public ordinary functions
apps: Private generic functions
apps: Private generic functions
attributize-name: Public generic functions
attributize-name: Public generic functions
attributize-name: Public generic functions
attributize-name: Public generic functions
attributize-name: Public generic functions

C
cache-in-memory-p: Public generic functions
cache-in-memory-p: Public generic functions
call-action-hook: Public macros
call-handle-http-request-hook: Public macros
call-in-webapp: Private ordinary functions
call-next-hook: Public ordinary functions
call-render-hook: Public macros
call-reset-session-hook: Public macros
call-start-reblocks-hook: Public macros
call-stop-reblocks-hook: Public macros
call-with-handled-errors: Private ordinary functions
call-with-page-defaults: Private ordinary functions
call-with-response: Private ordinary functions
call-with-session: Private ordinary functions
call-with-session-lock: Private ordinary functions
check-if-valid-class-name: Private ordinary functions
cl-symbol-to-js-symbol: Private ordinary functions
compute-effective-slot-definition: Public standalone methods
concatenate-keywords: Public ordinary functions
congruent-lambda-expression: Private ordinary functions
cookies-to-set: Public ordinary functions
create-command: Private ordinary functions
create-widget-from: Public generic functions
create-widget-from: Public generic functions
create-widget-from: Public generic functions
create-widget-from: Public generic functions
create-widget-from: Public generic functions
create-widget-from: Public generic functions
current-page: Public ordinary functions

D
def-get-set: Private macros
defapp: Public macros
defhook: Public macros
define-action: Public macros
defroute: Public macros
defwidget: Public macros
delete-value: Public ordinary functions
dependency-equal: Public generic functions
dependency-equal: Public generic functions
direct-slot-definition-class: Public standalone methods
dom-id: Public generic functions
dom-id: Public generic functions
dom-id: Public generic functions
dom-id: Public generic functions
dom-id: Public generic functions
drop-last: Public ordinary functions

E
effective-slot-definition-class: Public standalone methods
ensure-dom-id: Private generic functions
ensure-dom-id: Private generic functions
ensure-page-metadata: Public macros
ensure-pages-cleaner-is-running: Private ordinary functions
ensure-starts-with-slash: Private ordinary functions
escape-p: Public generic functions
escape-p: Public generic functions
escape-script-tags: Private ordinary functions
eval-action: Public generic functions
eval-action: Public generic functions
eval-hook-callbacks: Private ordinary functions
eval-next-hooks: Private ordinary functions
expire: Public ordinary functions
expire-pages: Private ordinary functions
extend-expiration-time: Public ordinary functions
extend-expiration-time-impl: Private ordinary functions
extend-page-expiration-by: Public generic functions
extend-page-expiration-by: Public generic functions

F
finalize-webapp: Private generic functions
finalize-webapp: Private generic functions
find-all: Public ordinary functions
find-app-by-name: Private ordinary functions
find-own-symbol: Public ordinary functions
find-page-by-path: Private ordinary functions
find-server: Private ordinary functions
find-slot-dsd: Public ordinary functions
find-slot-esd: Public ordinary functions
find-widget-by-id: Public ordinary functions
Function, %check-boundaries: Private ordinary functions
Function, %common-init: Private ordinary functions
Function, %insert-after-without-boundaries-check: Private ordinary functions
Function, %js: Private ordinary functions
Function, (setf get-description): Public ordinary functions
Function, (setf get-keywords): Public ordinary functions
Function, (setf get-language): Public ordinary functions
Function, (setf get-title): Public ordinary functions
Function, (setf get-value): Public ordinary functions
Function, (setf page-dependencies): Public ordinary functions
Function, (setf page-metadata): Public ordinary functions
Function, add-action: Public ordinary functions
Function, add-command: Public ordinary functions
Function, add-commands: Public ordinary functions
Function, add-header: Public ordinary functions
Function, add-hook: Private ordinary functions
Function, add-hook-helper: Private ordinary functions
Function, add-retpath-to: Public ordinary functions
Function, add-route: Private ordinary functions
Function, add-routes: Private ordinary functions
Function, ajax-request-p: Public ordinary functions
Function, alist->plist: Public ordinary functions
Function, allowed-samesite-policy-p: Private ordinary functions
Function, already-loaded-p: Public ordinary functions
Function, app-serves-hostname-p: Private ordinary functions
Function, append-custom-fields: Public ordinary functions
Function, call-in-webapp: Private ordinary functions
Function, call-next-hook: Public ordinary functions
Function, call-with-handled-errors: Private ordinary functions
Function, call-with-page-defaults: Private ordinary functions
Function, call-with-response: Private ordinary functions
Function, call-with-session: Private ordinary functions
Function, call-with-session-lock: Private ordinary functions
Function, check-if-valid-class-name: Private ordinary functions
Function, cl-symbol-to-js-symbol: Private ordinary functions
Function, concatenate-keywords: Public ordinary functions
Function, congruent-lambda-expression: