Writing your own PHP Framework
Writing your own PHP Framework, should you do it?
While I worked at Wildside in Århus, Denmark, I wrote a MVC Framework for using in Typo3 extensions. The reason for this was that we were working on an application which required such a framework to structure the project to be as maintainable as possible without loosing performance. We started looking at different options, and none of them seemed right for the job, and most of them were either not usable in the context of Typo3, or not mature enough for production use.
When the project started there was a tight coupling to Typo3 since the application was pretty much just an extension to the website.
Since then a lot have changed, and I am now working directly for the client, who was a customer of my old company 9iA as well. The system is now more of a standalone web application and the requirements of the framework has changed many times since its first version in may last year.
The framework is, however still tight coupled to Typo3, but Typo3 is pretty much only used for templating and authentication.
In the last year and a half I have worked with a lot of php frameworks – saying that I have used all of them is off course an exaggeration, but I have been using most of the top ones in some way or the other. And not one of them work in exactly the way I would want them to.
Now I am wondering wether to rewrite my mvc framework to be standalone. It would not demand more than 30-50 hours of work to do that, and on top of that be able to integrate Zend Frameworks Components and an existing ORM like perhaps Doctrine.
The other possibility is to rewrite the application to use an existing well tested framework. If Flow3 had been ready for production (and working in php 5.2.x) that would probably had been the case. But now I’m just not sure.
No mather what we decide to do, the current version will go live without any kind of rewrite. But the learning experience from writing your own PHP MVC Framework might be nice to gain, at some point – even though most of it is written allready.
What would you do? And if you would use an existing framework – which one would you recommend?
Btw, no mather what we choose to do, the framework will be released to the public as soon as all bugs that I have found have been fixed, and some basic documentation have been written.
by Claus Witt
March 19, 2009
Tags: framework, php Posted in: Development
