Diesel-Engine Documentation

Overview    back to index
Introducing Diesel
Use Cases
Headline Features

Introducing Diesel    back to top

Diesel-Engine, or simply Diesel, is an interpreted language, a scripting language, suited to run within web servers, custom applications, or as a stand-alone language interpreter. This allows scripting of a wide range of software aspects, ranging from dynamic web-pages to data transport and manipulation, including application configuration, user-interaction, and much more. The language was designed from the ground up to be as secure, simple, and easy to use as possible, while offering a very large base of high-level user functions.

The Diesel Scripting language has many similarities to Perl, HTML, PHP, and C, however, the syntax is such that even non-professional programmers can quickly create interactive and functional web-pages or extend the functionality of a Diesel-enabled software application. At the same time, the language is complete and has high level functions making it possible to quickly create complete and secure database driven eBusiness store fronts.

Use Cases    back to top

Dynamic Web-page Scripting

The most common deployment of Diesel currently is in web applications. Specifically, Diesel script is embedded in HTML pages to create functional web-pages that can easily manage form input, database queries, e-mail, and complex e-commerce functions.

Diesel integrates logic and high-level functionality into the web-pages themselves, rendering CGI a thing of the past. Unlike CGI, which must execute and 'die' with each request, Diesel code runs in resident memory, which means it does not have the same overhead as CGI and is much faster. Furthermore, using the dsl2ops utility program, it is possible to bundle up an entire directory tree, an entire website, into one fully optimized pre-parsed flat-file database. This allows rapid deployment of modified content, while providing a high degree of reliability and application version control.

Software Application Extensibility

While the most common use of Diesel is in web applications, a fast-growing area of application for Diesel scripting is in non-web applications. For instance, while building an application whose primary function is not user-interaction or data-manipulation, adding these aspects is often done in a hodge-podge and highly sub-optimal way. However, Diesel, through its Application Programming Interface (API), allows a programmer to add full scripting power to an application extremely quickly, efficiently, and safely. The full power of diesel is made available to the calling program via a few simple library calls. This simplifies scripting user input, creation and maintenance of complex configuration files, database interaction, and much more.

Command-line Script Interpretor

One such program implementing Diesel script is the utility dsltool, a program which functions as a stand-alone interpreter for the Diesel language and which can be used to test, debug, and develop new Diesel functionality.

Headline Features    back to top

Easy of Use

Think of Diesel as a set of commonly used and reusable functions utilized via an easy to understand "template" language. Particularly in dynamic website development, the programming and design duties are assigned to different people, if not different departments. The first design decision in any dynamic website project is determining how to separate design from functionality. This is exactly what Blueprint set out to do with Diesel - built by programmers for non-programmers.

Extensibility

Diesel can be incorporated into software applications and architectures to instantly leverage all the power of Diesel's scripting language and functionality. Functionality is taken out of the core application source code and is instead scripted in Diesel. The Diesel language itself is also extensible. Using Diesel's C API, software developers are able to create application specific Diesel script functions - essentially, low-level, application-specific functions can be exposed to the scripting language and easily used in script form.

Database Connectivity

Using databases is an integral part of Diesel. Diesel supports several database sources to allow for highly dynamic content. At an abstract level, Diesel ties database sources (such as SQL tables or flat-file databases) to hash-table primitives for queries, updates, insertion & deletion to be possible. Diesel currently supports CDB, BerkeleyDB (SleepyCat), MySQL, MS-SQL and Oracle database sources. New database formats can be added to Diesel fairly easily due to the low-level design of Diesel and separation between abstraction layers.

User Sessions

There is a special hash table, %session, that can be used to store Client Persistent Data. Every browser that accesses a Diesel page is assigned a unique, cryptographically-secure identifier as an HTTP Cookie. This identifier makes it possible to recognize a visitor and automatically associate stored data with that user.

Having the %session hash makes it very easy to "carry" information from page to page without having to worry about making hidden form fields or putting the data in every link. This increases the security of the site, since data isn't being passed back-and-forth to the client, and it can't be altered en-route or by a malicious client. A userid (set after authentication) is a natural field to set in the %session hash.

E-mail Handling

Diesel can send e-mail (including attachments) using straightforward function calls. This replaces the need for clunky, insecure e-mail sending CGI scripts or form re-mailers that inevitably make the output look terrible. Diesel allows the scripter to generates elegant, standards-conforming e-mail messages, with all the formatting power of a complete programming language, and the ease of use of a scripting language.

Not only can Diesel send email, it can read it as well - even MIME encoded attachments! Diesel allowing scripts to easily manipulate messages, mailboxes, and folders. Complete on-line e-mail systems have been built with Diesel - notably, a secure on-line e-mail messaging system which incorporated OpenPGP encryption & authentication technologies.

eBusiness Functions

Diesel is integrated with support for CyberCash based on the premise that the scripter should be able to use the service as painlessly as possible. As an example, all it takes is one function call to get a credit card authorization from CyberCash.

Spell Checking

An example of the huge flexibility of diesel is its spell checking facility. Using external data hooks, it is a simple matter to pass static or dynamic text through a spell-checker on the server, either to provide as a service to users or as a fail-safe for outgoing materials.

Much, Much More!

We tried to keep this overview as short as possible while giving the reader a taste of what Diesel has to offer. If you would like to learn more about Diesel (the language) or Diesel-Engine (the interpreter), please contact us!

Copyright © 2005 Blueprint Networks, Inc.