HI,各位 2018 已接近尾声,在这个秋意满满的时节,小牛仔潜心研究 2 年的 QueryPHP 将迎来了自己第一个测试版本。

早在 2009 年 2 月份,我开始接触 PHP 这门语言,那个时候边学些边开发,并在 2009 年发布了第一个开源项目 DYHB.BLOG,这是一个未使用任何框架的独立博客。

从早年的原生 PHP 开发,最开始的 smart 模板引擎到今天 PHP7、Swoole、Composer、Laravel 等,整个 PHP 世界正发生着日新月异的变化。在这些年的成长过程中看过无数的 PHP 框架和各种轮子,心里总有一种造轮子冲动。

2016 年看了韩天峰老师的 《PHP7+Swoole 开发超高性能后台程序--韩天峰 @PHPCon2016》,心情非常激动,里面提到了一个超高性能组合。

我想要是可以做这样一套组合就好了,要做这样的一个基本的需要什么,分析一下。

PHP 7 我们不用操心,Redis 也不用操心,Swoole 不用操心(也要操心,需要连接起来)。最麻烦要数 phalcon 和 yaf,以及一个连接它们的框架。

经过折腾找到 zephir 终于解决了 phalcon 和 yaf 这块问题,终于我们找到了完整的方案。

We think the performance of PHP applications is very important and the development of pleasure also needs to be considered, and that's why we have developed the QueryPHP framework to achieve great ideals.

PHP 7 - We choose the lowest version of 7.1.3, because php7 has a unique advantage over the earlier version.

Leevel - We provides an optional c extension to takeover core components of the framework,such as ioc, log, cache.

Swoole - Enable PHP developers to write high-performance, scalable, concurrent TCP, UDP, Unix socket, HTTP, Websocket services in PHP programming language.

Redis - QueryPHP encapsulation a cache component, including files, redis and so on, so as to reduce the pressure of database.

其中 PHP 7 搞定了,Leevel 可选扩展框架实现也搞定了,Leevel 高性能 PHP 扩展开发框架,基于 zephir 的中国版 Min Phalcon。

Redis 搞定了,提供了通用缓存组件,包含 redis.

Swoole 还为搞定,做了一些还需要完善,最终在第一个版本拿下了,为了主框架发布,主要是百分之单元测试覆盖彻底占用了开发 swoole 部分的时间,对 swoole 的开发是我们的后续版本主打特性。

我们的愿景是 USE LEEVEL WITH SWOOLE DO BETTER,没有 swoole 部分愿景就不完美。

更新日志和主要特征

百分之百单元测试覆盖 (花了 8 个月时间只做一件事,编写单元测试一块一块重构,完整覆盖)

PHP 7 严格模式 (每一个 PHP 脚本都是 strict_types = 1 )

PHP 7 类型提示 (仅可能为每一个方法提供确定的参数类型和返回值类型)

依赖注入 (完整实现,关键 mvc、命令行脚本、事件监听器全部接入 IOC )

领域驱动设计 (在妖怪的 QeePHP  基础上保持创新,提供了 UntiOfWork、Repository、规约 Specification,getter setter Entity )

Leevel 可选扩展接管底层核心

支持 swoole,未来完善

更多功能 ...

开源中国首发

做为一个刚刚发布的框架还有很多不足,希望大家给予意见,如果你觉得不错,也可以给我们一个 star。

更多推荐

php framework specification,QueryPHP 1.0.0-alpha.1 发布,渐进式 PHP 常驻框架引擎