Synopse mORMot framework
Synopse mORMot is a Client-Server ORM/ODM SOA MVC framework for Delphi 6 up to Delphi 10.1 Berlin and FPC 2.7.1/3.1.1
Targeting Win32/Win64 and Linux via FPC for high-performance servers, with direct client consumption via REST/JSON from any Delphi (VCL/FMX), FPC/Lazarus or SmartMobileStudio/HTML5 platform (including mobile targets).
The main features of mORMot are therefore:
- ORM/ODM: objects persistence on almost any database (SQL or NoSQL);
- SOA: organize your business logic into services;
- Clients: consume your data or services from any platform, via ORM classes or SOA interfaces;
- Web MVC: publish your ORM/SOA process as responsive Web Applications.
mORMot offers you all features needed for building any business application, with state-of-the-art integrated software components, designed for both completeness and complementarity, offering convention over configuration solutions, and implemented for speed and efficiency.
For storing some data, you define a class, and the framework will take care of everything: routing, marshaling, table creation, SQL generation, validation.
For creating a service, you define an interface and a class, and you are done. Of course, the same ORM/ODM or SOA methods will run on both server and client sides: code once, use everywhere!
For building a MVC web site, write a Controller class in Delphi, then some HTML Views using Mustache templates, leveraging the same ORM/ODM or SOA methods as Model.
You need a HTTP server, a proxy redirection, a test, a mock, add security, define users or manage rights, a script engine, a report, User Interface, switch to XML format or publish a HTML web site - just one class to instantiate.
If you need a tool or feature, it is probably already there, waiting for you to use it.
The table content of our Software Architecture Document makes it clear: this is no ordinary piece of software.
Due to its modular design, switch from such a Client-Server architecture over HTTP, named pipes or GDI messages into a stand-alone application is just a matter of mORMot classes initialization.
For instance, the very same executable can even be running stand-alone, as a server, or a client, depending on some run-time parameters!
Emphasizing simplicity, speed and versatility, mORMot is a incredibly well documented Open Source project easy enough to add basic ORM or Client-Server features to simple applications for hobbyists, or let experienced users develop scaling and strong service-based projects for their customers, with the advantages of native code and easy-to-deploy solutions, reducing deployment cost and increasing ROI.
It provides an Open Source self-sufficient set of units (even Delphi starter edition is enough) for creating any application, from a stand-alone solution up to the most complex Domain-Driven Design (DDD):
- Presentation layer
featuring MVC UI generation with i18n and reporting (with pdf export) for rich Delphi clients, web clients via integrated MVC/Mustache template engine, or rich AJAX clients;
- Application layer
implementing Service Oriented Architecture via interface-based services (like WCF) and Client-Server ORM (including method-based services) - following a RESTful model using JSON over several communication protocols (including HTTP/1.1);
- Domain Model layer
handling all the needed business logic in plain Delphi objects, including high-level managed types like dynamic arrays or records for Value Objects, schema-less/dynamic value variables as fast and useful TDocVariant, or dedicated classes for Entities or Aggregates; you can have an automated change tracking of any object in your model;
- Data persistence infrastructure layer
with ORM persistence over direct Oracle, MS SQL, OleDB, ODBC, ZEOS/ZDBC access or
TDataSetlibraries like FireDAC/AnyDAC, UniDAC, NexusDB or BDE, with a powerful SQLite3 kernel, and direct SQL access if needed - with amazing performance and advanced features like field/column mapping, Array DML - auto-generating SQL for SQLite3, Oracle, Jet/MSAccess, MS SQL, Firebird, DB2, PostgreSQL, MySQL and NexusDB, and able to connect directly to a MongoDB server for high performance NoSQL/ODM process;
- Cross-Cutting infrastructure layers
for handling data filtering and validation, security (even Windows authentication or any custom model), caching, logging and testing (framework uses test-driven approach and includes
interfacestubbing and mocking).
With mORMot, ORM is not used only for data persistence of objects (like in other implementations), but as part of a global n-Tier, Service Oriented Architecture (SOA), ready to implement Domain-Driven solutions.
This really makes the difference.
The business logic of your applications will be easily exposed as Services, and will be accessible from light clients (written in Delphi or any other mean, including AJAX).
No dependency is needed at the client level (no DB driver, nor third-party runtime): it is able to connect via standard HTTP, even through a corporate proxy or a VPN. Rich Delphi clients can be deployed just by copying and running a stand-alone small executable, with no installation process. Stream can be encrypted via HTTS or directly with SHA/AES-256. Endpoints are configured automatically for each published interface on the server side, and creating a load-balancing proxy is a matter of one method call.
Speed and scalability has been implemented from the ground up: a genuine optimized multi-threaded core let a single server handle more than 50,000 concurrent clients, faster than DataSnap, WCF or node.js, and our rich SOA architecture is able to implement both vertical and horizontal scalable hosting.
Even if mORMot will be more easily used in a project designed from scratch, it fits very well the purpose of evolving any existing Delphi project, or even creating the server side part of an AJAX application.
Licensed under a MPL/GPL/LGPL tri-license.
A class API just doesn't cut it.
The mORMot framework has a great reference documentation available to download.
An exhaustive documentation (more than 1800 pages) is available. It has been written using our SynProject Open Source tool.
In particular, you should take a look at all general introduction chapters of the Software Architecture Design (SAD) document. It will cover all key-concepts and code modeling used by the framework (including some you may never have been heard of if you stick to the standard Delphi RAD approach since years, like ORM, MVC, NoSQL, SOA DDD or stubs/mocks), and provide both developer and reference guide.
This Software Architecture Design documentation is available in two forms:set of slides is also available to find out more out mORMot's underlying concepts.
Sample projects will help you find out how easy to use is mORMot.
A blog is available at http://blog.synopse.info, and will notify any evolution of this project.
A forum is dedicated to this framework, and is available on https://synopse.info/forum.
Synopse, as a company, is able to provide additional audit and support, on request.
We are able to offer training and consulting on any subject linked to mORMot.
A RoadMap page is maintained, in a form of a draft To-Do list items.
Some nice features are on the road, so stay tuned, and don’t be shy: propose your patches and enhancements! Enjoy Open Source the fair way!
You can freely comment and make your own proposals in our forum.
- Forget anything about
TClientDataSet, TQuery, the DB unit and all component-driven/RAD database design;
- See the ReadMe file in its latest revision;
- Take a look at this blog article;
- Read the REST concept part of the documentation;
- Read the ORM part of the documentation and learn how to use
TSQLRecord / TSQLTable / TSQLRestClient / TSQLRestServerclasses;
- Read the documentation about Delphi
interfacesyntax, and how they can define a rich n-Tier Service Oriented Architecture with mORmot;
- Download the source code - it is preferable to retrieve the "unstable" 1.18 trunk version to get all the latest features and bug fixes - also get the updated SAD pdf;
- See all supplied samples code to discover the client/server ORM/SOA approach - note that some samples expect the data generated by the integrated regression tests (project
SQLite3\TestSQL3.dpr) to be available, and the port 888 to be registered for the http.sys server (run project
- Search the documentation (using the index at the beginning of SAD document) or the forum (see button top of this screen) about everything you want to know.
Post a new thread in the forum for any precise question.
- The framework Main Demo implementation is also detailed in the documentation.
- The MVC/MVVM blog sample is also a nice showcase of ORM and services with real working code.