This blog is dedicated to Fabula Programming System (FPS), an innovative suite of software tools designed for building sophisticated, maintainable, fast and reliable web applications.
Here is how it achieves the goals:
- Web applications in Fabula are built from components called applets. Applets are composable, i.e. more complex applets can be defined using simpler ones. Applets are loosely coupled – they don’t have access to each other’s private data (state) and can communicate only by exchanging data through user-defined channels. Such an architecture lets the developer build web applications of arbitrary complexity without creating ‘spaghetti’ code.
- Every applet by definition has MVC-like architecture. The state of an instance of the applet, described by the applet’s model, is mapped to the visual representation using an XHTML template, containing Fabula expressions. This allows for the ultimate flexibility when defining the user interface.
- Only parts of the screen are updated when an application is running; more exactly, only the views of the applet instances whose state was changed are updated. AJAX is natively supported by Fabula. This approach results in much better performance than when a server-side solution is used, especially when the number of clients is large; it also significantly reduces the network traffic.
- Fabula programs have two-level modular structure. The smallest unit of modularity is an applet. Applets are packaged into applet libraries. Libraries can import applets from other libraries. Modularity is the main factor in helping build maintainable applications. Moreover, since Fabula is a declarative language, the applications have much lower complexity than programs written in an imperative language.
- The following features of Fabula help avoid many typical bugs and reduce the need for comprehensive unit testing.
- predominantly static typing
- every variable must be initialized (once) and can’t be redefined (immutability)
- if an operation fails, its results can’t be used
- lack of side effects
- referential transparency
Fabula’s syntax is XML-based. If you think of this as a disadvantage, think again. Many language designers strive to make the language as expressive as possible, forgetting about the readability – terse code is easy to write, but hard to read. This doesn’t mean that Fabula is devoid of expressiveness; simple calculations, including comparisons and even objects, are expressed using formulas, or primary expressions, having intuitive and mostly conventional syntax and semantics. XML syntax gives the programs clear structure. With the Fabula Project Builder (see below), it’s easy to enter Fabula code due to the code editor’s useful features, such as automatic code completion.
Fabula is implemented as an interpreter that can run in any modern web browser. The interpreter is very compact and doesn’t use any third-party libraries.
Apart from Fabula Interpreter, FPS includes a number of projects, all written mainly in Fabula:
- Project Builder
- Reference Browser
- Table Viewer
- Forum Facility
- GUI Templates
and others. The idea of FPS is to provide environment for creation and maintenance of Fabula programs using only the web browser. You don’t need to install anything to use FPS – everything, including your projects, is always available on any device with access to the Internet.
Launchpad is the starting point of all the FPS projects and provides the following services:
- creation and deletion of user’s private projects
- access to the source of public projects created by the FPS community
- launching any private or public project, including Fabula Project Builder and Fabula Debugger
- access to a separate forum per project to discuss the project’s issues with the users
- a general support forum
Debugger is a utility for debugging Fabula libraries that is based on analyzing the live execution trace.
You can sign in directly to Launchpad using an existing account with Google, GitHub, Facebook or Twitter, or with your email address and an automatically generated temporary password that can be changed to one you prefer.
See our YouTube channel for more details.