如果使用Zend Framework,那么在PHP中开发效率会高多少?

时间:2022-10-10 18:24:55

I haven't determined to learn about zend framework,

我还没决定学习zend框架,

so your advice is important for me to make a final decision!

所以你的建议对我做出最终决定很重要!

6 个解决方案

#1


It really depends on what you're developing. There is no rule that states that using a framework is necessarily more productive.

这取决于你正在开发什么。没有规则规定使用框架必然会更有成效。

You would be better off talking about the type of application you're expecting to develop, and whether or not you could realize productivity gains by incorporating a framework (such as Zend).

您最好谈论您期望开发的应用程序类型,以及是否可以通过合并框架(例如Zend)来实现生产力提升。

#2


Due to its complexity and OO structure a framework like Zend Framework can never be as fast as a lightweight framework or even procedural code. It really depends on what you want to do. I prefer the maintainability, clearness and all the built-in features and helpers of such a framework.

由于其复杂性和OO结构,像Zend Framework这样的框架永远不会像轻量级框架甚至程序代码那样快。这真的取决于你想做什么。我更喜欢这种框架的可维护性,清晰性和所有内置功能和帮助程序。

What I often miss is the fact, that most websites could increase their speed enormously by optimizing their frontend, not their backend. Have a look at this superb list about speeding up your frontend @ yahoo.com:

我经常想念的是,大多数网站都可以通过优化他们的前端而不是他们的后端来极大地提高他们的速度。看看这个关于加速你的前端@ yahoo.com的精彩列表:

  • Minimize HTTP Requests
  • 最小化HTTP请求

  • Use a Content Delivery Network
  • 使用内容分发网络

  • Add an Expires or a Cache-Control Header
  • 添加Expires或Cache-Control标头

  • Gzip Components
  • Put Stylesheets at the Top
  • 将样式表放在顶部

  • Put Scripts at the Bottom
  • 把脚本放在底部

  • Avoid CSS Expressions
  • 避免使用CSS表达式

  • Make JavaScript and CSS External
  • 使JavaScript和CSS外部

  • Reduce DNS Lookups
  • 减少DNS查找

  • Minify JavaScript and CSS
  • 缩小JavaScript和CSS

  • Avoid Redirects
  • Remove Duplicate Scripts
  • 删除重复的脚本

  • Configure ETags
  • Make Ajax Cacheable
  • 使Ajax可以缓存

  • Flush the Buffer Early
  • 尽早冲洗缓冲液

  • Use GET for AJAX Requests
  • 使用GET进行AJAX请求

  • Post-load Components
  • Preload Components
  • Reduce the Number of DOM Elements
  • 减少DOM元素的数量

  • Split Components Across Domains
  • 跨域拆分组件

  • Minimize the Number of iframes
  • 最小化iframe的数量

  • No 404s
  • Reduce Cookie Size
  • 减少Cookie大小

  • Use Cookie-free Domains for Components
  • 对组件使用无Cookie域

  • Minimize DOM Access
  • 最小化DOM访问

  • Develop Smart Event Handlers
  • 开发智能事件处理程序

  • Choose < link> over @import
  • 在@import上选择

  • Avoid Filters
  • Optimize Images
  • Optimize CSS Sprites
  • 优化CSS Sprites

  • Don't Scale Images in HTML
  • 不要在HTML中缩放图像

  • Make favicon.ico Small and Cacheable
  • 使favicon.ico小巧且可缓存

  • Keep Components under 25K
  • 保持组件低于25K

  • Pack Components into a Multipart Document
  • 将组件打包到多部分文档中

#3


Please remember, if you want to use Zend Framework to do anything efficiently you will need to learn how to use it first.

请记住,如果您想使用Zend Framework有效地执行任何操作,您需要首先学习如何使用它。

Time Efficiency: Zend has a large learning curve. So in terms of time, it is not so efficient if you are on a deadline. But after you learn it it makes it easier to code applications in PHP. It makes coding easier (dare I say). And that can be good or bad...

时间效率:Zend有很大的学习曲线。所以就时间而言,如果你在截止日期前效率不高。但是在学习之后,它可以更轻松地在PHP中编写应用程序。它使编码更容易(我敢说)。这可能是好事还是坏事......

Ease of Maintenance: This is one of the more major advantages of using Zend Framework. But once again, you have to learn it.

易于维护:这是使用Zend Framework的主要优势之一。但是,你必须再次学习它。

Loading Speed: Even though people say that it will make your applications run slower, It only loads parts of the library that you need. It may make it a bit slower, but most think that it is a good trade off for ease of maintenance and coding time.

