unicate/no-framework
Composer 安装命令:
composer create-project unicate/no-framework
包简介
Packages YES, Framework NO!
README 文档
README
Packages YES, Framework NO!
What is it?
Call it "Glue" or call it "Boilerplate". "No-Framework" aims to give you a head start for development with a simple and understandable foundation.
"No-framework" is based on popular and proven packages which are easily exchangeable with others you like or already know.
Mainly the following packages are used: For dependency injection PHP-DI, for Database access and queries Medoo, for Templating Plates and a few others... And also little self written code as "glue" in between.
Why No-Framework
- I want to have control and I want to understand what I'm doing.
- I want to start small and extend if necessary.
- I want to focus on the solution, not the framework.
- I want to develop fast but without reinventing the wheel.
- I want to use interchangeable components.
The basic answer to satisfy all these needs are packages. Packages as extendable, exchangeable components. With Composer and Packagist the PHP ecosystem offers a perfect solution for this.
What it's not!
It's not another PHP framework. There are already great frameworks out there. Full-fledged like Laravel or Synfony and also Micro-Frameworks like Slim and others.
Using a framework offers some great advantages but has also a few drawbacks. In short that's the following:
- PROs: Fast Development, Security, Documentation, Maintenance and Community.
- CONs: Generic solution that might not suit your needs, limited control, time to learn and understand, overhead and slower execution.
Getting Started
Use Git or Composer:
git clone https://github.com/unicate/no-framework.git my-project-name
composer install
composer create-project unicate/no-framework my-project-name
The "Task List" Demo is a simple example application. Download the code and see what happens. To help you understand, a view hints and principles:
- Important: Setup a local Test-Database with the code in
db/. - Important: Copy the .env-default to .env in
app/configand enter DB connection details. - Important: To start the local PHP server, just execute
serve.sh. - The architecture is based on the MVC pattern.
- Objects are only created by the Dependency Injection container and configured in
app/config/dependencies.php - All environment dependent configuration is done in
app/config/.env. - Routes are defined in
app/config/routes.php. - If you want to change file paths, use
app/core/constants.php. - Your controller should extend
AbstractControllerclass. - Only CSS and JS files should be located in the public directory.
- If you like to exchange a basic package, have a look at
app/config/dependencies.phpand the service classes inapp/services.
Folder structure is pretty self explaining:
-- app
| |-- core
| |-- config
| |-- middlewares
| |-- utils
| |-- models
| |-- logs
| |-- controllers
| |-- views
| | |-- templates
| |-- services
|-- public
| |-- css
| |-- js
|-- db
|-- vendor
Disclaimer & License
This code should help you build your own solution. It's not mature and fully tested software. You use anything at your own risk. Have fun with it.
No-Framework is released under the MIT licence.
Finally
Now go and build something and make people happy!
unicate/no-framework 适用场景与选型建议
unicate/no-framework 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 12 次下载、GitHub Stars 达 0, 最近一次更新时间为 2020 年 06 月 06 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 unicate/no-framework 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 unicate/no-framework 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 12
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-06-06