The ht-simple-ajax Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The ht-simple-ajax Reference Manual

This is the ht-simple-ajax Reference Manual, version 0.5, generated automatically by Declt version 2.4 "Will Decker" on Wed Jun 20 11:56:57 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

ht-simple-ajax

Another Ajax library for Hunchentoot, a web server written in Common Lisp.

See http://martin-loetzsch.de/ht-simple-ajax/ for details.

Revisions

Version 0.1 2010-01-21

Initial release

Version 0.2 2010-02-02

Added demo

Version 0.3 2010-02-22

Renamed ajax_call_uri to ajax_call

Version 0.4 2012-01-25

Demo uses hunchentoot:easy-acceptor instead of hunchentoot:acceptor

Version 0.5 2013-04-17

Bug fix for a problem when the *print-case* is set to :downcase (provided by Ben Hyde).


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

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


Previous: , Up: Systems   [Contents][Index]

2.1 ht-simple-ajax

Author

Martin Loetzsch

License

BSD-style

Description

simple AJAX for Hunchentoot

Long Description

See http://martin-loetzsch.de/ht-simple-ajax/

Version

0.5

Dependency

hunchentoot

Source

ht-simple-ajax.asd (file)

Component

ht-simple-ajax.lisp (file)


Next: , Previous: , Up: Top   [Contents][Index]

3 Files

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


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 ht-simple-ajax.asd

Location

ht-simple-ajax.asd

Systems

ht-simple-ajax (system)


Previous: , Up: Lisp files   [Contents][Index]

3.1.2 ht-simple-ajax/ht-simple-ajax.lisp

Parent

ht-simple-ajax (system)

Location

ht-simple-ajax.lisp

Packages

ht-simple-ajax

Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Previous: , Up: Packages   [Contents][Index]

4.1 ht-simple-ajax

Source

ht-simple-ajax.lisp (file)

Use List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

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


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Macros

Macro: defun-ajax NAME PARAMS (PROCESSOR) &body BODY

Declares a defun that can be called from a client page. Example: (defun-ajax func1 (arg1 arg2) (*ajax-processor*) (do-stuff))

Package

ht-simple-ajax

Source

ht-simple-ajax.lisp (file)


Next: , Previous: , Up: Exported definitions   [Contents][Index]

5.1.2 Functions

Function: create-ajax-dispatcher PROCESSOR

Creates a hunchentoot dispatcher for an ajax processor

Package

ht-simple-ajax

Source

ht-simple-ajax.lisp (file)

Function: generate-prologue PROCESSOR

Creates a <script> ... </script> html element that contains all the client-side javascript code for the ajax communication. Include this script in the <head> </head> of each html page

Package

ht-simple-ajax

Source

ht-simple-ajax.lisp (file)


Previous: , Up: Exported definitions   [Contents][Index]

5.1.3 Classes

Class: ajax-processor ()

Maintains a list of lisp function that can be called from a client page.

Package

ht-simple-ajax

Source

ht-simple-ajax.lisp (file)

Direct superclasses

standard-object (class)

Direct methods
  • reply-external-format (method)
  • reply-external-format (method)
  • content-type (method)
  • content-type (method)
  • server-uri (method)
  • server-uri (method)
  • js-fns (method)
  • js-fns (method)
  • lisp-fns (method)
  • lisp-fns (method)
Direct slots
Slot: lisp-fns

Maps the symbol names of the exported functions to their symbols

Type

hash-table

Initform

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

Readers

lisp-fns (generic function)

Writers

(setf lisp-fns) (generic function)

Slot: js-fns

Maps the symbol names of the exported functions to
a javascript code that can call the function from within the client page

Type

hash-table

Initform

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

Readers

js-fns (generic function)

Writers

(setf js-fns) (generic function)

Slot: server-uri

The uri which is used to handle ajax request

Type

string

Initargs

:server-uri

Initform

"/ajax"

Readers

server-uri (generic function)

Writers

(setf server-uri) (generic function)

Slot: content-type

The http content type that is sent with each response

Type

string

Initargs

:content-type

Initform

"text/xml; charset=\"utf-8\""

Readers

content-type (generic function)

Writers

(setf content-type) (generic function)

Slot: reply-external-format

The format for the character output stream

Type

flexi-streams::external-format

Initargs

:reply-external-format

Initform

hunchentoot::+utf-8+

Readers

reply-external-format (generic function)

Writers

(setf reply-external-format) (generic function)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Next: , Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Functions

Function: call-lisp-function PROCESSOR

This is called from hunchentoot on each ajax request. It parses the parameters from the http request, calls the lisp function and returns the response.

Package

ht-simple-ajax

Source

ht-simple-ajax.lisp (file)

Function: make-js-symbol SYMBOL

helper function for making ’foo_bar_’ out of ’foo-bar?’

