为什么要使用框架?说服我,我应该弄清楚Zend Framework并使用它 [英] Why use frameworks? Convince me I should figure out Zend Framework and use it

查看:46
本文介绍了为什么要使用框架?说服我,我应该弄清楚Zend Framework并使用它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
为什么要在PHP中使用框架?

首先,我只能说我一直都是自己编程.我主要使用php.那么,您能解释一下为什么我应该学习Zend Framework或其他框架吗?为什么只是不自己编写纯代码?

To begin with, I just can say that I have always been programming by my own. I use php mostly. So, can you explain me why I should learn Zend Framework or other framework? Why just don't write a pure code by own?

推荐答案

我是最近向Zend Framework转换的人,我可以诚实地说,经过大约第一周的时间,我一直在弄清楚我该放在哪里.使用ZF可以比以前更快地进行开发.我有成千上万行为会话管理,表单验证编写的php代码,您可以命名.在我决定重用该代码的情况下,扩展所有基类非常容易.

I am a recent convert to Zend Framework and I can honestly say that after the first week or so of trudging around to figure out where to put what that I am able to develop much quicker using ZF than I was previously. I have thousands of lines of php code that I wrote for session management, form validation, you name it. In the cases where I decided to reuse that code it has been very easy to extend all the base classes.

重复,平凡的任务,数据库处理和查询,您讨厌的东西-它已经为您完成,您不必每次都做.

The repetitive, mundane tasks, the database handling and queries, the stuff you hate- it's already done for you, you don't have to do it every time all the time any more.

我是这样看的:即使您或我个人比开发该框架的每个人都更聪明和更好,但他们比我们拥有更多的集体才能.他们能够提出我们可能从未想到的想法,测试和极端案例,尤其是在安全方面.我没有使用Symfony或其他许多PHP框架的经验,但是我可以说在我的项目中使用ZF已经为我节省了很多时间.

I look at it like this: Even if you or I are personally smarter and better than every single person that is developing the framework, they have more collective talent than we ever can. They are able to formulate ideas, tests, and corner cases that we may never think of- especially on the safety front. I have no experience with Symfony or a lot of other PHP frameworks, but I can say that using ZF in my projects is already saving me a LOT of time.

这篇关于为什么要使用框架?说服我,我应该弄清楚Zend Framework并使用它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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