+1 571-297-6383 | info@sonjara.com

What is Fakoli?

Fakoli is a lightweight, entity-based framework designed to simplify the development, deployment and long-term maintenance of web applications. The framework is open source (under the MIT License). Currently somewhat dissimilar versions exist for PHP and .NET. This document relates to the PHP version only.

Fakoli Architecture Diagram

The Evolution of Fakoli

Fakoli has been in continuous development for over five years. During that time it has evolved considerably. A rough timeline for the project looks something like this:

  • Fakoli 0.1 (2006) - Basic entity mapping framework and rich UI controls
  • Fakoli 1.0 (2009) - Introduction of basic Content Management layer
  • Fakoli 2.0 (2010) - Componentization of framework architecture
  • Fakoli 2.5 (2011) - Collaboration and multi-media tools
  • Fakoli 3.0 (2012) - Support for component versioning, automated upgrades

Fakoli Design Principles

Throughout its evolution, the framework has tried to adhere to the following principles:

Lightweight Design

The framework has primarily been shaped by the philosophy of lightweight design. We believe that the less code and the fewer independent sub-systems there are in a software solution, the fewer the bugs, and the higher the quality. We also firmly believe that when a customer's needs are not an exact match for an off-the-shelf application, there needs to be a way to implement a more targeted solution without either building from scratch or working with expensive, difficult to configure applications or application frameworks. Thus, Fakoli is conceived as a lightweight framework that will provide you with the basic common functionality required to build a web application. However, there are no complicated configuration files, or interpreted XML data mappings. Everything is in code with an emphasis on re-usability, maintainability and conciseness.

Promoting a Rich Data Model

Fakoli is an entity-based framework. Tables in the relational data store are modeled directly with classes in the application's data model. Rows in the data store are then instantiated as objects (or entities) for manipulation by the application. The definition of these entities is handled in a declarative fashion, making the data model classes easy to write (or generate), easy to read, and directly executable (rather than having the structure defined in a configuration file that needs to be parsed with each access or held in shared memory by the application server). These data model objects provide a rich set of functionality that encapsulates the common operations required of them:

  • Querying from the relational data store
  • Persistence to the relational data store
  • Traversal of relationships within the data model
  • Formatting for text manipulation and output
  • Serialization to XML and JSON, for network interoperability

Promoting a Clear Programming Style

One of the key benefits of having an underlying rich data model for your application is that it reduces the semantic gap between the code you are writing and the requirements you are writing against. Using Fakoli, most of the minutiae of working with the database are handled for you. The code you write is in terms of the data model objects you have defined and the relationships between them, making the body of your PHP code much more readable and maintainable.

Fakoli is structured in such a way that if you follow best practices with your database design (meaningful field names, well-normalized data schema, etc.) then most of the drudge work of your day-to-day programming will simply disappear. For instance, if in the database you name a field "employee_salary" then this field name will be used in the data model object and further, Fakoli will automatically reformat the field name to "Employee Salary" when displaying in forms on your site. If, however, you named that field "s" you would need to explicitly set up field aliases for this field to have them display in a readable fashion. This is the key to Fakoli's design philosoph–we try to make it easier for the programmer to do the right thing.

A second aspect to our philosophy that promotes clarity and lightweight solutions is an approach we call "It Is What It Is". In Fakoli a database schema file is just that, a file containing SQL. A PHP script defining a page is a simple script - no preamble, no class structure that must be adhered to, no jumping through hoops to make your code fit into a MVC pattern. We use HTML templating and CSS to separate presentation from application logic, and our HTML templates are basically HTML with placeholders–no logic, just presentation. By staying close to the root technologies underlying web applications we believe we make our code simpler, easier to digest and more robust.

The trick with the design of any framework is to decide what needs to be abstracted away and how to help maximize the amount of time a developer spends on creative solutions, rather than fighting the framework. With Fakoli we feel we have found a good balance that promotes both creativity and solid software engineering principles. We hope that as you learn more about our framework you will grow to like it, too.

General Installation Concepts » « Back to Contents Page