加载速度:即使人们说它会让你的应用程序运行得更慢,它只会加载你需要的部分库。它可能会让它慢一点,但大多数人认为这是一个很好的折衷,易于维护和编码时间。

Overall, I have researched Zend and it is hard to get a full grasp on it without some mentor. If you need a better idea of how PHP Frameworks run, check out CodeIgniter. They have some good Video Tutorials on their site.

总的来说,我研究过Zend,没有一些导师就很难全面掌握它。如果您需要更好地了解PHP框架的运行方式,请查看CodeIgniter。他们的网站上有一些很好的视频教程。

Best of Luck!!

祝你好运!

#4


Pros:

  • Better code
  • maintainable
  • adapters for everything
  • 一切适配器

  • full-stack framework
  • suitable for any application
  • 适合任何应用

  • big community

Cons:

  • Slower without accelerator (min. 0.6secs)
  • 没有加速器的速度较慢(最小0.6秒)

  • long learning curve
  • 漫长的学习曲线

  • terrible performance when not used properly (like 2secs/req)
  • 不正确使用时性能差(如2secs / req)

  • no good to start just before project deadline :P
  • 在项目截止日期之前没有好处:P

#5


I'm sure in most cases it will be several times more efficient if you'll use any MVC framework.

我敢肯定,在大多数情况下,如果您使用任何MVC框架,效率会提高几倍。

#6


