CodeIgniter has a learning curve but that curve is likely to be quicker than your custom framework. That's because CodeIgniter is well documented.
CodeIgniter is a fairly comprehensive library. Once you learn the framework, you can employ any of its libraries not only in the current project but in various other projects.
The work is already done for you. You may not even know that a XSS or CSRF exploit exists in your code because you haven't done a thorough security audit. But a community framework is under constant audit.
You can extend CodeIgniter to your own needs and still have custom functionality.
After using CodeIgniter for a sufficient period of time, you'll inevitably pick up some great programming practices and improve your overall knowledge since the framework employs many best practies.
It is likely that if you encounter a problem situation, someone else has already solved it. CodeIgniter also has a good community through which you could save yourself hours of debugging.
That said, CodeIgniter is not the only framework but I really do like that fact that with the newer release they have moved to PHP5. In general, open source frameworks are the way to go.
The details of the project would be very helpful, but in general frameworks are very helpful and speed up the work (not necessarily the application) significantly.
Consider the fact, that 'Custom PHP Framework' (whatever they think of) is... custom. That means it is not tested as eg. Zend Framework, it has not proven to be efficient and successful in thousands of projects, and it is probably something very simple (as large frameworks have been developed for years by big teams of developers plus the developers of companies that use them).
Of course coding PHP can be quite good option, when you really need speed (of the application), have time to build it and money to pay the developers that will be developing it quite extensively (because they will be implementing many features that come with almost every PHP framework). But you have to be sure, that you really need to take that non-standard approach (as 'non-standard' I mean not using some reliable framework).
It is up to you. If you can give some details about the application that has to be created, the answers may be more relevant.
Non-Business projects: Standard PHP. Business projects: CI.
Trying to build you own Framework is very educative and will help you a lot; it will also let you create a framework that fit your needs instead of a general one. But that could be done only if you are managing to create a non Business projects because Business ones requires stability that you may not get from a home-made framework. By creating your own framework you might loose a lot of time (which is expensive when working with business stuff) and money for nothing.
在我看来,那些开发人员应该尝试编写一些规范。他们需要实施的内容非常详细的规范。然后,他们应该计算编写此类功能所需的时间,以便可以将这项工作与 CI 中已包含的元素进行比较,并决定哪个选项在编码时间、学习时间以及测试时间方面更可行。
I have some experience with writing my own CMS, and I must admit, that this was very educating, but from financial point of view, totally uneconomic decision.
In my opinion, those developers should try to write some specification. Very detailed specification of what they need to implement. Then they should calculate time needed to code such functionality so they can compare this work to elements already included in CI and decide which option is more viable in terms of time to code, time to learn, and of course time to test.
然而,自定义框架可能会变成难以忍受的噩梦。 CI 的优势在于社区规模小和文档详尽。一旦您使用它推出了一些项目,我确信推出时间将与自定义框架一样快。
If they don't mind teaching their custom framework, then it's probably the best fit (especially if the guy who wrote it is still around).
However, custom frameworks can turn into unsupportable nightmares. CI has the advantage of a small community and thorough documentation. Once you roll out a few projects with it, I'm sure the roll-out time will be as fast as the custom framework.
CI 使我们能够更快地开发并标准化了我们的项目。该架构还允许我们轻松扩展,而不必担心“损坏”核心框架。
IMO 中 CI 是前进的方向
We ditched our own custom framework in favour of CI. Financially it was a tough decision as weve spent 1000's of hours on it and have a lot of projects running on it.
CI has allowed us to develop faster and has standardised our projects. The architecture also allows us to extend easily without concerns about 'damaging' the core framework.
Disadvantage: also a bit slower for the team to roll out the project.
This is generally untrue, and infact, it's probably quite the contrary in many cases. Personally, I am able to crank out projects much faster using a framework. I haven't used MVC in a team environment but I would imagine that by dividing work into Models, Views and Controllers workflow seperations would promote development speed.
What are you building? This is the crucial question.
If you're building a dynamic web application, frameworks will save you hours and hours of work because you won't have to reinvent the wheel over and over again. If the point of your project is basic, then indeed... frameworks add too much overhead. I'd say, as a general rule, if you're project will require greater than 5 .php files, then start using a framework, because that's what it's purpose is - to separate the logic.
Use CodeIgniter or another framework for larger projects where you suspect your code will start to get disorganised. The MVC pattern prevents this disorganisation.
It sounds as if you've never used a framework before. The first step in making decisions on whether or not a framework will suit the task is to get familiar with one. You'll then be in a much better position to make this call. I do not recommend you write your own right away; you will gain a lot of insight after playing around with CI, Cake, or Zend.
发布评论
评论(7)
也就是说,CodeIgniter 并不是唯一的框架,但我真的很喜欢这样一个事实:随着新版本的发布,它们已经迁移到 PHP5。一般来说,开源框架是正确的选择。
That said, CodeIgniter is not the only framework but I really do like that fact that with the newer release they have moved to PHP5. In general, open source frameworks are the way to go.
我强烈不同意。
项目的详细信息会非常有帮助,但总的来说框架非常有帮助,并且可以显着加快工作(不一定是应用程序)。
考虑一下这样一个事实,“自定义 PHP 框架”(无论他们怎么想)是......自定义的。这意味着它没有经过测试,例如。 Zend Framework,它尚未在数千个项目中被证明是高效和成功的,而且它可能非常简单(因为大型框架已经由大型开发团队以及使用它们的公司的开发人员开发了多年)。
当然,当您确实需要(应用程序的)速度时,编写 PHP 代码可能是一个很好的选择,有时间来构建它,并且有钱支付将要广泛开发它的开发人员(因为他们将实现许多功能)几乎所有 PHP 框架)。但您必须确定,您确实需要采用非标准方法(“非标准”是指不使用某些可靠的框架)。
这取决于你。如果您可以提供有关必须创建的应用程序的一些详细信息,答案可能会更相关。
I would strongly disagree.
The details of the project would be very helpful, but in general frameworks are very helpful and speed up the work (not necessarily the application) significantly.
Consider the fact, that 'Custom PHP Framework' (whatever they think of) is... custom. That means it is not tested as eg. Zend Framework, it has not proven to be efficient and successful in thousands of projects, and it is probably something very simple (as large frameworks have been developed for years by big teams of developers plus the developers of companies that use them).
Of course coding PHP can be quite good option, when you really need speed (of the application), have time to build it and money to pay the developers that will be developing it quite extensively (because they will be implementing many features that come with almost every PHP framework). But you have to be sure, that you really need to take that non-standard approach (as 'non-standard' I mean not using some reliable framework).
It is up to you. If you can give some details about the application that has to be created, the answers may be more relevant.
尝试构建自己的框架非常有教育意义,并且会对您有很大帮助;它还可以让您创建一个适合您需求的框架,而不是通用框架。但是,只有当您设法创建非商业项目时才能做到这一点,因为商业项目需要稳定性,而您可能无法从自制框架中获得稳定性。通过创建自己的框架,您可能会白白浪费大量时间(在处理业务内容时这是昂贵的)和金钱。
这基本上取决于您的项目类型。
Trying to build you own Framework is very educative and will help you a lot; it will also let you create a framework that fit your needs instead of a general one. But that could be done only if you are managing to create a non Business projects because Business ones requires stability that you may not get from a home-made framework. By creating your own framework you might loose a lot of time (which is expensive when working with business stuff) and money for nothing.
It basically depends on your project type.
我有一些编写自己的 CMS 的经验,我必须承认,这是非常有教育意义的,但从财务角度来看,这是完全不经济的决定。
在我看来,那些开发人员应该尝试编写一些规范。他们需要实施的内容非常详细的规范。然后,他们应该计算编写此类功能所需的时间,以便可以将这项工作与 CI 中已包含的元素进行比较,并决定哪个选项在编码时间、学习时间以及测试时间方面更可行。
I have some experience with writing my own CMS, and I must admit, that this was very educating, but from financial point of view, totally uneconomic decision.
In my opinion, those developers should try to write some specification. Very detailed specification of what they need to implement. Then they should calculate time needed to code such functionality so they can compare this work to elements already included in CI and decide which option is more viable in terms of time to code, time to learn, and of course time to test.
如果他们不介意教授他们的自定义框架,那么它可能是最合适的(特别是如果编写它的人仍然存在的话)。
然而,自定义框架可能会变成难以忍受的噩梦。 CI 的优势在于社区规模小和文档详尽。一旦您使用它推出了一些项目,我确信推出时间将与自定义框架一样快。
If they don't mind teaching their custom framework, then it's probably the best fit (especially if the guy who wrote it is still around).
However, custom frameworks can turn into unsupportable nightmares. CI has the advantage of a small community and thorough documentation. Once you roll out a few projects with it, I'm sure the roll-out time will be as fast as the custom framework.
我们放弃了自己的自定义框架,转而使用 CI。从财务角度来说,这是一个艰难的决定,因为我们为此花费了 1000 个小时,并且有很多项目正在运行。
CI 使我们能够更快地开发并标准化了我们的项目。该架构还允许我们轻松扩展,而不必担心“损坏”核心框架。
IMO 中 CI 是前进的方向
We ditched our own custom framework in favour of CI. Financially it was a tough decision as weve spent 1000's of hours on it and have a lot of projects running on it.
CI has allowed us to develop faster and has standardised our projects. The architecture also allows us to extend easily without concerns about 'damaging' the core framework.
CI is the way forward IMO
他们的回答是准正确的......
这通常是不真实的,事实上,在许多情况下可能恰恰相反。就我个人而言,我能够使用框架更快地开发项目。我没有在团队环境中使用过 MVC,但我想通过将工作划分为模型、视图和控制器,工作流分离将提高开发速度。
你在建造什么?这是关键问题。
如果您正在构建动态 Web 应用程序,框架将为您节省大量的工作时间,因为您不必一遍又一遍地重新发明轮子。如果您的项目的重点是基础,那么框架确实会增加太多开销。我想说,作为一般规则,如果您的项目需要超过 5 个 .php 文件,那么开始使用框架,因为这就是它的目的 - 分离逻辑。
对于您怀疑代码会开始变得混乱的大型项目,请使用 CodeIgniter 或其他框架。 MVC 模式可以防止这种混乱。
听起来好像您以前从未使用过框架。决定一个框架是否适合该任务的第一步是熟悉一个框架。这样您就可以更好地拨打电话。我不建议您立即自己编写;使用 CI、Cake 或 Zend 后,您将获得很多见解。
Their response was quasi-correct...
This is generally untrue, and infact, it's probably quite the contrary in many cases. Personally, I am able to crank out projects much faster using a framework. I haven't used MVC in a team environment but I would imagine that by dividing work into Models, Views and Controllers workflow seperations would promote development speed.
What are you building? This is the crucial question.
If you're building a dynamic web application, frameworks will save you hours and hours of work because you won't have to reinvent the wheel over and over again. If the point of your project is basic, then indeed... frameworks add too much overhead. I'd say, as a general rule, if you're project will require greater than 5 .php files, then start using a framework, because that's what it's purpose is - to separate the logic.
Use CodeIgniter or another framework for larger projects where you suspect your code will start to get disorganised. The MVC pattern prevents this disorganisation.
It sounds as if you've never used a framework before. The first step in making decisions on whether or not a framework will suit the task is to get familiar with one. You'll then be in a much better position to make this call. I do not recommend you write your own right away; you will gain a lot of insight after playing around with CI, Cake, or Zend.