This folder hosts the RESTful oriented features of the mORMot Open Source framework, version 2.
REST stands for REpresentation State Tranfer, and is a way of communicating between clients and servers. Our framework uses JSON for the REpresentation of data between two ends. In practice, you will use HTTP/HTTPS or WebSockets as communication layer of the REST process. But our parent TSQLRest class is abstract for any actual mean of communication, and could actually involve a direct in-process call.
The framework has a REST orientation, but is not trully RESTful. You could let mORMot publish the ORM layer over REST, but it is better not to be used on production, for obvious security and design reasons. So the framework will offer a REST set of services, which will be defined as methods-based-services or interface-based-services - the later being the most efficient and clean way of defining endpoints. Depending on how those services are defined, they be more RPC (Remote-Processing-Call) oriented than REST (resource) oriented.
JSON has been found out to be a simple but very powerful mean of data representation, and our framework tries to leverage its usage from the ground up. For instance, the ORM layer (from mormot.orm.core.pas) is able to create efficient JSON from the lowest level of the supported Database engines, and the client side can consume this JSON with very few resource consumption, on all possible platforms - including JavaScript.
One goal of the mORMot 2 rewrite was to follow the SOLID principle.
Our REST approach publishes a TRest class, and its Client and Server inherited classes, which offers:
- Object-Relational-Mapping via its
ORM: IRestORMinterface field; - Service-Oriented-Architecture via its
Servicesfield; - Threading abilities in its
Runfield; - REST-specific features are isolated also in this
TRestclass, like URI routing and execution, authorization and authentication, and sessions support.
Shared Types and Definitions for Abstract REST Process
- Customize REST Execution
TRestBackgroundTimerfor Multi-Thread ProcessTRestRunThreadsMulti-Threading Process of a REST instanceTRestAbstract Parent Class- RESTful Authentication Support
TRestURIParamsREST URI DefinitionsTRestThreadBackground Process of a REST instanceTOrmHistory/TOrmTableDeletedModifications Tracked Persistence
Client-Side REST Process
- Client Authentication and Authorization Logic
TRestClientRoutingREST/TRestClientRoutingJSON_RPCRouting SchemesTRestClientURIBase Class for Actual ClientsTRestClientLibraryRequestafterTRestServer.ExportServerGlobalLibraryRequest
Server-Side REST Process
TRestServerURIContextAccess to the Server-Side ExecutionTRestServerRoutingREST/TRestServerRoutingJSON_RPCRequests Parsing SchemeTAuthSessionfor In-Memory User SessionsTRestServerAuthenticationImplementing Authentication SchemesTRestServerMonitorfor High-Level Statistics of a REST ServerTRestRouterfor efficient Radix Tree based URI MultiplexingTInterfacedCallback/TBlockingCallbackClassesTRestServerAbstract REST ServerTRestHttpServerDefinitionSettings for a HTTP Server
Standalone REST In-Memory Server Using JSON or Binary Persistence
TRestOrmServerFullMemoryStandalone REST ORM EngineTRestServerFullMemoryStandalone REST Server
REST Server and Client Using an Embedded SQLite3 Database Engine
TRestServerDBREST Server with Direct Access to a SQLite3 DatabaseTRestClientDBREST Client with Direct Access to a SQLite3 Database
Client-Side REST Process over HTTP/WebSockets
TRestHttpClientGenericandTRestHttpClientRequestParent ClassesTRestHttpClientWinSockREST Client Class over SocketsTRestHttpClientWebsocketsREST Client Class over WebSocketsTRestHttpClientWinINetTRestHttpClientWinHTTPWindows REST Client ClassesTRestHttpClientCurlREST Client Class over LibCurl
Server-Side REST Process over HTTP/WebSockets
TRestHttpServerRESTful ServerTRestHttpRemoteLogServerto Receive Remote Log Stream
Model-View-Controller (MVC) pattern and Mustache over TRestServer and TOrm
- MVC/MVVM Application over a
TRestServer - Expression Helpers for the ORM Data Model