danieleteti/delphimvcframework

Pascal

DMVCFramework (for short) is a popular and powerful framework for Web API and Web Applications in Delphi. Supports RESTful and JSON-RPC WEB APIs development.

restfulrestful-apirestful-webservicesapplication-servernativedelphiserialization-libraryspeedjsonwebtokenjwt-authenticationdelphimvcframeworkjson-rpc
Star 增长趋势
Star
1.4k
Forks
383
周增长
+1
Issues
15
5001k
2015年5月2019年2月2022年11月2026年9月
README

Table of Contents

DelphiMVCFramework

GitHub All Releases Ask DeepWiki Mentioned in Awesome

The most popular Delphi RESTful framework on GitHub

DelphiMVCFramework is a powerful, open-source framework for building RESTful services, JSON-RPC APIs, and web applications with Object Pascal. It provides a complete MVC architecture with built-in ORM, authentication, TLS 1.3 support and extensive middleware support.

🎯 Key Features

🏗️ Architecture & Framework

  • RESTful compliant (Richardson Maturity Model Level 3)
  • JSON-RPC 2.0 support with automatic object remotization
  • MVC pattern implementation with controller inheritance
  • Middleware system for request/response processing
  • Dependency injection support
  • Domain modeling first approach

🔐 Security & Authentication

  • JWT (JSON Web Token) authentication and authorization
  • HTTP Basic Authentication support
  • Custom authentication mechanisms
  • CORS (Cross-Origin Resource Sharing) handling
  • TLS 1.3 support for secure communications
  • JWT Blacklist middleware for token revocation

💾 Data Access & ORM

  • MVCActiveRecord - Powerful ORM with full CRUD operations
  • Multi-database support: PostgreSQL, MySQL, MariaDB, Firebird, InterBase, SQLite, Microsoft SQL Server, Oracle
  • RQL (Resource Query Language) for flexible querying
  • Named queries support for optimized database access
  • Connection pooling and transaction management
  • Automatic entity generation from database schema

🌐 Web & API Features

  • WebSocket support for real-time bidirectional communication (server & client)
  • Content negotiation with multiple MIME types
  • Server-Side Views with Mustache and TemplatePro support
  • Static file serving middleware
  • File upload/download handling
  • Server-Sent Events (SSE) for real-time updates
  • HATEOAS (Hypermedia as the Engine of Application State) support
  • OpenAPI/Swagger documentation generation
  • Compression support (gzip, deflate)
  • Rate limiting with in-memory and Redis-backed implementations

📊 Data Serialization

  • Flexible JSON serialization/deserialization
  • Custom serializers for complex types
  • Nullable types support
  • Dataset to JSON conversion
  • Multiple naming conventions (camelCase, PascalCase, snake_case, etc.)
  • Attribute-based field mapping

🛠️ Development & Deployment

  • IDE Wizard for project creation
  • Comprehensive logging with LoggerPro integration
  • Built-in profiler for performance monitoring
  • Unit testing framework — 872 tests running against 5 server hosts (Classic / Indy Direct / HTTP.sys / Apache 2.4 / ISAPI). See docs/unit_tests.md for how to run them and the prerequisites.
  • dotEnv configuration support
  • Multiple deployment options: Standalone, Apache module, IIS ISAPI, Linux daemon

🖥️ Platform Support

Delphi Versions

  • Delphi 13 Florence
  • Delphi 12.x Athens
  • Delphi 11.x Alexandria
  • Delphi 10.4 Sydney
  • Delphi 10.3 Rio
  • Delphi 10.2 Tokyo ✅ (minimum supported)

Operating Systems

  • Windows (32-bit and 64-bit)
  • Linux (64-bit)
  • Android (experimental support)

Deployment Targets

  • Console Applications
  • Windows Services
  • Linux Daemons
  • Windows VCL Applications
  • Windows or Linux FMX Applications
  • Apache Modules (Windows/Linux)
  • IIS ISAPI Extensions (Windows)

Supported Databases (MVCActiveRecord)

