Zend Framework 1与Zend Framework 2的性能 [英] Zend Framework 1 vs Zend Framework 2 performance

查看:101
本文介绍了Zend Framework 1与Zend Framework 2的性能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Zend Framework 2刚刚发布,并且Zend从现在开始仅18个月提供对ZF1的支持.我知道他们正在为ZF2开发新功能,然后他们将对其进行一些重大的速度改进,因为它比ZF1慢5倍.

Zend Framework 2 was just released and Zend offers support for ZF1 for only 18 months from now. I know they were working for new features in ZF2 and then they were going to do some major speed improvements to it since it was 5 times slower than ZF1.

我想从您进行的基准测试或测试中了解ZF2比ZF1慢多少,而不是纯粹的猜测.

I would like to know how slower is ZF2 than ZF1 from benchmarks or tests you did and not pure speculation.

我发现的最新基准测试是从2012年2月22日开始的,它得出的结论是ZF2比ZF1慢4倍.

The latest benchmark I found is from February 22, 2012 and it concludes that ZF2 is 4 times slower than ZF1.

链接此处

推荐答案

常见问题解答-(根据昨天进行的个人实验得出的答案)

FAQ - (Answers based on personal experiment done yesterday)

与Zend Framework 1相比,Zend Framework 2中发生了什么变化?

What has changed in Zend Framework 2 from Zend Framework 1?

建筑

ZF1基于MVC,ZF2基于MOVE.差异很大. MOVE =模型操作视图事件,MVC =模型视图控制器. 此处更多. Zend Framework 2使用100%面向对象的代码,并利用了PHP 5.3的大多数新功能,即名称空间,后期静态绑定,lambda函数和闭包. 来源

ZF1 is based on MVC , ZF2 is based on MOVE. Huge difference. MOVE = Model Operations Views Events , MVC = Models Views Controllers. More here. Zend Framework 2 uses 100% object-oriented code and utilises most of the new features of PHP 5.3, namely namespaces, late static binding, lambda functions and closures. source

安装大小

最新的ZF1文件约为30Mb,ZF2文件约为2.5Mb(压缩).

The latest ZF1 file is approx 30Mb and ZF2 is approx 2.5Mb (Zipped).

依赖性

ZF1是库的核心集,并且是非常松散耦合的体系结构(相对于其竞争对手/播放器-CakePHP). ZF1不需要太多的宝石"(就像在ruby中一样),但是可以对插件做得更好. ZF2要求您了解 composer -对Zend粉丝的依赖注入.

ZF1 is core set of libraries and very loosely coupled architecture (with respect to its competitor/player - CakePHP). ZF1 does not require much of 'gems' (as in ruby) but, can do better with plugins. ZF2 requires you to know about composer - phar and soon it may out-match any other framework. New concept : Dependency Injection for Zend fans.

证书

证书仅适用于ZF1,但是,尽管在线提供了培训材料,但有传言称他们会谈论ZF2证书.

Certification is available only for ZF1, however, there are rumours about their talks for ZF2 certs though training material is available online.

公约

classname是Zend/Db/Table.php中的类的Zend_Db_Table,而在ZF2中,它是My \ Auth \ Adapter类.够了.

classname in ZF1 was Zend_Db_Table for class in Zend/Db/Table.php whereas in ZF2, it is class My\Auth\Adapter . Enough said.

社区

ZF1由Zend Technologies(以及其他一些未命名的公司)支持. ZF2具有出色的支持者,包括Google和Microsoft. 此处来源

ZF1 was backed by Zend Technologies (and few other, unnamed). ZF2 has remarkable supporters including Google and Microsoft. Source here

速度

执行"Hello World!"花费的时间大约是20倍.在ZF2中.我不是在这里评判.我在这里可能是错的. DIY.

It took approx 20 times more time to execute "Hello World!" in ZF2. I am not judging here. I could be wrong here. DIY.

我应该选择哪个?

MVC已经存在了将近十年,如果您是其中的一员,他们对一种新的体系结构感到非常难过,那么,嘿! IT是您选择的"领域,紧跟趋势并自我更新!从此处启动ZF2.

MVC is been around since almost a decade and if you are one of them who are feeling sad for a new architecture altogether then hey! IT is 'your chosen' domain, keep up with the trends and update yourself! Start ZF2 from here.

这篇关于Zend Framework 1与Zend Framework 2的性能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