designbymalina/dbmframework
Composer 安装命令:
composer require designbymalina/dbmframework
包简介
DBM Framework
README 文档
README
DBM Framework is a lightweight PHP application engine designed for developers who want full architectural control without the complexity of heavyweight frameworks.
A framework focused on performance, simplicity, and complete control over the application architecture.
Designed for high-performance modular PHP applications.
Fast. Flexible. PSR-compliant.
The DBM v6 framework was created as a response to the excessive complexity in modern PHP frameworks.
It does not impose a complete application structure - it provides ready-made components that can be used or replaced.
Performance
The framework was designed with minimal runtime overhead in mind:
- ~1.9 ms response time (with server caching enabled)
- ~3–4 ms without caching
- ~5 ms with database and templating
Measured on an external server in a development environment.
Results depend on configuration and load.
"Laravel and Symfony are powerful and extensive. DBM focuses on speed, lightweight architecture, and full control."
Why DBM Framework?
Unlike large frameworks:
- it doesn't dictate the application's structure
- it doesn't hide logic behind "magic"
- it doesn't introduce unnecessary layers
It gives you full control over your code and performance.
DBM is a framework that doesn't fight the developer - it lets them work the way they want.
Features
The framework provides the minimal set of tools needed to build applications—without unnecessary layers and overhead.
- Modular architecture (PSR-4 compliant)
- Lightweight middleware pipeline (PSR-style request flow)
- Flexible routing system
- Lightweight Dependency Injection container (no reflective magic)
- Event-driven extensibility
- CLI support via the application layer
- Framework core only (no CMS, no platform, no UI layer)
- Minimal runtime overhead (focused on high performance)
No hidden mechanisms or automatic configuration – everything works transparently and predictably.
Performance First Architecture
DbM Framework was designed with one primary goal: maximum performance with minimal overhead.
From routing and dependency loading to templating and API responses - every layer is optimized for speed and flexibility.
⭐ If you like the project, leave a star on GitHub.
Local benchmark tests showed significantly lower runtime overhead compared to many popular PHP frameworks.
Projects based on DBM Framework
- DBM CMS
- DBM Platform
- API systems
- Modular web applications
Built-in components
The framework includes a set of lightweight infrastructure components needed to build web applications.
HTTP and Application
- HTTP routing
- Middleware (request/response pipeline)
- Dependency Injection container
- Event and listener system
- CLI console mechanism (implemented in the application layer)
Data and presentation
- Template system (DbM View Engine)
- Data access layer (Doctrine DBAL compatible Query Builder)
- Translation system
- Form validator
Infrastructure
- Session system and cookies
- File system + file and image upload
- Logger
- Error handler
- Mailer interface
- Helpers and sanitizers
The components are lightweight, modular, and can be replaced with a custom implementation (e.g., Twig instead of the built-in view engine).
The framework was designed as a modular monolith – components can be developed independently, maintaining the simplicity of implementing a single application.
Template Engine
The framework uses the lightweight DbM View Engine by default.
- Fast and dependency-free
- Based directly on PHP (no DSL)
- Extensible via callbacks
Can be replaced with another engine (e.g. Twig).
Philosophy
DBM Framework separates responsibilities into distinct layers:
- Framework = execution engine
- Application Layer = fully user-defined
- CMS / Platform = optional ecosystem extensions
The core remains lightweight, predictable, and reusable.
DBM Framework avoids heavy reflection-based autowiring and instead favors explicit dependency registration.
Services are intentionally registered using lightweight container methods such as singleton() or set(), providing predictable execution flow, lower runtime overhead, and full architectural control.
Project History
The DBM Framework evolved in stages – from a simple micro-framework to a full application ecosystem.
- v1 / v2 - project beginnings and architectural experiments
- v3 / v4 - lightweight monolithic microframework
- v5 - transition to a modular monolith architecture
- v6 - separation of the framework engine from the application layer and development of the DBM ecosystem
The current version focuses on performance, modularity, and full control over the application architecture.
Installation
Requirements:
- PHP 8.1 or later
- Composer
composer require designbymalina/dbmframework
After installation, create the application layer (bootstrap) responsible for running the framework.
Basic Usage
DBM Framework is not a standalone application. It must be used within its own application layer.
Example:
Below is a minimal example of running an application based on DBM Framework.
// example/index.php declare(strict_types=1); use Dbm\Core\Paths; $baseDirectory = realpath(dirname(__DIR__)); require_once $baseDirectory . '/vendor/autoload.php'; Paths::setBasePath($baseDirectory); $appFactory = require __DIR__ . '/bootstrap/app.php'; $app = $appFactory(); $response = $app->run(); $response->send();
Process:
- Set the base path
- Load the autoloader
- Create the application via the factory
- Start the request -> response lifecycle
Minimal application structure
- bootstrap/app.php - application factory
- bootstrap/services.php - DI container configuration
- bootstrap/controller.php - example controller
php -S localhost:8000 example/index.php
URL: http://localhost:8000/
Routing example
$router->get('/path', [NameController::class, 'methodName'], 'route_name');
A simple example of mapping a URL path to a controller.
Details:
Modular Architecture
The DBM Framework supports a modular monolith approach.
An application can be developed as a set of independent modules with a clear separation of concerns while maintaining the simplicity of a single system implementation.
Architecture Overview
The framework operates based on the following cycle:
Request -> Routing -> Middleware -> Controller -> Response
More: Architecture
The DBM framework consists of:
- kernel (request lifecycle)
- router (flexible routing)
- middleware dispatcher
- container (DI)
Design Principles
- no global state
- no hidden magic
- explicit configuration
- composition instead of inheritance
Development
Cloning the repository and installing dependencies:
git clone https://github.com/designbymalina/dbmframework
cd dbmframework
composer install
or via GitHub CLI.
When to use DBM Framework
The framework is suitable when:
- you're building your own system from scratch
- you need high performance
- you don't want an opinionated framework (like Laravel/Symfony)
- you're creating an API or backend for your application
It's not a "plug & play" framework; it requires building your own application layer.
If you need a ready-made solution, see DBM Platform.
DBM Platform - framework-based application (GitHub)
DBM Ecosystem
DBM Framework is part of a larger ecosystem:
- DBM Framework - application engine
- DBM Platform - ready-made application layer
The platform extends the framework with an administration panel, authentication, and application modules.
More: Ecosystem
Documentation
Full framework documentation is available in the /_Docs directory.
Start:
License
Project licensed under the MIT License.
Copyright (c) Design by Malina
designbymalina/dbmframework 适用场景与选型建议
designbymalina/dbmframework 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 11 次下载、GitHub Stars 达 1, 最近一次更新时间为 2026 年 03 月 26 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「framework」 「php」 「router」 「dependency-injection」 「modular」 「psr」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 designbymalina/dbmframework 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 designbymalina/dbmframework 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 designbymalina/dbmframework 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
PHP Framework HLEB2 is the foundation of the web application. Provides ease of development and application performance.
Router
PMVC App Action Router
Database alias router extension for Nette Framework
Alfabank REST API integration
PHP Router
统计信息
- 总下载量: 11
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 28
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-03-26