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
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
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.
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
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:
The code for the bentodev.org site itself is listed in full below. This code
is divided into several files:
- bentodev.bento, containing definitions for the base page are
other common site objects
- bentodev_faq.bento, containing FAQ information organized into
- bentodev_pages.bento, containing definitions for individual
pages in the site
- bentodev_scenarios.bento, containing links to and information
about sample Bento programs
- bentodev_topics.bento, containing information about important
aspects of Bento
- bentodocs.bento, containing overiew information about Bento as
well as links to more detailed Bento documentation
- nutshell.bento, containing "Bento in a Nutshell", an introductory
guide to Bento
- scenario_code.bento, containing source code for the sample
- specs.bento, containing the Bento language specification
Use of any software, source code and documentation obtained from this site
is governed by the
Bento Poetic License.
Copyright © 2003 by bentodev.org