Sclable Business Solutions GmbH
Attribution-NonCommercial-NoDerivatives 4.0 International 01/28/2014
1.0
Technical white paper
The Sclable Business Application Development Platform provides an environment for designing, developing and running business applications. The platform consists of software components and development tools with a clear focus on solving problems occurring during the development and Author Copyright Last update Version Document type Abstract
Business Application
Development Platform
Abstract 1
Table of Contents 2
Introduction 3 Purpose of this document
What is not covered
Sclable components 4
Core Engine
Meta Language 5
Generator Domain Model
Attributes & Relations 6
Workflows Agendas 7 Low-Level SQL API Productivity Layer 8 PHP Framework PHP API Generic Application Your Packages 9 Acknowledgements Glossary 10
Table of Content
PURPOSE OF THIS DOCUMENT
This document is intended for developers of business applications, who have not used Sclable before. It gives a high level overview of what comprises the Sclable Business Application Development Platform. It gives an introduction to the nomenclature, the concepts used in the Sclable environment, a layered visualization of the platform components, and an explanation of how they interact with each other.
WHAT IS NOT COVERED
This document does not include the technical confi-guration details. Those will be presented in separate publications for each of the platform’s components. This document does not feature FAQs, How-Tos, tuto-rials or code examples. Nevertheless, if you think this document lacks other pertinent information, please let us know on http://sclable.io.
Sclable Components
Figure 1:
A layered visualization of the Sclable Components
Domain Designer
Low-Level SQL API
API
Domain Model
Framework
Meta Language
Generator
Generic Application
Packages
Your Packages
Productivity
Layer
(PHP, HTML5, Bootstrap, jQuery, CSS3)Y
O
U
R
A
P
P
L
I
C
A
T
I
O
N
Core Engine
(PostgreSQL)Generator
The generator component handles the logical execution of changes to a domain model. It is an SQL-interpreter/ compiler for the meta language. Every change to the domain model of a business application is immediately reflected by the generator component triggering the correct procedures to change database relations, fun-ctions, triggers, indices and much more. The generator component can be detached from a database for the purpose of “locking” a domain model for runtime en-vironments.
Domain Model
The domain model, or “Sclable Business Domain Model” (SBDM) holds every logical detail of a business domain needed for your application. The Sclable Business Do-main Model describes the entities, their attributes, roles, relationships and workflows, as well as the constraints that govern your business domain. The description lan-guage used is Sclable’s own Meta Language. An SBDM resides completely within the RDBMS and it includes the
attributes and relations, workflows and agendas of your business domain’s entities. To sum up these concepts for non-technicians, it is all about the data (attributes & relations) being processed (workflows) by involving people (agendas).
Core Engine
The Sclable Core Engine is the foundation layer of Sclable’s domain modelling capabilities. It extends the feature set of the RDBMS by providing enterprise-grade business application functionality such as relations, constraints, events, triggers, indices, security, data dic-tionaries, revision logging, data and model history and more. It is completely implemented in PL/pgSQL
and is an integrated part of your business application’s database. Sclable uses PostgreSQL as it’s RDBMS of choice. PostgreSQL is currently mandatory for develo-ping and running business applications with Sclable. The core engine generates and organizes the database structure of your business domain. All domain model specific functions are provided within the RDBMS. That way, your business domain’s logic functionality can be accessed via a Low-Level SQL API in standard SQL syntax. This low-level API is mirrored by Sclable’s higher leveled API implemented in PHP.
Meta Language
The meta language, or “Sclable Business Domain Meta Language” (SBDML) is the conceptual base of the core engine. The meta language is designed to describe every logical aspect of a domain model. The Frame-work, API, the Generic Application and all other Sclable components are built on top of it. The Sclable Platform provides tools for importing and exporting domain models as XML documents. These XML documents represent the Domain Model and play an important role when developing Your Packages.
Attributes & Relations
Attributes and relations describe the physical data mo-del of your application. Since Sclable makes extensive use of references, all Sclable components provide ways for exploring the ER-model of your business domain. The interactive visual exploration becomes important when the relations are modelled during the development of a domain model.
Figure 2:
A visual representation of a segment of an ER-model
request subject department organisational unit name organisational unit D E P A R T M E N T T I C K E T O R G A N I S AT I O N A L U N I T name
Sclable Components
Workflows
Sclable Workflows are State Machines and represent the way, entities within the domain model are processed. As such they consist of states and actions which trigger transitions between them. As the ER-model describes the physical data model, the actions within the work-flows are generated as SQL functions. Sclable provides ways to interactively and visually explore and model workflows.
Agendas
Agendas in Sclable are similar to User-Roles well known in the context of classic ACL concepts. The main diffe-rence is that rather than granting permissions, agendas allow for automated task delegation and workload balancing. Agendas are named lists of actions with an optional binding to a related entity. One or more agendas can be assigned to users of a Sclable appli-cation, thus defining the task scope of a user. Agendas bound to an entity can be assigned with a binding to an instance of that entity and therefore allow for the delegation of tasks dynamically along workflows and throughout any tree-like data structure.
Low-Level SQL API
At the SQL level Sclable provides an API which reflects your domain model. The generator component creates and maintains views, functions (stored procedures), trig-gers and indices for you to handle your domain model just right from the command line. Restricted access is granted according to your modeled agendas.
Ticket
Figure 3:
A Sclable workflow visualization
Productivity Layer
API
The API-Layer provides all the functionality to commu-nicate with the core engine through the Framework.
In terms of reflecting the domain model it mirrors the
Low-Level SQL API in PHP. The generic application is built upon the API and you will use the API’s helpers, traits, classes and methods when you write PHP code for your application to extend Sclable. One of the most obvious benefits of the API is that it allows you to code in your domain’s language. We call this a DVC (Domain- View- Controller) pattern.
Generic Application
The Generic Application contains overview screens to browse through an entity’s instances. Instances are organized into tab panes according to the entity’s work-flow states. It is possible to execute actions according to your domain’s agendas with each instance. Therefore, the Generic Application generates web forms and hand-les request and response. Any alteration of your domain model also alters the Generic Application and immedi-ately allows you to see, use and verify those changes from the perspective of the end user.
Extending the Generic Application is also easy. Every generated user interface consists of default page elements such as input fields, select dropdowns, date selectors, etc. which can be overridden by your own code. Along the process of receiving requests, display-ing a generic form, submittdisplay-ing the form and executdisplay-ing
The productivity layer is completely separated from the core engine. In case no web front-end is needed for an application, there is no need to install the productivity layer’s components.
Sclable ships with a web application productivity layer written in PHP, HTML5, JavaScript and CSS3 utilizing po-pular libraries such as Log4PHP, the Smarty Templating engine, The Bootstrap javascript and CSS Framework, jQuery and SASS.
Framework
The Framework is the foundation for the API as well as the Generic Application. It provides all components you will need for building web-based business appli-cations quickly and easily. Among these are routines for request/response handling, routing, templating, etc. as well as helpers like a database abstraction layer, a caching facility, session management and much more. In addition, the Framework ships with a number of known and tested libraries such as the Smarty template engine or Log4PHP to add both stability and versatility to the framework. The framework’s resources are integ-rated by the “Lazy Loading” design pattern.
Your Packages
Sclable comes quite lightweight. Additional functio-nality comes in packages. They can be anything from libraries and helpers to obscure data types, from an appropriate page element to full-fledged applications. A package might extend Sclable via SQL, CSS, JavaScript or PHP but also integrate any other programming or scripting language.
Packages can extend the functionality of existing packages as well. A good example would be a package which provides a generic calendar view and another package adding support for additional calendar resour-ces. Just as the Generic Application provides hooks for callbacks from other packages, every Package can offer hooks of its own.
As the Generic Application is a package in its own right, every Package might come with a domain of its own or extend other domains.
Acknowledgements
This technical white paper is continuously improved by the members of the Sclable development team.
Glossary
Sclable Business Application Development Platform
A collection of software products and services, called components, provided by Sclable. In the context of a specific component, the Sclable Business Application Development Platform can be referred to simply as “Sclable”.
RDBMS
A Relational Database Management System (RDBMS) is a database management system that is based on the relational model.
PostgreSQL
An object-relational database management system (ORDBMS) with an emphasis on extensibility and stan-dards-compliance.
PL/pgSQL
Procedural Language/PostgreSQL (PL/pgSQL) is a procedural programming language supported by the PostgreSQL RDBMS.
API
An Application Programming Interface (API) is a set of routines, protocols, and tools for building software applications.
DVC
Sclable’s Domain-View-Controller is a domain model enhanced MVC.
ERM (ER-model)
An Entity Relationship Model (ERM) is a data model for
State Machine
A mathematical model of computation used to design both computer programs and sequential logic circuits.
State
In computer science and automata theory, the state of a digital logic circuit or computer program is a technical term for all the stored information, at a given instant in time, to which the circuit or program has access.
Action Type
In Sclable, it is create, edit, read and delete. Notably these are types of actions, not the actions themselves, that are nevertheless bound to the original CRUD actions of the RDBMS.
ACL
An Access Control List (ACL) specifies which users or system processes are granted access to objects, as well as what operations are allowed on given objects.
Lazy Loading
A design pattern commonly used in computer program-ming to defer initialization of an object until the point at which it is needed. It can contribute to efficiency in the program‘s operation if properly and appropriately used.
PHP
A server-side scripting language designed for web de-velopment but also used as a general-purpose program-ming language.
HTML5
A markup language used for structuring and presenting content for the Web. The Sclable Business Application Development Platform is finally generated in HTML5.
CSS3
A style sheet language used for describing the look and formatting of a document written in a markup language.
Javascript
A dynamic computer programming language most com-monly used as part of web browsers, whose implemen-tations allow client-side scripts to interact with the user, control the browser, communicate asynchronously, and alter the document content that is displayed.
log4PHP
A versatile logging framework for PHP.
Smarty
A web template system for PHP.
Bootstrap
A free collection of tools for creating websites and web applications. It contains HTML and CSS-based design templates for typography, forms, buttons, navigation and other interface components, as well as optional JavaScript extensions.
jQuery
A cross-platform JavaScript library designed to simplify the client-side scripting of HTML.
SASS
A scripting language that is interpreted into Cascading Style Sheets (CSS).