DooPHP

icyleaf 3 年之前

Doo framework is one of the fastest, if not the fastest PHP framework available. It enables developers at all levels to rapidly develop robust web 2.0 applications

第一次打开它的首页就发现,好华丽,文档以及相关教程都整理的很好,比较全面。尤为称赞的是它的一些结构视图,做的很漂亮

刚开始一上来就开始读它的源代码,第一感觉,怎么这么像 Kohana,再深入看了又发现怎么这么像 CodeIgniter,心里纳闷呢,难道现在的 PHP 框架都走这样的 MVC 路线么?

今天去 Kohana 官方论坛瞅了一看,发现有人讨论 DooPHP,看看发现其作者在其中。原来 DooPHP 的作者之前用过 CodeIgniter,后来由于某些原因(好像还有些讨厌)改换了 Symfony,那为什么DooPHP的代码结构要和 CI 相似,这根本感觉就像是 CI 的一个分支...

然后作者感觉在 Kohana 遭到“鄙视”了,随后又做了一个DooPHP和Kohana的基准测试,而且也是翻倍的超过 Kohana。

“我记得老廖在某论坛说过,速度最快的并不代表是最好的”,真的是这样么?我继续学习中....

网站:http://doophp.com/
几个主流框架的基准测试:http://doophp.com/benchmark
DooPHP vs Kohana 的基准测试:http://doophp.com/blog/article/doophp-kohana-benchmark

汗。。并不是遭到“鄙视”.是kohana群里有人要求不就弄了一个测试。
Doophp目录结构和CI相似吗?我倒是参考Yii的。而且和CI代码完全是两码事 !
CI我用的时候是v1.3早忘了它长什么样呵呵。MVC 都是这样叫的啊 controller,model, view 为什么要刻意去求个与众不同的名字?

我和CI的CTO谈过话,他倒不觉得和CI 像哦。
http://twitter.com/el_derek/status/2822732503

DooPHP 和其他框架有所不同的是,它是一个注重KISS 的框架,越简单明了越好。并不是要走强大路线,Symfony有很多功能都是我个人很少用到滴呵呵

http://code.google.com/p/doophp

囧,DooPHP 的开发者是中国人?!

哈,我看到有些人对 DooPHP 不太友好,尤其是现 Kohana v2.x 版本的主力开发者 zombor 的回复,所以我才会这样说的。

对于 CI 我也不熟悉,看过少量的源代码而已,只是感觉在文件编码,风格以及结构上面都是很像的,对此我还是认为 Kohana 的代码是优雅的

Symfony 更是让我看的云里雾里,嗯,我讨厌庞大的框架!尤其是 ZF!

KISS,DRY,这是 coding 的必然之路,继续保持下去!

哈哈谢谢,还得翻译中文文档

我很坚挺的上来冒个泡,icy又地雷了= =
我也吃惊了下,激动了下,DooPHP开发是中国人 -''-
好吧,我继续劳动,学习,游戏去了

@icy freelancer!
@darkredz 就是freelanceer吧?

hehe 是滴freelancer

哦?可能是个会中文的老外....呵呵

我看不懂英文,只看得懂代码,英文手册是用不上了,现在90%以上的开发文档都是英文的,这也在一定程度上束缚了国人的手脚。举例说:最近在看RTMP协议,文档看不懂只能看代码,很吃力嘎嘎。

我在我的机器上测试了一下doophp和kohana3,看起来doophp也不是那么快

hello world 测试

D:\Program Files\Apache Software Foundation\Apache2.2\bin>ab -t 30 -c 10 http://
test.com/doo/app
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/


Server Software:        Apache/2.2.14
Server Hostname:        test.com
Server Port:            80


Document Path:          /doo/app
Document Length:        232 bytes