MVCActiveRecord works with any database supported by FireDAC. The RQL (Resource Query Language) compiler and SQL generator are available for the following databases:

Database Minimum Version Notes
PostgreSQL 9.6+ RETURNING clause, native UUID. Recommended: 13+
Microsoft SQL Server 2012+ OFFSET/FETCH pagination requires 2012. Recommended: 2019+
MySQL 5.7+ LAST_INSERT_ID, backtick quoting. MariaDB 10.2+ also supported
Firebird 1.5+ gen_id sequences, ROWS pagination. RETURNING clause requires 2.0+. Recommended: 3.0+ (IDENTITY columns)
InterBase XE3+ No RETURNING clause, uses gen_id sequences for auto-generated keys
SQLite 3.8+ last_insert_rowid, no sequences. Recommended: 3.30+
Oracle 12c (12.1)+ OFFSET/FETCH pagination, RETURNING clause, sequences via DUAL

Tip: Include MVCFramework.SQLGenerators in your project's uses clause to register all database backends at once. Alternatively, include only the specific generator you need (e.g. MVCFramework.SQLGenerators.PostgreSQL).

🔒 Security & TLS 1.3 Support

DelphiMVCFramework provides enterprise-grade security features including full TLS 1.3 support. The framework automatically negotiates the highest available TLS version and provides:

  • Perfect Forward Secrecy with modern cipher suites
  • Certificate validation and custom certificate handling
  • SNI (Server Name Indication) support for multiple SSL certificates
  • HTTP Strict Transport Security (HSTS) headers
  • Secure cookie handling with SameSite attributes
  • CSRF protection mechanisms

TLS 1.3 brings significant security and performance improvements, including faster handshakes and stronger encryption algorithms. DelphiMVCFramework leverages these improvements automatically when deployed in compatible environments.

🏁 Quick Start

Here's how a simple DMVCFramework controller looks like:

// 1. Create a controller
[MVCPath('/api/hello')]
TMyController = class(TMVCController)
public
  [MVCPath('/world')]
  [MVCHTTPMethod([httpGET])]
  function HelloWorld: TMyObject;
end;

// 2. Implement the action
function TMyController.HelloWorld: TMyObject;
begin
  Result := TMyObject.Create('Hello World!');
end;

// 3. Register and start server elsewhere
FMVC := TMVCEngine.Create(Self);
FMVC.AddController(TMyController);

👉 See full Quick Start Guide

📚 Learning Resources

📖 Official Guide

The comprehensive "DelphiMVCFramework - The Official Guide" is available in multiple languages:

📘 Technical Guides & Papers

Premium guides and video tutorials available at the DMVCFramework Patreon Shop:

  • TemplatePro 1.1 - The Definitive Guide (EN, IT, ES, DE)
  • A Practical Guide to Managing Complex Configurations with .env (EN, IT)
  • Prompt Engineering - Mastering AI Communication (EN, IT, ES, DE)
  • Building a Robust Job Queue System with FirebirdSQL (EN, IT, ES)
  • Practical Guide to API and Webhooks with DelphiMVCFramework (IT, ES)
  • Understanding JSON-RPC: A Lightweight Remote Procedure Call Protocol (EN)
  • CRUD Web API with Delphi, DMVCFramework, and PostgreSQL (EN)
  • MVCActiveRecord Series - Complete ORM guide in 3 parts (EN, IT)
  • Pagination with RQL in DMVCFramework (EN)
  • Using Caddy as Reverse Proxy for DMVCFramework Applications (EN, IT, ES)
  • Localization in DMVCFramework Web Applications (Video)
  • Sessions in DMVCFramework (Video)
  • Bag of Words in Delphi - NLP guide (EN, IT) — Free for Patreon members

🎓 Training & Support

🤝 Community & Support

💬 Get Help

🎯 Support the Project

  • Star this repository - Help others discover DMVCFramework
  • 🐛 Report bugs - Help improve the framework
  • 📝 Contribute documentation - Share your knowledge
  • 💰 Become a Patron - Access to premium contents, videos, article etc. reserved to supporters

👥 Contributors

