Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

Disclaimer: I don't want to start any flame war so there will not be no name of any framework mentioned.

I've been using quite many from the existing PHP frameworks and my experience in each case was similar: everything is nice a the beginning but in the moment you require something non standard you get into lot of problems to fix otherwise simple issues. In case of frameworks following the MVC design pattern there are some issues with the implementation of each layer for example there is a lot of codding used for model and data access with using ORM and presentation is not much more than pure phtml. Some frameworks use their own wrappers for existing PHP functionality and in some cases severely limiting original functionality. Depending on framework you can have additional problems like lack of documentation, slow or non existent development cycle and last but not least speed.

While ago I made my own framework which while doing it's job and being used for few different applications after couple of years more of experience with PHP doesn't seem to be perfect piece of codding. I could write my own framework and use additional experience I've gathered during these years to make it better on the other hand I'm aware that there is quite many better programmers working on creating/upgrading existing frameworks.

So does it make at all nay sense to write my own PHP framework if there is so many possibilities to choose from?

share|improve this question

closed as not constructive by gnat, Walter, Thomas Owens Nov 15 '12 at 21:23

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

2  
Sorry, but this is not a constructive question. There are only three reasons why you should write your own framework. 1. You are learning, 2. You are not allowed to use them or 3. The existing ones don't have the functionality you need. Though I would seriously consider that what you want to do isn't really useful if that's the case. –  ChrisF Nov 14 '12 at 21:40
1  
@ChrisF I think that #3 is not as simple as you describe it as it is not only question whether functionality is there or not. In case of every framework if I wasn't using it for building some standard websites I got into problems which I was able to solve but it was always additional task caused by the fact that I was using particular framework. In some cases there was no other solution except hacking into core framework code. –  onlineapplab.com Nov 14 '12 at 21:54
1  
Maybe have a look at frameworks that are not based on PHP. –  thorsten müller Nov 15 '12 at 8:09

2 Answers 2

up vote 5 down vote accepted

Absolutely, roll your own if you want. Don't listen to naysayers. The reason that there are so many frameworks to choose from in the first place is because people ignored the tired 'dont reinvent the wheel' mantra and tried to make something they thought was better.

So, re-invent the wheel if you feel the urge. You'll learn a lot. And who knows, maybe a year from now your framework will be the one that everyone is supposed to be using instead of making their own.

share|improve this answer

I don't think it make sense to create your own framework completely from scratch with the wealth of libraries that exist out there. I have actually created (or glued) my own framework together with using Silex as a base, added some functionality to be able to use yaml for configuration, be able to use class as the controllers easily, ability to create the standard REST APIs with like 6 lines of controller code, and then add in a completely custom DAL/Active Record system (because I don't like any of the existing ones out there). I also use Monolog for logging.

I think writing certain components of your framework can be warranted but not the entire thing, make use for those good open source general purpose libraries (a lot of the Symfony2 components can be used by themselves and Silex is just a collections of the core ones).

share|improve this answer
2  
You say it doesn't make sense but yet you created your own framework ( more or less ) and ignore your own advice. What does that say about your advice? –  Ramhound Nov 15 '12 at 12:44
    
I said your should write your on framework from SCRATCH which I did not. I use a lot of other 3rd party libraries that provide functionality that I like and then implemented only a DAL/ORM solution from scratch (there is a lot more to a PHP framework than just a DAL/ORM). –  ryanzec Nov 15 '12 at 16:22

Not the answer you're looking for? Browse other questions tagged or ask your own question.