Would Using a PHP Framework Be Beneficial in My Context?
Posted
by
Fractal
on Programmers
See other posts from Programmers
or by Fractal
Published on 2012-10-14T11:50:09Z
Indexed on
2012/10/14
15:49 UTC
Read the original article
Hit count: 360
I've just started work at a small start-up company who mainly uses PHP to develop their front-end apps. I had no prior PHP experience before joining, and this has led to my apps becoming large pieces of spaghetti code. I essentially started by adding code to implement an initial feature, and then continued to hack in more code to implement further features – without much thought for the overall design.
The apps themselves output XML to render on small mobile devices.
I recently started looking into frameworks that I could use. I reckon an advantage would be that they seem to force developers to modularise their programs using good-practice design patterns. This seems great for someone in my position. The extra functions they provide, for example: interfacing with databases in such a way as to make SQL injection impossible, would be very useful too.
The downside I can see is that there will be a lot of overhead for me in terms of the time taken to learn the framework itself (while still getting to grips with PHP itself). I'm also worried that it will be overkill for the scale of the apps we develop. They tend to be programs that interface with a fairly simple back-end DB, and will generate about 5 different XML screens. Probably around 1 or 2 thousand lines of code. The time it takes just to configure the frameworks may not be worth it. The final problem I can see is that developers in the company – who have to go over my code, and who do not know the PHP framework I may use – will have a much harder time understanding it.
Given those pros and cons, I'm still not sure on what the best course of action will be; so any advice will be greatly appreciated.
© Programmers or respective owner