SymbolicWeb

SymbolicWeb

Infobox Software
name = SymbolicWeb
developer = Nostdal
latest release version = 0.3
latest release date = release date|2008|07|27
operating system = Linux
platform = Steel Bank Common Lisp
genre = Web application framework
license = Affero General Public License with a GPL linking exception
website = http://groups.google.com/group/symbolicweb

SymbolicWeb is a GUI, widget or server-centric framework for developing web applications. It is written in Common Lisp. SymbolicWeb is free software [ [http://groups.google.com/group/symbolicweb SymbolicWeb on Google Groups] ] licensed under the AGPLv3 plus GPL linking exception.

It uses portable browser technologies such as HTML, CSS, JavaScript, AJAX and Comet, and wraps these in widgets. These widgets are instantiated and stored on the server end, then presented and updated in real-time on the client end as their state changes. While being widget based, SymbolicWeb does not hide or restrict access to low-level details such as HTML, CSS and JavaScript.

SymbolicWeb allows for two way real-time communication between server and client. Updates or changes can propagate from the server to the client at any time (Comet), while AJAX is used to send messages or events the other way around.

It does not use or depend on browser plug-ins such as Flash or Java Applets for rendering or transportation of data and messages. Hunchentoot is used to deal with HTTP on the server end, while jQuery is used on the client end to deal with AJAX, Comet and general browser differences.

SymbolicWeb was awarded a stipend by the Google Summer of Code program in 2008 via the LispNYC organization. [ [http://www.lispnyc.org/soc2008.clp LispNYC SoC 2008] ]

Features

* Support for browser back button and browser history. Widget state can be serialized to the browser URL, then be serialized back the other way as the user presses the back and forward buttons in the browser.

* Ability to bookmark or link to the state of an application or a set of widgets.

* A single widget instance can be visible in multiple browsers, browser windows or tabs at the same time. Sharing a container widget between multiple users is an example of this. The container might function as a chat-pane or tab in a chat application, and as new child nodes or messages are added to this container they become visible for all users viewing this shared container widget.

* Works around the [http://www.openajax.org/runtime/wiki/The_Two_HTTP_Connection_Limit_Issue two connection limit] of HTTP and web browsers by sending HTTP requests to a separate subdomain of the host created for each browser window or tab.

* Ability to manipulate HTML attributes, CSS properties and add both server and/or client side callbacks for DOM events. The set of attributes, properties and events which can be manipulated is expandable via the "add-attribute-type", "add-css-type" and "add-event-type" functions.

* Ability to transmit custom JavaScript code from the server to the client at any time.

* [http://cometdaily.com/2008/05/09/guaranteed-messaging-in-comet/ Message delivery guarantee]

* Real-time interactive development (see the "Example code" section below).

Example code

This shows how to create and manipulate a simple widget directly from the Lisp REPL.

SW> (defparameter *our-widget* (mk-span "Hello World")) ;; creates the widget, stores it in a global variable

SW> (real-html-of *our-widget*) ;; returns the html which will be sent to the client"Hello World"

SW> (html-of *our-widget*) ;; returns the html "content" "Hello World"

Adding the widget to the web page:

SW> (add-to (root) *our-widget*)

"(root)" refers to the top-level node in the DOM tree of the web page. "*our-widget*" is added as a child to this node.

The programmer can manipulate the widget via the REPL. The widget is at this point visible on the client and will reflect any changes done to it in real time without the user having to refresh the web page:

SW> (setf (background-color-of *our-widget*) "red") ;; the CSS "background-color" property

SW> (setf (html-of *our-widget*) (string-upcase (html-of *our-widget*)) ;; converts the string to upper-case

Specifying an event and a callback:

SW> (setf (on-click-of *our-widget*) (iambda (write-line "Hello World span was clicked!") (setf (background-color-of *our-widget*) (random-elt '("red" "green" "blue")))))

When the user clicks on the span at the client end, the server side callback will print a message to standard output and set the "background-colour" (CSS property) of the widget to a random colour. It is also possible to specify callbacks that are handled directly on the client side, without a round-trip to the server.

It is possible to send custom JavaScript code to the browser by using the "run" function:

SW> (run "alert('hi');")

..and return values from the client (by specifying :json t here the type returned would be an integer instead of a string):

SW> (run "return 3 * 2;" :async nil)"6"

External links

* [http://groups.google.com/group/symbolicweb Official site]

References


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • Common Lisp — Paradigm(s) Multi paradigm: procedural, functional, object oriented, meta, reflective, generic Appeared in 1984, 1994 for ANSI Common Lisp Developer ANSI X3J13 committee Typing discipline …   Wikipedia

  • PHP-Nuke — Original author(s) Francisco Burzi Stable release 8.2 / May 22, 2009; 2 years ago (2009 05 22 …   Wikipedia

  • Drupal — Drupal …   Wikipedia

  • Common Lisp Object System — For other uses, see Clos (disambiguation). The Common Lisp Object System (CLOS) is the facility for object oriented programming which is part of ANSI Common Lisp. CLOS is a powerful dynamic object system which differs radically from the OOP… …   Wikipedia

  • OpenACS — Developer(s) OpenACS community Stable release 5.6.0 …   Wikipedia

  • Midgard (software) — For other uses, see Midgard (disambiguation). Midgard AJAX inline editing of content in Midgard …   Wikipedia

  • Mambo (software) — Mambo Developer(s) Mambo Foundation Inc. Discontinued 4.6.5 [1] / June 26, 2008; 3 years ago (2008 06 26) Written in …   Wikipedia

  • Movitz — is an implementation of the Common Lisp programming language for x86 computers. It runs with no underlying operating system and is intended as a development platform for operating system kernels, embedded, and single purpose applications . Movitz …   Wikipedia

  • CLISP — Original author(s) Bruno Haible, Michael Stoll Developer(s) Various Initial release April 1987; 24 years ago ( …   Wikipedia

  • Oracle Application Express — Developer(s) Oracle Corporation Stable release 4.1 / August 24, 2011; 2 months ago ( …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”