Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Architecture
From n-Tier to SOA
From SOAP to REST
Technical Debt
Design
From SQL to ORM, NoSQL and ODM
From RAD to MVC
SOLID principles
Domain Driven Design (DDD)
Multi-tier architecture
Logical and Physical Views
Service-Oriented Architecture (SOA)
mORMot practicing
Application Tier
Data Tier
Application processing
Data management
VCL/FMX/IW app
SQL Database
Logic Tier
Data Tier
Application Tier
Data Tier
PHYSICAL
Web Client
Web Server
SQL Database
PHYSICAL
Web Client
Web Server
Embedded SQLite3 Database
LOGICAL
Web app Application Tier
Client & Server
LOGICAL
Web app
Client & Server
Application Tier
SQL Database
With stored procedures
Data Tier
From n-Tier to SOA
Logical and Physical Views
Client 1 (Delphi) Client 2 (AJAX)
Presentation Tier
Presentation Tier Presentation Tier
Application Server
Application Tier
Application Tier
DB Server
Data Tier
Data Tier
Goal:
Package functionality as a suite of
inter-operable services
that can be used within multiple, separate systems
from several business domains
Publisher 1 Service 1
Consumers Application Service Bus Application Publishers
Composition Composition
Client A Publisher 2 Service 2
Publisher Service
Publisher 3 Service 3
Location
Availability
Versions
Easier to upgrade
… to be continued
(we will come back here later)
REST is needed!
AJAX Reporting UI
HTTP 1.1
Application
REST Server
Domain
Model
Services
(interface-based)
Data persistence
ORM
Cross-Cutting
External DB
RESTful architecture
Overseveral protocols, e.g. HTTP/1.1
JSON and UTF-8 based
Factory driven
on server side
on client side
Auto-marshalling to JSON
Tied to framework’s security and light sessions
var I: ICalculator;
begin
if Client.Services['Calculator'].Get(I) then
result := I.Add(10,20);
end;
Register to any kind of TSQLRestClient
Execution will take place on the server side
A “fake” class implementing ICalculator will be created
Data is transmitted by representation as JSON (array of) values
Any server-side exception will be transmitted to the client
Default Yes No
/Model/Interface.Method[/ClientDrivenID]
URI scheme or /Model/Interface/Method[/ClientDrivenID] /Model/Interface
+ optional URI-encoded params
{"method":"MethodName",
JSON array (or object) of parameters
Body content "params":[...]
or void if parameters were encoded at URI [,"id":ClientDrivenID]}
optExecInPerInterfaceThread Each interface will execute its methods in its own thread
optFreeInPerInterfaceThread Each interface will be freed in its own thread
Publisher
Event Event