Concurrency Level:      10
Time taken for tests:   20.250 seconds
Complete requests:      50000
Failed requests:        0
Write errors:           0
Non-2xx responses:      50000
Total transferred:      23250000 bytes
HTML transferred:       11600000 bytes
Requests per second:    2469.14 [#/sec] (mean)
Time per request:       4.050 [ms] (mean)
Time per request:       0.405 [ms] (mean, across all concurrent requests)
Transfer rate:          1121.24 [Kbytes/sec] received


Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   1.6      0      16
Processing:     0    4   6.7      0      16
Waiting:        0    4   6.5      0      16
Total:          0    4   6.8      0      16


Percentage of the requests served within a certain time (ms)
  50%      0
  66%      0
  75%     16
  80%     16
  90%     16
  95%     16
  98%     16
  99%     16
 100%     16 (longest request)


D:\Program Files\Apache Software Foundation\Apache2.2\bin>ab -t 30 -c 10 http://
test.com/kohana
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/


Server Software:        Apache/2.2.14
Server Hostname:        test.com
Server Port:            80


Document Path:          /kohana
Document Length:        231 bytes


Concurrency Level:      10
Time taken for tests:   20.859 seconds
Complete requests:      50000
Failed requests:        0
Write errors:           0
Non-2xx responses:      50000
Total transferred:      23150000 bytes
HTML transferred:       11550000 bytes
Requests per second:    2397.00 [#/sec] (mean)
Time per request:       4.172 [ms] (mean)
Time per request:       0.417 [ms] (mean, across all concurrent requests)
Transfer rate:          1083.80 [Kbytes/sec] received


Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   1.6      0      16
Processing:     0    4   7.1      0     188
Waiting:        0    4   6.9      0     188
Total:          0    4   7.2      0     188


Percentage of the requests served within a certain time (ms)
  50%      0
  66%      0
  75%     16
  80%     16
  90%     16
  95%     16
  98%     16
  99%     16
 100%    188 (longest request)

数据库查询测试
(好像doophp的链接用的PDO,而kohana3不需要PDO,另外,kohana3不是使用orm,是直接使用db)

D:\Program Files\Apache Software Foundation\Apache2.2\bin>ab -t 30 -c 10 http://
test.com/doo/app
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/


Benchmarking test.com (be patient)
Completed 5000 requests
Completed 10000 requests
Completed 15000 requests
Completed 20000 requests
Completed 25000 requests
Completed 30000 requests
Completed 35000 requests
Completed 40000 requests
Completed 45000 requests
Completed 50000 requests
Finished 50000 requests


Server Software:        Apache/2.2.14
Server Hostname:        test.com
Server Port:            80


Document Path:          /doo/app
Document Length:        232 bytes


Concurrency Level:      10
Time taken for tests:   19.328 seconds
Complete requests:      50000
Failed requests:        0
Write errors:           0
Non-2xx responses:      50000
Total transferred:      23250000 bytes
HTML transferred:       11600000 bytes
Requests per second:    2586.90 [#/sec] (mean)
Time per request:       3.866 [ms] (mean)
Time per request:       0.387 [ms] (mean, across all concurrent requests)
Transfer rate:          1174.72 [Kbytes/sec] received


Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   1.6      0      31
Processing:     0    4   6.6      0      31
Waiting:        0    3   6.3      0      31
Total:          0    4   6.7      0      31


Percentage of the requests served within a certain time (ms)
  50%      0
  66%      0
  75%      0
  80%     16
  90%     16
  95%     16
  98%     16
  99%     16
 100%     31 (longest request)


D:\Program Files\Apache Software Foundation\Apache2.2\bin>ab -t 30 -c 10 http://
test.com/kohana
This is ApacheBench, Version 2.3 <$Revision: 655654 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/


Benchmarking test.com (be patient)
Completed 5000 requests
Completed 10000 requests
Completed 15000 requests
Completed 20000 requests
Completed 25000 requests
Completed 30000 requests
Completed 35000 requests
Completed 40000 requests
Completed 45000 requests
Completed 50000 requests
Finished 50000 requests


Server Software:        Apache/2.2.14
Server Hostname:        test.com
Server Port:            80


Document Path:          /kohana
Document Length:        231 bytes


Concurrency Level:      10
Time taken for tests:   18.063 seconds
Complete requests:      50000
Failed requests:        0
Write errors:           0
Non-2xx responses:      50000
Total transferred:      23150000 bytes
HTML transferred:       11550000 bytes
Requests per second:    2768.17 [#/sec] (mean)
Time per request:       3.612 [ms] (mean)
Time per request:       0.361 [ms] (mean, across all concurrent requests)
Transfer rate:          1251.62 [Kbytes/sec] received


Connection Times (ms)
              min  mean[+/-sd] median   max
Connect:        0    0   1.5      0      16
Processing:     0    3   6.4      0      16
Waiting:        0    3   6.2      0      16
Total:          0    4   6.5      0      16


Percentage of the requests served within a certain time (ms)
  50%      0
  66%      0
  75%      0
  80%     16
  90%     16
  95%     16
  98%     16
  99%     16
 100%     16 (longest request)

从结果看,doophp的速度比kohana稍微快点,但是doophp使用的是默认设置,估计模块不多,所以速度快点,而kohana3载入了所有自带的模块,数据库查询使用(DB::select('*')->from('food')->execute())而不是orm,从结果看kohana3的数据库查询效率还可以.

测试环境
CPU:E5300
MEM:1G
windows XP
apache 2.2.14
php 5.2.2
mysql 5.1

@oldha
帮你稍微编辑了下
DooPHP 我也是大概看了下,没有做细研究才出来最初的发帖的笑话...
我目前是跟定 Kohana v3 了

@icyleaf 跟定是有多定?原本还想垃你入伙呢。。。

@沧蓝
呃,你入哪个团伙了....

和aligo一起在筹备开发PHP 5.3的框架…… 有兴趣不?

@沧蓝
框架复框架,框架何其多...

PHP 5.3 的框架,很赶时髦啊,怎么突然自己搞框架了?

我本身是一直“妄想”能够开发一款自己的框架。只是如你所说,框架多如牦牛,所以一直没有进行。aligo的提议起到了推波助澜……

如果你有兴趣的话我们可以给你说说一些我们的思路。既然要做,就做有特色的框架,不会千篇一律。

@沧蓝
特色的框架,我一定支持!
不过最近项目太多,我自己都快手忙脚乱的了,可否先说说思路,我也学习学习

@沧蓝
沧蓝大大给个地址..我也想看看呢..-_-

@Natsuki 他现在已经玩 ror 了,不知道是否还在弄自己的 php 框架

作者不就是 darkredz 吗?
"
Leng Sheng Hong (aka. darkredz), the creator of DooPHP, is a freelance web developer & sometimes a designer who specialize in PHP, Flash, Flex, MySQL, HTML and Ajax with jQuery development.

He is a motivated self-taught developer who started playing with ActionScript and PHP at the age of 15. Since then, he had been playing around with VB, C#, Java, FMS, C, C++, Python (not the snake!), linux and web servers. Practically speaking, he is a backend to frontend hacker.

After discovering the need of a faster & easier framework, the creator even gave up his job to create the framework (yea, the prev companies owe him quite some $$$). He is currently available for work on a freelance basis.
"
向往这样的生活~~

哦?难道你认识?

发表讨论

在回复之前你需要先进行登录
记住我的登录状态 (忘记密码)