moss/framework
最新稳定版本:v1.2.1
Composer 安装命令:
composer require moss/framework
包简介
The PHP micro-framework
README 文档
README
For licence details see LICENCE.md Documentation is available on Wiki : https://github.com/mossphp/moss-framework/wiki
About
Welcome to Moss a micro framework, that provides basic tools for building simple web pages or APIs it can also handle something bigger.
So what's the difference between other micro-frameworks?
Moss isn't some kind of cropped full stack framework, that was cut down to fit into micro segment.
Moss was developed as a solution with small footprint, that is easy to extend and with as little dependencies as possible - and still simple to use.
Moss also wants to be fashionable and follows trends: dependency injection, event dispatching, request-response objects, clean code.
Not because its fancy to be trendy, but because it makes sense and code benefits from them.
Features
- fully grown
Router(not powerful but working :) ), RequestandResponseobjects (got http auth, and easy header management),- flash messages
- dependency injection container
- event dispatcher with
AOP - closure and class controllers (that can be organized into bundles with fluent directory structure),
- simple view that can be easily extended with bridge to use
Twig(as package in composer) - and clean code
- and more
Documentation
Documentation is available on Wiki : https://github.com/mossphp/moss-framework/wiki
Quickstart
Add to composer.json:
{
"require": {
"moss/framework": "*"
}
}
Or from console
php composer.phar require moss/framework
Then create entry file, eg ./web/index.php containing:
<?php use Moss\Config\Config; use Moss\Container\ContainerInterface; use Moss\Http\Response\Response; use Moss\Kernel\App; require __DIR__ . '/vendor/autoload.php'; $app = new App(new Config()); $app->route('main', '/', function () { return new Response('Hello World'); }); $app->run()->send();
Or download simple sample app from github
Contribute
If you want to submit fix or some other enhancements, feel free to do so. Whenever you find a bug it would be nice if you submit it. And if you submit fix - this would be truly amazing!
How to Contribute
- Fork;
- Create a new branch for each feature/improvement/issue;
- Send a pull request from branch
Style Guide
All pull requests must adhere to the PSR-2 standard. All pull requests should be accompanied by passing PHPUnit tests. Add phpDocs to all methods, including at least a description, all @param, @return and @throws declaration
moss/framework 适用场景与选型建议
moss/framework 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 489 次下载、GitHub Stars 达 25, 最近一次更新时间为 2014 年 11 月 30 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「framework」 「microframework」 「mossphp」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 moss/framework 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 moss/framework 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 moss/framework 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
PHP Framework HLEB2 is the foundation of the web application. Provides ease of development and application performance.
A lightweight, secure-by-default PHP microframework built on Slim – providing Laravel-like features (ORM, authentication, migrations, caching) without the bloat. Perfect for building REST APIs and small-to-medium PHP applications.
moss-twig bridge
Reducido núcleo de trabajo para PHP
A Slim Framework MVC skeleton application for rapid development
A TidyPHP is a micro Framework for build fast and tidy web applications
统计信息
- 总下载量: 489
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 25
- 点击次数: 22
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-11-30