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

查看:41
本文介绍了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 - (答案基于昨天的个人实验)

FAQ - (Answers based on personal experiment done yesterday)

Zend Framework 2 与 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 - phar 很快它就可能超越任何其他框架.新概念: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.

约定

ZF1 中的类名是 Zend_Db_Table ,用于 Zend/Db/Table.php 中的类,而在 ZF2 中,它是类 MyAuthAdapter .说的够多了.

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

社区

ZF1 得到 Zend Technologies(以及其他一些未命名的)的支持.ZF2 拥有卓越的支持者,包括谷歌和微软.来源在这里

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

速度

执行Hello World!"的时间增加了大约 20 倍.在 ZF2 中.我不是在这里评判.我在这里可能是错的.自己动手做.

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天全站免登陆