logo

Documentation: In Depth Framework Guide

Architecture

Lucinda was designed as an XML-based integration platform of APIs knowing nothing of the other, holding single responsibility in an ability they offer to a web application. Integration consists in redirecting all requests to framework, starting MVC APIs based on XMLs they require and binding them to other APIs and developers code in order to produce a response:

Handling HTTP Requests
Handling Console Requests
For more details how HTTP requests are handled, see: YouTube PlayList

Integrated APIs

Framework's job is achieved through an interplay of three independent APIs designed to further modularity and ease of update:

Name Description
Framework Skeleton API Implements "mobile" part of framework logic, the project skeleton developers will start working on once framework was installed. Once installed, composer won't update it!
Framework Engine API Implements "fixed" part of framework logic, from binding classes required in APIs conversation as well as general purpose classes. Code inside is updatable via composer!
Framework Configurer API Implements console step-by-step configurer as well as files going to be copied on developers' project once process completes. Code inside is updatable via composer!

When composer create-project is called, Framework Skeleton API will form your project foundation. It bootstraps all requests to your project to be handled by index.php file, where MVC APIs for STDOUT/STDERR flows are started based on an XML file that configures them:

Name Description XML
Abstract MVC API Abstract MVC engine implementing all aspects MVC APIs share, regardless of STDIN type any
STDOUT MVC API MVC engine on top of Abstract MVC API, where STDIN is made of http(s) requests stdout.xml
STDERR MVC API MVC engine on top of Abstract MVC API, where STDIN is made of uncaught Throwables stderr.xml
Console MVC API MVC engine on top of Abstract MVC API, where STDIN is made of console requests stdout.xml

Above MVC APIs offer a number of binding points, both programmatically (via extension) and declaratively (via XML), where developers can hook to. Framework uses them to integrate other APIs, each adding an extra ability for your site (since only MVC abilities are preinstalled):

Name Ability Added
View Language API templating HTML views using a language extending HTML standard
Console API styling console responses views using a pseudo-HTML language
Logging API logging messages or errors to a storage medium
Web Security API performing authentication and authorization
OAuth2 Client API querying OAuth2 providers, hiding vendor complexity underneath
SQL Data Access API querying SQL databases, hiding vendor complexity underneath
NoSQL Data Access API querying NoSQL key-value stores, hiding vendor complexity underneath
HTTP Headers API reading/writing HTTP headers and performing automatic cache/CORS validation
Internationalization API automatic internationalization & localization of responses
Unit Testing API creation and execution of unit test suites (used by all APIs above)
Migrations API automate data migration between development environments.

The whole integration process is automated by Framework Configurer API, which offers you a step-by-step console program where developers can choose the features they want in their project and program will handle all the configuration complexities.

Additional APIs

In addition to APIs that are automatically integrated by framework, there are a few optional ones developers only need to bind via composer. Each adds one more ability to your project, as shown in table below:

Name Ability Added
SQL Statements API generating SQL queries programmatically based on SQL standards and vendor extensions
PHP Mailing API automating email sending based on RFC-4021 standards and signing based on RFC-6376
RSS Feed Generator API automating and encapsulating RSS feed generation based on w3.org official standards
FileDB API file-based key-value store to be used for persistent and easily manageable caching
URL Requester API ultra high performance single/multi request executor wrapping cURL
Shell Processes API encapsulates shell process execution, pooling and streams handling

Dependencies

As above flowchart shows, framework skeleton (components in blue and colored arrows) is only an integration platform, designed in such as way that harmony, minimalism and efficiency are enforced. As a consequence it contains two areas:

Skeleton Dependencies

Framework Skeleton API, or Framework Configurer API that configures it, come with following files in your project root, each relevant for integration as well as quality assurance jobs, required to have a fully working project:

User Dependencies

Once downloaded, skeleton becomes your project foundation, so developers are expected to build the final project on components listed above:

All code found in src and tests folders will be autoloaded. To learn more users should develop their project dependencies, check Tutorials section!

Requirements

All APIs used by framework as well as skeleton itself are 100% unit tested using Unit Testing API, namespaced, PSR-4 compliant and composer autoload reliant. Their only requirement is PHP7.1+ interpreter and, generally, SimpleXML extension!

×