For any website that is bigger than just a few pages, and that is expected to grow in the future (and if there's a client involved it will), you'll be better off using a framework.

对于任何大于几页的网站,并且预计将来会增长(如果有客户参与其中),您最好使用框架。

There is definitely a learning curve with the Zend Framework, but if you are familiar with the MVC controller pattern in other languages it won't be too difficult to start working with it.

Zend Framework肯定存在学习曲线,但如果您熟悉其他语言的MVC控制器模式,那么开始使用它就不会太困难了。

Zend Framework also comes with a very nice Dojo (JavaScript Framework) integration, which makes handling Ajax a lot easier.

Zend Framework还带有一个非常好的Dojo(JavaScript Framework)集成,这使得处理Ajax变得更加容易。

On the other hand, it you don't know what the Model, the View, and the Controller are, you should definitely get familiar with these concepts (and maybe create a small sample projects in which you do your custom implementation of each component) before you jump into ZF.

另一方面,你不知道模型,视图和控制器是什么,你一定要熟悉这些概念(并且可能创建一个小样本项目,在其中你可以自己实现每个组件的实现)在你跳进ZF之前。

#1


It really depends on what you're developing. There is no rule that states that using a framework is necessarily more productive.

这取决于你正在开发什么。没有规则规定使用框架必然会更有成效。

You would be better off talking about the type of application you're expecting to develop, and whether or not you could realize productivity gains by incorporating a framework (such as Zend).

您最好谈论您期望开发的应用程序类型,以及是否可以通过合并框架(例如Zend)来实现生产力提升。

#2


Due to its complexity and OO structure a framework like Zend Framework can never be as fast as a lightweight framework or even procedural code. It really depends on what you want to do. I prefer the maintainability, clearness and all the built-in features and helpers of such a framework.

由于其复杂性和OO结构,像Zend Framework这样的框架永远不会像轻量级框架甚至程序代码那样快。这真的取决于你想做什么。我更喜欢这种框架的可维护性,清晰性和所有内置功能和帮助程序。

What I often miss is the fact, that most websites could increase their speed enormously by optimizing their frontend, not their backend. Have a look at this superb list about speeding up your frontend @ yahoo.com:

我经常想念的是,大多数网站都可以通过优化他们的前端而不是他们的后端来极大地提高他们的速度。看看这个关于加速你的前端@ yahoo.com的精彩列表:

  • Minimize HTTP Requests
  • 最小化HTTP请求

  • Use a Content Delivery Network
  • 使用内容分发网络

  • Add an Expires or a Cache-Control Header
  • 添加Expires或Cache-Control标头

  • Gzip Components
  • Put Stylesheets at the Top
  • 将样式表放在顶部

  • Put Scripts at the Bottom
  • 把脚本放在底部

  • Avoid CSS Expressions
  • 避免使用CSS表达式

  • Make JavaScript and CSS External
  • 使JavaScript和CSS外部

  • Reduce DNS Lookups
  • 减少DNS查找

  • Minify JavaScript and CSS
  • 缩小JavaScript和CSS

  • Avoid Redirects
  • Remove Duplicate Scripts
  • 删除重复的脚本

  • Configure ETags
  • Make Ajax Cacheable
  • 使Ajax可以缓存

  • Flush the Buffer Early
  • 尽早冲洗缓冲液

  • Use GET for AJAX Requests
  • 使用GET进行AJAX请求

  • Post-load Components
  • Preload Components
  • Reduce the Number of DOM Elements
  • 减少DOM元素的数量

  • Split Components Across Domains
  • 跨域拆分组件

  • Minimize the Number of iframes
  • 最小化iframe的数量

  • No 404s
  • Reduce Cookie Size
  • 减少Cookie大小

  • Use Cookie-free Domains for Components
  • 对组件使用无Cookie域

  • Minimize DOM Access
  • 最小化DOM访问

  • Develop Smart Event Handlers
  • 开发智能事件处理程序

  • Choose < link> over @import
  • 在@import上选择

  • Avoid Filters
  • Optimize Images
  • Optimize CSS Sprites
  • 优化CSS Sprites

  • Don't Scale Images in HTML
  • 不要在HTML中缩放图像

  • Make favicon.ico Small and Cacheable
  • 使favicon.ico小巧且可缓存

  • Keep Components under 25K
  • 保持组件低于25K

  • Pack Components into a Multipart Document
  • 将组件打包到多部分文档中

#3


Please remember, if you want to use Zend Framework to do anything efficiently you will need to learn how to use it first.

请记住,如果您想使用Zend Framework有效地执行任何操作,您需要首先学习如何使用它。

Time Efficiency: Zend has a large learning curve. So in terms of time, it is not so efficient if you are on a deadline. But after you learn it it makes it easier to code applications in PHP. It makes coding easier (dare I say). And that can be good or bad...

时间效率:Zend有很大的学习曲线。所以就时间而言,如果你在截止日期前效率不高。但是在学习之后,它可以更轻松地在PHP中编写应用程序。它使编码更容易(我敢说)。这可能是好事还是坏事......

Ease of Maintenance: This is one of the more major advantages of using Zend Framework. But once again, you have to learn it.

易于维护:这是使用Zend Framework的主要优势之一。但是,你必须再次学习它。

Loading Speed: Even though people say that it will make your applications run slower, It only loads parts of the library that you need. It may make it a bit slower, but most think that it is a good trade off for ease of maintenance and coding time.

加载速度:即使人们说它会让你的应用程序运行得更慢,它只会加载你需要的部分库。它可能会让它慢一点,但大多数人认为这是一个很好的折衷,易于维护和编码时间。

Overall, I have researched Zend and it is hard to get a full grasp on it without some mentor. If you need a better idea of how PHP Frameworks run, check out CodeIgniter. They have some good Video Tutorials on their site.

总的来说,我研究过Zend,没有一些导师就很难全面掌握它。如果您需要更好地了解PHP框架的运行方式,请查看CodeIgniter。他们的网站上有一些很好的视频教程。

Best of Luck!!

祝你好运!

#4


Pros:

  • Better code
  • maintainable
  • adapters for everything
  • 一切适配器

  • full-stack framework
  • suitable for any application
  • 适合任何应用

  • big community

Cons:

  • Slower without accelerator (min. 0.6secs)
  • 没有加速器的速度较慢(最小0.6秒)

  • long learning curve
  • 漫长的学习曲线

  • terrible performance when not used properly (like 2secs/req)
  • 不正确使用时性能差(如2secs / req)

  • no good to start just before project deadline :P
  • 在项目截止日期之前没有好处:P

#5


I'm sure in most cases it will be several times more efficient if you'll use any MVC framework.

我敢肯定,在大多数情况下,如果您使用任何MVC框架,效率会提高几倍。

#6


For any website that is bigger than just a few pages, and that is expected to grow in the future (and if there's a client involved it will), you'll be better off using a framework.

对于任何大于几页的网站,并且预计将来会增长(如果有客户参与其中),您最好使用框架。

There is definitely a learning curve with the Zend Framework, but if you are familiar with the MVC controller pattern in other languages it won't be too difficult to start working with it.

Zend Framework肯定存在学习曲线,但如果您熟悉其他语言的MVC控制器模式,那么开始使用它就不会太困难了。

Zend Framework also comes with a very nice Dojo (JavaScript Framework) integration, which makes handling Ajax a lot easier.

Zend Framework还带有一个非常好的Dojo(JavaScript Framework)集成,这使得处理Ajax变得更加容易。

On the other hand, it you don't know what the Model, the View, and the Controller are, you should definitely get familiar with these concepts (and maybe create a small sample projects in which you do your custom implementation of each component) before you jump into ZF.

另一方面,你不知道模型,视图和控制器是什么,你一定要熟悉这些概念(并且可能创建一个小样本项目,在其中你可以自己实现每个组件的实现)在你跳进ZF之前。