我应该使用框架还是编写自己的 MVC?

我有一个项目目前到处都是,我正在考虑把它做成 MVC.

I have a project that is currently all over the place and i'm thinking of making it MVC.

问题是系统目前正在使用中,我无法更改界面(在框架中:s)此外,我还需要自己处理某些事情,例如密码生成、登录和用户级别.

The problem is that the system is currently being used and I can not change the interface (It's in frames :s) Also there are certain things that I will need to handle myself such as password generation, login and user levels.

我已经有了 MVC 的模型方面,所以我想知道是否值得使用像 Zend Framework 或 CakePHP 这样的框架,或者只是编写我自己的视图和控制器来解决这个问题?

I already have the model side down of the MVC so I am wondering is it worth using a framework like Zend Framework or CakePHP or just to code my own View and Controllers to work around this problem?

我将不得不慢慢地工作,如果我使用现成的框架之一,我不确定我是否能够做到这一点.

I am going to have to work this in slowly and I'm not sure if i will be able to do that if I use one of the ready made frameworks.

推荐答案

通常我会害怕地退缩并建议不要将另一个 Web MVC 框架引入世界,但公平地注意到我们的主持人 Joel 和 Jeff 有不同的意见关于此事:

Normally I would recoil in horror and advise against bringing yet another web MVC framework into the world, but it's fair to note that our hosts Joel and Jeff have another opinion on the matter:

来自乔尔:为重新发明轮子辩护来自杰夫:不要重新发明轮子

最后一个想法:如果是一个人的项目,那么这个选择只会影响你自己.如果涉及到一个开发长寿命产品的团队,我的抵抗力会飙升.如果你自己动手,你可能会对团队和客户造成伤害.

One last thought: If it's a one-person project, then you only affect yourself with this choice. My resistance would spike up if a team developing a long-lived product was involved. You may do a disservice to the team and the customer if you roll your own.

相关文章