is it a good idea to move to object oriented php. I am confident in .NET but with php i have a doubt if this would work in longer run ?
Should i follow MVC architecture using Zend framework for our php site ?
Would it worth all the time and money spend in moving from procedural programming to object oriented ?
Anyone else changed thr website from procedural to object oriented - if yes then is it advisable to start from scratch or start adding object oriented bit to current site till it's all done ?
procedural php to object oriented
Moderator: General Moderators
Re: procedural php to object oriented
I'd say adopting new technologies is a good idea when you're developing new project. For older code (especially if works fine and rarely needs any changes) changing paradigms doesn't make as much sense.
Re: procedural php to object oriented
Using the most popular design pattern along with the framework that the people behind php has available would improve your attractiveness as a coder on so many levels.Anant wrote:Should i follow MVC architecture using Zend framework for our php site ?
I agree with weirdan also.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
Re: procedural php to object oriented
The two approaches are not dissimilar. While I haven't changed an entire website, I have updated a few old, small apps from procedural to OOP. I've found in most cases, you need to re-organize so much of the code, that it feels like you're re-writing anyway.Anant wrote:Anyone else changed their website from procedural to object oriented - if yes then is it advisable to start from scratch or start adding object oriented bit to current site till it's all done ?
Like ~Weirdan said - don't change it if you don't have to. If you do need to though, I'd recommend starting from scratch. That is to say, don't try to copy and paste tiny bits of functionality from your procedural code into an OOP design. While you can certainly re-use algorithms and little snippets, rebuilding from scratch will allow you the freedom to do things completely fresh, rather than trying to simply duplicate what you did before, just in an OOP context.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Re: procedural php to object oriented
Thanks all of you for your replies.
In my case we constantly add new features to our site. It's quite easy to do it procedural way but as a career point of view - how many companies want a programmer doing only procedural programming ? I come from .NET background and now working on php. But one question scares me is how about the debug feature in php. I am currently using dreamweaver for php but there isn't any debug feature.
And once i move to OOP i am quite use to friendly debug feature of visual studio. Is there anything upto that level in any of the php ide ?
Thanks
In my case we constantly add new features to our site. It's quite easy to do it procedural way but as a career point of view - how many companies want a programmer doing only procedural programming ? I come from .NET background and now working on php. But one question scares me is how about the debug feature in php. I am currently using dreamweaver for php but there isn't any debug feature.
And once i move to OOP i am quite use to friendly debug feature of visual studio. Is there anything upto that level in any of the php ide ?
Thanks
Re: procedural php to object oriented
http://xdebug.org/docs/remote#clientsAnant wrote:And once i move to OOP i am quite use to friendly debug feature of visual studio. Is there anything upto that level in any of the php ide ?