Table of Contents
Biferno is a new generation Web scripting language that allows developers the rapid implementation of dynamic Web applications and of Web sites that offer a high degree of user interactivity.
Biferno is a Web server add-on module that allows dynamic generation of HTML pages -the result of the processing of the Biferno code by the server determines the page content. A Biferno script is therefore a server-side script, i.e. the Web server is tasked with code processing. Biferno is currently implemented only as an interpreted language. Biferno is also a "HTML-embedded" language. Scripts can be written in pure Biferno language, but can also contain HTML code segments between Biferno code blocks. The Biferno code is always delimited by special tags that allow separation from the rest of the code (HTML or whatever).
The following tags can be used to delimit a Biferno script:
<?
// Biferno code
?>
<?biferno
// Biferno code
?>
In our examples we will always use the <? and ?> tags. The
alternative opening tag <?biferno is necessary when integrating Biferno
and XML code, or when using certain HTML development tools that are
compatible with embedded scripting languages. There should always be at
least one space, tabulator or newline character after the <? and
<?biferno tags.
When a browser requests a Web page to the server, the page is analyzed by the Biferno interpreter only if it has been stored on the server in a file with ".bfr" extension. If this is not the case, the page is simply returned to the client as a standard HTML page with no further intervention.
After processing, a page containing pure HTML code is returned by the
server. This page contains none of the Biferno instructions contained in
the original script. This implies that we do not have to worry about the
ability of the other party to read the code that produces a certain result,
which is an issue e.g. with JavaScript client side scripts. During page
processing the Biferno interpreter executes only the text (code) delimited
by the <? and ?> tags, ignoring the rest of the text, which is
returned with the output page to the client (an exception to this behavior
exists, as we will see in the following). An example is:
<html>
<body>
<b>An example of Biferno code embedded in a HTML page</b>
<hr>
The current Biferno version is
<?
print(biferno.version) //Print Biferno version
?>
<hr>
</body>
</html>
The example above produces the following HTML output:
<html>
<body>
<b> An example of Biferno code embedded in a HTML page</b>
<hr>
The current Biferno version is
1.0.0
<hr>
</body>
</html>
The Biferno code has been replaced by the result of its processing, which
is the current version of Biferno. This information has been obtained by
calling the biferno.version predefined property and sending its result in
output using the print function. The HTML code generated by this mechanism
produces the following result in the browser window:
An example of Biferno code embedded in a HTML page
The current Biferno version is 1.0.0
After showing a first simple example of Biferno script, let's talk about the main features of the language for a first taste of its potential.
All variables in Biferno are class instances. This allows developers to write more readable and modular code that can easily be reused in different projects.
The Biferno interpreter is completely written in the C language and optimization of execution speed has been a constant goal throughout the development process.
One of the main problems for Web site developers is the maze of different platforms (operating systems, Web servers, databases) and their incompatibilities. Biferno's system independence allows to migrate a whole site from a platform to a new one with minimal effort.
A complete public C interface and a downloadable SDK allow developers to write their own Biferno classes. All Biferno classes (ranging from int to string to file) are based on this interface.
Biferno runs on:
Linux (implemented as an Ap module of the Apache Web server plus Biferno daemon combination)
MacOS Classic (implemented as a WSAPI plugin of the WebSTAR Web server or as ACGI)
MacOSX (implemented as an ap module of the Apache Web server, or a WSAPI module for WebSTAR web server, plus Biferno daemon combination)
Windows (implemented as an ISAPI module for the "IIS" Web server (or an Ap module for Apache) in combination either with the "Biferno.exe" server or with the "bifernosvc.exe" Windows service).
On all these platforms Biferno can be interfaced with database applications, both via support for native drivers and via support for ODBC (Open DataBase Connectivity).
"bifernoadmin" is a web-based service that allows easy remote administration of the Biferno system and of your own Biferno application via a graphical interface. A separate document (the "Biferno: bifernoadmin Guide") describing in detail this powerful adminstration tool is available. While we will occasionaly mention the bifernoadmin tool in this document, we refer the interested reader to the bifernoadmin documentation for the details.