Implemented features

Here are the key features of the current implementation of services using interfaces in the Synopse mORMot framework:

Feature Remarks
Service Orientation Allow loosely-coupled relationship
Design by contract Data Contracts are defined in Delphi code as standard interface custom types
Factory driven Get an implementation instance from a given interface
Server factory You can get an implementation on the server side
Client factory You can get a "fake" implementation on the client side, remotely calling the server to execute the process
Auto marshaling The contract is transparently implemented: no additional code is needed e.g. on the client side, and will handle simple types (strings, numbers, dates, sets and enumerations) and high-level types (objects, collections, records, dynamic arrays) from Delphi 6 up to XE2
Flexible Methods accept per-value or per-reference parameters
Instance lifetime An implementation class can be:
- Created on every call,
- Shared among all calls,
- Shared for a particular user or group,
- Stay alive as long as the client-side interface is not released,
- or as long as an authentication session exists
Stateless Following a standard request/reply pattern
Signed The contract is checked to be consistent before any remote execution
Secure Every service and/or methods can be enabled or disabled on need
Safe Using extended RESTful authentication
Multi-hosted
(with DMZ)
Services are hosted by default within the main ORM server, but can have their own process, with a dedicated connection to the ORM core
Broker ready Service meta-data can be optionally revealed by the server
Multiple transports All Client-Server protocols of mORMot are available, i.e. direct in-process connection, GDI messages, named pipes, TCP/IP-HTTP
JSON based Transmitted data uses JavaScript Object Notation
Routing choice Services are identified either at the URI level (the RESTful way), either in a JSON-RPC model (the AJAX way)
AJAX and RESTful JSON and HTTP combination allows services to be consumed from AJAX rich clients
Light & fast Performance and memory consumption are very optimized, in order to ensure scalability and ROI

How to make services

The typical basic tasks to perform are the following:
- Define the service contract;
- Implement the contract;
- Configure and host the service;
- Build a client application.

Continue reading...

This article is part of a list of other blog articles, extracted from the official Synopse mORMot framework documentation:

Feedback and questions are welcome on our forum, just as usual.