Package

ht-simple-ajax

Source

ht-simple-ajax.lisp (file)


Previous: , Up: Internal definitions   [Contents][Index]

5.2.2 Generic functions

Generic Function: js-fns OBJECT
Generic Function: (setf js-fns) NEW-VALUE OBJECT
Package

ht-simple-ajax

Methods
Method: js-fns (AJAX-PROCESSOR ajax-processor)
Method: (setf js-fns) NEW-VALUE (AJAX-PROCESSOR ajax-processor)

Maps the symbol names of the exported functions to
a javascript code that can call the function from within the client page

Source

ht-simple-ajax.lisp (file)

Generic Function: lisp-fns OBJECT
Generic Function: (setf lisp-fns) NEW-VALUE OBJECT
Package

ht-simple-ajax

Methods
Method: lisp-fns (AJAX-PROCESSOR ajax-processor)
Method: (setf lisp-fns) NEW-VALUE (AJAX-PROCESSOR ajax-processor)

Maps the symbol names of the exported functions to their symbols

Source

ht-simple-ajax.lisp (file)

Generic Function: server-uri OBJECT
Generic Function: (setf server-uri) NEW-VALUE OBJECT
Package

ht-simple-ajax

Methods
Method: server-uri (AJAX-PROCESSOR ajax-processor)
Method: (setf server-uri) NEW-VALUE (AJAX-PROCESSOR ajax-processor)

The uri which is used to handle ajax request

Source

ht-simple-ajax.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   F   H   L  
Index Entry  Section

F
File, Lisp, ht-simple-ajax.asd: The ht-simple-ajax<dot>asd file
File, Lisp, ht-simple-ajax/ht-simple-ajax.lisp: The ht-simple-ajax/ht-simple-ajax<dot>lisp file

H
ht-simple-ajax.asd: The ht-simple-ajax<dot>asd file
ht-simple-ajax/ht-simple-ajax.lisp: The ht-simple-ajax/ht-simple-ajax<dot>lisp file

L
Lisp File, ht-simple-ajax.asd: The ht-simple-ajax<dot>asd file
Lisp File, ht-simple-ajax/ht-simple-ajax.lisp: The ht-simple-ajax/ht-simple-ajax<dot>lisp file

Jump to:   F   H   L  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (  
C   D   F   G   J   L   M   S  
Index Entry  Section

(
(setf js-fns): Internal generic functions
(setf js-fns): Internal generic functions
(setf lisp-fns): Internal generic functions
(setf lisp-fns): Internal generic functions
(setf server-uri): Internal generic functions
(setf server-uri): Internal generic functions

C
call-lisp-function: Internal functions
create-ajax-dispatcher: Exported functions

D
defun-ajax: Exported macros

F
Function, call-lisp-function: Internal functions
Function, create-ajax-dispatcher: Exported functions
Function, generate-prologue: Exported functions
Function, make-js-symbol: Internal functions

G
generate-prologue: Exported functions
Generic Function, (setf js-fns): Internal generic functions
Generic Function, (setf lisp-fns): Internal generic functions
Generic Function, (setf server-uri): Internal generic functions
Generic Function, js-fns: Internal generic functions
Generic Function, lisp-fns: Internal generic functions
Generic Function, server-uri: Internal generic functions

J
js-fns: Internal generic functions
js-fns: Internal generic functions

L
lisp-fns: Internal generic functions
lisp-fns: Internal generic functions

M
Macro, defun-ajax: Exported macros
make-js-symbol: Internal functions
Method, (setf js-fns): Internal generic functions
Method, (setf lisp-fns): Internal generic functions
Method, (setf server-uri): Internal generic functions
Method, js-fns: Internal generic functions
Method, lisp-fns: Internal generic functions
Method, server-uri: Internal generic functions

S
server-uri: Internal generic functions
server-uri: Internal generic functions

Jump to:   (  
C   D   F   G   J   L   M   S  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables

Jump to:   C   J   L   R   S  
Index Entry  Section

C
content-type: Exported classes

J
js-fns: Exported classes

L
lisp-fns: Exported classes

R
reply-external-format: Exported classes

S
server-uri: Exported classes
Slot, content-type: Exported classes
Slot, js-fns: Exported classes
Slot, lisp-fns: Exported classes
Slot, reply-external-format: Exported classes
Slot, server-uri: Exported classes

Jump to:   C   J   L   R   S  

Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   A   C   H   P   S  
Index Entry  Section

A
ajax-processor: Exported classes

C
Class, ajax-processor: Exported classes

H
ht-simple-ajax: The ht-simple-ajax system
ht-simple-ajax: The ht-simple-ajax package

P
Package, ht-simple-ajax: The ht-simple-ajax package

S
System, ht-simple-ajax: The ht-simple-ajax system

Jump to:   A   C   H   P   S