Framework Skeleton: Your Site’s Building Foundation

This API is the framework itself, a skeleton onto which developers are supposed to build structures on in order to get a complete web application.

How does it work?

The way it works is best described by this drawing:

Skeleton is thus nothing more than an integration platform involving other APIs, its internal components and developers' code. As an integration platform it only needs to implement following steps:

  1. Redirects all inbound requests, except those pointing to static files (eg: images), to index.php file in site root using .htaccess (or similar) directives. This process is called bootstrapping, making framework sole handler of your application.
  2. Within index.php (bootstrap) file, takes control of STDERR flow by starting STDERR MVC API based on stderr.xml file. As latter runs, it integrates developers' code and delegates to Framework Engine API for other APIs integration.
  3. Within index.php (bootstrap) file, takes control of STDOUT flow by starting STDOUT MVC API based on stdout.xml file. As latter runs, it integrates developers' code and delegates to Framework Engine API for other APIs integration.

Once started, STDOUT MVC API being responsible of converting requests to responses, will immediately run its logic. STDERR MVC API, on the other hand, will stay in suspended animation and run its logic only when an error / uncaught exception was triggered in STDOUT flow.

STDOUT MVC API Integration

This section covers the blocks built by Lucinda Framework on STDOUT MVC API architecture in order to handle client requests into server responses.

As above drawing shows, it works by making STDOUT MVC API employ stdout.xml file to:

Each event listener invokes Framework Engine API to perform APIs integration and (optionally) saves results into one or more attributes that will from that moment on become available to controllers and later occurring event listeners.

STDERR MVC API Integration

This section covers the blocks built by Lucinda Framework on STDERR MVC API architecture in order to handle application errors into server responses.

As above drawing shows, it works by making STDERR MVC API employ stderr.xml file to:

How are OAuth2 vendors integrated?

A very powerful feature of Lucinda Framework (and its skeleton) is support for most popular OAuth2 clients through a shared driver. This way, developers will no longer need to download official PHP driver from vendor page (eg: Facebook), but use this single shared driver modeled on RFC 6749 standard all vendors ascribe to already instead. To learn more how this process works as well as actions required from developers, go to OAuth2 integration homepage.

How can it be updated?

Unlike all other APIs used by framework, once installed this one becomes the foundation behind your site, so developers MUST be able to customize it at will. When framework is updated later on via:

composer update

skeleton remains untouched because it may contain work by developers that have already built structures on it! To update skeleton as well, you need to go somewhere else (outside project) and run:

git clone https://github.com/aherne/lucinda-framework.git

then manually compare each file in application folder to those in your site in order to see what to update and what to leave unchanged. After each successful update, you MUST retest the whole site!

How can it be used?

By installing Lucinda Framework, you already have this API! To learn how to use it, follow this step-by-step guide and reference guide to see how each class and method is working.


Share