42

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:

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?

romaninsh
  • 10,606
  • 4
  • 50
  • 70
  • I can't find the exact question, but I believe this has been asked before. – icktoofay May 08 '11 at 03:13
  • This kind of question has a better home at programmers.stackexchange.com. – Matt Howell May 08 '11 at 03:13
  • The benefits of not using a framework are breadcrumbs compare to the benifits of using one. If you don't like the existing frameworks, write one of your own, thats what i did – Ibu May 08 '11 at 03:14
  • @icktoofay - There are questions like "why use framework", but I'm interested in the opposite. Why is programmers.so more suitable? – romaninsh May 08 '11 at 03:16
  • Duplicate of: http://stackoverflow.com/questions/1851920/why-use-a-framework-with-php – Johan May 08 '11 at 03:17
  • 3
    @Jonathan it's not duplicate. I saw that answer and it does not answer my question. – romaninsh May 08 '11 at 03:20
  • @romaninsh - StackOverflow isn't the place for hypothetical, subjective, or otherwise overly-broad questions. – coreyward May 08 '11 at 03:21
  • 2
    it looks like this questions gets quite some interest and attention. Even though it was closed originally, perhaps it's useful after all? I have nominated it for re-opening. – romaninsh Sep 04 '12 at 00:27

2 Answers2

77

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.
  • 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

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

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/

Community
  • 1
  • 1
Flipper
  • 2,589
  • 3
  • 24
  • 32
7

First Read Why use PHP framework and then decide why not use a PHP Framework

Why use a framework with PHP?

Why do I need to use a popular framework?

PHP framework (cake/smarty): How to use it and when?

Community
  • 1
  • 1
Vishwanath Dalvi
  • 35,388
  • 41
  • 123
  • 155
  • 2
    I know that. I use frameworks for 10 years. Please read question carefully. – romaninsh May 08 '11 at 03:22
  • 1
    @romaninsh so if you have a very small scale website project then going for framework isn't a good idea! – Vishwanath Dalvi May 08 '11 at 03:25
  • i don't see reason, why not... – romaninsh May 08 '11 at 03:27
  • 3
    @romaninsh: "I use frameworks for 10 years. Please read question carefully." So you probably know enough to answer your question. – Matt Howell May 08 '11 at 03:35
  • 2
    I never had a situation big project or small, where NOT use the framework would be somewhat beneficial. But from other responses they seem to have been is such situations. I asked what are the reasons, that's all. – romaninsh May 08 '11 at 03:38
  • @mr_eclair OP was not asking about the usage. Just about the reasons to not. Here already is a good answer http://stackoverflow.com/a/5925446/775856 – 夏期劇場 Mar 12 '14 at 03:13