I have always developed web software using a framework (Agile Toolkit) and it was helpful to me in all situations, but one question always concerned me:

我一直使用框架(敏捷工具包)开发Web软件,它在所有情况下对我都有帮助,但有一个问题总是让我担心:

In which circumstances it's NOT advisable to use a framework?

在哪些情况下不建议使用框架?

So a question to other veteran framework developers - when would you code in a raw good PHP instead of your framework of choice?

那么对其他资深框架开发人员来说也是一个问题 - 你何时会用原始的PHP而不是你选择的框架进行编码?

2 个解决方案

#1


73

There are many reasons that people will suggest not to use a framework.

人们建议不使用框架的原因有很多。

  • You will learn a lot by writing your own. I have been working on my own and I have learned a lot of different things about PHP that I did not know before. Overall it is a great learning experience that can be used in an interview or on your resume. It shows that you have a big interest in the language and most importantly the theory behind it rather than just the mindless implementation.
  • 你会通过写自己的东西来学到很多东西。我一直在自己工作,我学到了许多关于PHP的不同之处,我以前不知道。总的来说,这是一个很好的学习经历,可以在面试或简历中使用。它表明你对语言很感兴趣,最重要的是它背后的理论,而不仅仅是无意识的实现。
  • There are a lot of things in frameworks that you do not need and by making your own you can get only whatever you want. The framework is tailored to your own needs specifically. I for one did not like how any of the frameworks handled templates which was the biggest trigger for me to make my own.
  • 框架中有很多东西是你不需要的,通过制作你自己的东西你只能得到你想要的东西。该框架专门根据您自己的需求量身定制。我一个人不喜欢任何框架处理模板的方式,这是我制作自己的最大触发器。
  • Also, I am not positively sure about this one, but thinking of it logically...your own framework that is tailored to only your needs will be much faster than any of the other frameworks. Think about all of the settings that the other frameworks have to go through when loading and the database queries that involves. You save yourself all of that loading.
  • 此外,我对这一点并不十分肯定,但从逻辑上考虑它......你自己的框架只适合你的需求,将比任何其他框架快得多。考虑其他框架在加载和涉及的数据库查询时必须经历的所有设置。你节省了所有的负担。
  • If you are going to be making a small project that will not need to be expanded on, such as a simple portfolio website, then a framework would just be more work than necessary.
  • 如果您打算创建一个不需要扩展的小项目,例如简单的投资组合网站,那么框架将比不必要的工作更多。

There is also a very good article here that goes into other details. The author of this article starts out by talking about how he always was such a big proponent of frameworks.

这里还有一篇非常好的文章介绍了其他细节。本文的作者首先谈到他如何一直是框架的大支持者。

http://jpst.it/jiYX

http://jpst.it/jiYX

I am always going to push towards making my own frameworks unless I start doing some freelance work. I am constantly updating my framework and learning more and more. You will never hear anybody say definitely use or definitely do not use a framework because it all depends on the use.

除非我开始做一些自由职业,否则我总是会努力建立自己的框架。我不断更新我的框架并学习越来越多。你永远不会听到任何人说绝对使用或肯定不使用框架,因为这一切都取决于使用。

Edit: There is also a question over at the Programmers site on this: https://softwareengineering.stackexchange.com/questions/49488/when-not-to-use-a-framework

编辑:在程序员网站上还有一个问题:https://softwareengineering.stackexchange.com/questions/49488/when-not-to-use-a-framework

Edit #2: One last article about why frameworks are not necessary: http://www.amberweinberg.com/you-dont-need-a-framework-if-you-have-a-good-developer/

编辑#2:关于为什么不需要框架的最后一篇文章:http://www.amberweinberg.com/you-dont-need-a-framework-if-you-have-a-good-developer/

更多相关文章

  1. laravel 框架自带表单验证
  2. 为什么要使用PHP框架?
  3. Kohana框架3.3 cookie设置两次
  4. 根据网址上的国家/地区将用户重定向到正确的数据库,我使用i18n fo
  5. ThinkPhp框架 分页 和session验证的使用
  6. yii框架给我们所带来的好处?
  7. ThinkPHP3.2.3框架下where的组合查询and、or方法
  8. php CI框架nginx 配置
  9. Mongodb 的ORM框架 Morphia 注解二 —————— @Id

随机推荐

  1. 解决IE9以下版本浏览器不支持HTML5标签的
  2. HTML文档是什么意思?
  3. HTML5游戏的即时性
  4. 基于HTML5 Canvas WebGL制作分离摩托车
  5. 使三个标签填充容器的宽度
  6. 如何让按钮点击之后才能点击注册,再次点击
  7. 关于HTML(七)--------HTML废弃的标签
  8. 对于表格数据,什么渲染更快,CSS或?
  9. Chrome 50更改隐式表格单元格高度行为
  10. js 隐藏、显示html 标签内容