This folder hosts the RESTful SOA high-level features of the mORMot Open Source framework, version 2.
The framework offers two ways of implementing SOA:
- Defining a class method at
TRestlevel; - Defining an
interfaceand the associated implementationclass.
The method-based services:
- leverage full access to the input/output of the HTTP request on the server side;
- offer the best performance;
- but require to write the client-side by hand.
The interface-based services:
- are more convenient to define the services contracts, in regular code;
- can generate a fake implementation
classon the client side; - are more natural when called from Object Pascal code;
- offers natural bi-directional communication over WebSockets, by defining
interfaceparameters in the contract; - has built-in options for authorization/security, threading abilites, JSON/XML marshalling.
In a nutshell, when building RESTful services, use interface-based services as provided by these mormot.soa.* units. But you can mix the two, so some dedicated endpoints could be implemented using methods.
Shared Interface-based Service Oriented Architecture (SOA) Process
TOrmServiceLog TOrmServiceNotificationsClassesTServiceFactoryAbstract Service ProviderTServiceFactoryServerAbstractAbstract Service ProviderTServiceContainerAbstract Services Holder- SOA Related Interfaces
TServicesPublishedInterfacesListServices Catalog
Client-Side Interface-based Service Oriented Architecture (SOA) Process
TServiceFactoryClientService ProviderTServiceContainerClientAbstractService ProviderTServiceContainerClientServices Holder
Server-Side Interface-based Service Oriented Architecture (SOA) Process
TInjectableObjectRestService Implementation Parent ClassTServiceFactoryServerService ProviderTServiceContainerServerServices Holder- Asynchronous REST Synchronisation Classes
SOA API Code and Documentation Generation
- ORM and SOA Logic Extraction from RTTI
- Doc/CodeGen wrapper Functions on Server Side
- FPC Dedicated Generators
- Compute Asynchronous Code from Synchronous Interface
- Generate Code and Doc from Command-Line