Esel 1.2

ECMAScript Expression Language
Esel is an expression language for JavaScript. It is a language that can be embedded in a JavaScript or ECMAScript program to provide for the evaluation of simple expressions and for text templating.

An Introductory Example

The following is a simple Esel expression:

    The sum of 2 and 2 is ${2 + 2}.

Note that the entire string is an expression. Its value is:

    The sum of 2 and 2 is 4.

This example illustrates how simple Esel really is. Any string is a valid Esel
expression, whose value is the string itself. If the string contains anything
enclosed by "${" and "}", that text is replaced by the value of the expression
between the two delimiters.

Uses

Esel was primarily created for the < a href="http://www.deadpixi.com/Deadpixi.COM/JSONForms.html" >JSONForms< /a > web interface toolkit, but it has many uses beyond that:

An in-browser expression language.

Certain rich web applications allow for small, user-defined programs. Generally, these programs are either plain JavaScript, or some small domain specific language. Allowing the user to input JavaScript creates a whole host of problems: scoping issues, overwriting of important variables, and exception handling issues, among others. Esel removes these concerns by ensuring only valid expressions are used. Esel does not allow assignment, so no variables are clobbered. Esel strictly limits the visible namespace and available functions to those explicitly exported by the application.

A simple templating language.

Not all web browsers support XSLT, and not all users want to use it. Esel provides a simple templating language that can be used within a web page, on the web browser itself. This functionality is used extensively by < a href="http://www.deadpixi.com/Deadpixi.COM/JSONForms.html" >JSONForms< /a >.

last updated on:
September 30th, 2009, 23:49 GMT
price:
FREE!
homepage:
deadpixi.com
license type:
LGPL v3 (GNU Lesser General Public Lic... 
developed by:
Rob King
category:
ROOT \ Utilities
Esel
Download Button

In a hurry? Add it to your Download Basket!

user rating

UNRATED
0.0/5
 

0/5

Rate it!
What's New in version 1.0
  • Minor code and documentation cleanups.
  • First stable release.
read full changelog

Add your review!

SUBMIT