🏆 Success Stories

"DMVCFramework is a great framework. It's very intuitive, fast, easy to use, actually there is nothing more to ask for." - Samir

"I'm still amazed by the DelphiMVCFramework code and documentation. Thank you very much and I am amazed by your quick feedback." - Benjamin Yang, Director of SQLGate

"We started the process of migrating our systems to micro services and are loving the DMVCFramework." - E. Costa

🏢 Sponsors

DelphiMVCFramework is proudly sponsored by:

Gold Sponsors
bit Time Professionals
bit Time Software
Silver Sponsors
Centro Software
Delphi Studio ES
Orion Law
Vivaticket

📄 License

DelphiMVCFramework is released under the Apache License 2.0. See LICENSE file for details.

🔗 Quick Navigation

Documentation Community
Quick Start Facebook Group
Installation GitHub Discussions
Samples X
RQL Guide Blog
dotEnv

Made with ❤️ by Daniele Teti and the community

相关仓库
apache/dubbo

The java implementation of Apache Dubbo. An RPC and microservice framework.

JavaMavenlibraryApache License 2.0dubbodistributed-systems
dubbo.apache.org
41.6k26.4k
nicolargo/glances

Glances an Eye on your system. A top/htop alternative for GNU/Linux, BSD, macOS and Windows operating systems.

PythonPyPIcliOtherpythonmulti-platform
nicolargo.github.io/glances/
33.5k1.8k
zeromicro/go-zero

A cloud-native Go microservices framework with cli tool for productivity.

GoGo ModuleslibraryMIT Licensegolangmicroservice
go-zero.dev
33.3k4.3k
xuxueli/xxl-job

A distributed task scheduling framework.(分布式任务调度平台XXL-JOB)

JavaMavenlibraryGNU General Public License v3.0xxl-jobjob
xuxueli.com/xxl-job/
30.5k11.5k
go-admin-team/go-admin

基于Gin + Vue + Element UI & Arco Design & Ant Design 的前后端分离权限管理系统脚手架(包含了:多租户的支持,基础用户管理功能,jwt鉴权,代码生成器,RBAC资源控制,表单构建,定时任务等)3分钟构建自己的中后台项目;项目文档》:https://www.go-admin.pro Demo: https://vue.go-admin.pro Antd PRO:https://antd.go-admin.pro

GoGo ModulesMIT Licensegincasbin
go-admin.pro
12.8k2.6k
playframework/playframework

The Community Maintained High Velocity Web Framework For Java and Scala.

ScalalibraryApache License 2.0scalajava
playframework.com
12.6k4k
jeasonlzy/okhttp-OkGo

OkGo - 3.0 震撼来袭,该库是基于 Http 协议,封装了 OkHttp 的网络请求框架,比 Retrofit 更简单易用,支持 RxJava,RxJava2,支持自定义缓存,支持批量断点下载管理和批量上传管理功能

JavaMavenlibraryApache License 2.0okhttpokgo
10.6k2.5k
lihengming/spring-boot-api-project-seed

:seedling::rocket:一个基于Spring Boot & MyBatis的种子项目,用于快速构建中小型API、RESTful API项目~

JavaMavenlibraryjavaspring-boot
9.7k3.7k
lets-blade/blade

:rocket: Lightning fast and elegant mvc framework for Java8

JavaMavenlibraryApache License 2.0mvc-frameworkrestful
lets-blade.github.io
5.9k1.2k
aisuhua/restful-api-design-references

RESTful API 设计参考文献列表,可帮助你更加彻底的了解REST风格的接口设计。

awesomeMIT Licenserestfulrest-api
5.1k926
sofastack/sofa-rpc

SOFARPC is a high-performance, high-extensibility, production-level Java RPC framework.

JavaMavenlibraryApache License 2.0sofa-rpcsofastack
sofastack.tech/sofa-rpc/docs/Home
3.9k1.2k
denji/awesome-http-benchmark

HTTP(S) benchmark tools, testing/debugging, & restAPI (RESTful)

awesomeMIT Licenseawesomeawesome-list
3.8k259