Bento Logo
> Bento Home > Source Code
Source Code for the Web Site

Core Library Source Code

core is a keyword in Bento and signifies the global namespace -- as opposed to the namespace defined by a particular site (another Bento keyword).

The Bento language places no restrictions on the use of the core keyword, meaning any Bento programmer can add to the global namespace. But this is discouraged as a general practice, because such global definitions are visible to all other sites sharing the same Bento server, raising the possibility of conflict.

The proper use of core is for standard libraries. As with C, Java and many other languages, Bento assumes that much of the work in a typical application will be accomplished via calls to standard libraries.

The current core libraries are provisional, and are expected to evolve and expand greatly before reaching a standard form. Among the features supported at present:

  • Boilerplate HTML for web pages
  • Standard definitions for common objects such as requests, responses and sessions
  • Standard utility objects for input/output operations, text manipulation, etc.
  • A page composition model, with components and layout managers
  • A simple database interface, supporting queries and updates
  • A simple document model
  • Convenience definitions for common bits of HTML
  • Platform-specific code linking standard definitions to particular implementations
  • Built-in documentation

The standard contents of core are currently divided into three files, one with platform-specific code, one containing documentation and one with everything else. As the core contents expand beyond the most basic functionality, new files will be created containing more specialized capabilities, thus enabling selective loading of library code.

The file with "everything else" is the largest and most important. It is called simply core.bento.

The platform-specific code is in a file called core_platform_java.bento, and as the name implies, it links the standard library to Java code, specifically the current Java reference implementation. When implementations in other languages are created, additional files with the prefix core_platform_ will be added.

The built-in documentation is in a file called core_docs.bento.

The following pages display the contents of the latest core files in the Bento CVS tree on Sourceforge:

Site Source

The code for the site itself is listed in full below. This code is divided into several files:


Use of any software, source code and documentation obtained from this site is governed by the Bento Poetic License.

Copyright © 2003 by