Enhance existing projects with mORMot
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.
One benefit of such a framework is to facilitate the transition from a Client-Server architecture to a N-Tier layered pattern.
Due to its modular design, you can integrate some framework bricks to your existing application:
- You may add logging to your code, to track issues and customer-side profiling;
- Use low-level classes like record or dynamic array wrappers, including JSON or binary persistence;
- You can use the
direct DB layers, including the
TQueryemulation class, to replace some BDE queries, or introduce nice unique features like direct database access or array binding for very fast data insertion;
- Reports could benefit of the
mORMotReport.pascode-based system, which is very easy to use even on the server side (serving PDF files), when your business logic heavily relies on objects, not direct DB ;
- HTTP request may be made available using Client-Server services via methods, e.g. for retrieving HTML pages generated on the fly, pictures or PDF reports;
- You can little by little move your logic out of the client side code into some server services defined via interfaces, without the overhead of SOAP or WCF; migrating into SOA is IMHO the main benefit of mORMot for existing projects;
- Make your application ready to offer a RESTful interface, e.g. for consuming JSON content via AJAX or mobile clients;
- New tables may be defined via the ORM features of mORMot, still hosted in your external SQL server, as any previous data; in particular, mixed pure-ORM and regular-SQL requests may coexist;
- You may benefit from our very fast in-memory engine, a dedicated SQLite3-based consolidation database or even the caching features, shared on the server side, when performance is needed - it may help integrating some CQRS pattern (Command Query Responsibility Segregation) into your application via a RESTful interface, and delegate some queries from your main database;
- If you are still using an old version of Delphi, and can't easily move up due to some third party components or existing code base, mORMot will offer all the needed features to start ORM, N-Tier and SOA, starting with a Delphi 6 edition;
- Once your application reached success, you start to understand that you need to enhance your architectural model, then start thinking about the benefit of embracing Domain-Driven-Design.
mORMot implements the needed techniques for introducing what
Michael Feathers calls, in his book Working Effectively With Legacy
Code, a seam.
A seam is an area where you can start to cleave off some legacy code and begin to introduce changes. Even mocking abilities of mORMot will help you in this delicate task - see for instance this web article.
Do not forget that Synopse, as a company, is able to offer dedicated audit
and support for such a migration.
The sooner, the better.