We're a community of 1077K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,076,498 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Best way to dive into an existing complex php project

Hello Guys!

I have just inherited a huge mammoth php project, which is not quite organised. Few of the files are of 25K+ php lines of code. Several sections of code are redundant across the project. Several files are imported into several files... My job is to strip many of the unwanted features of this project. I am not a php guy, but I am comfortable with programming, so that should not be a problem.

Can you folks please tell me what should be my strategy to work with project?

I have the following in my mind.

(1) Use eclipse, to navigate around the project.
(2) Use Xdebug trace the execution and step into the code.
(3) Make Xdebug to dump the line numbers of code executed and write a shell script to extract those lines, so as to isolate the code required by me.

I request everyone to share there experience and strategies in such projects. At the end of the discussion, I would summaries the discussion so that anybody else can get the head start by just reading that.

Thank you!

2
Contributors
1
Reply
12 Hours
Discussion Span
1 Year Ago
Last Updated
2
Views
theprofoundgeek
Newbie Poster
8 posts since Oct 2009
Reputation Points: 10
Solved Threads: 0
Skill Endorsements: 0

Apart from XDebug, I've used log4php on occasions to just log an application's flow to a textfile. This will help you in making a map of the files/functions, and what is called in what order.

If you come across a piece of code that is repeated, make a new file and put the function there, in your own coding style and remove the others. Step by step rebuilding the code in your own style will help make things simpler in the end, in my experience anyway (whether it is function or OOP).

If not there already, implement decent fault handling and logging.

pritaeas
Posting Prodigy
Moderator
9,316 posts since Jul 2006
Reputation Points: 1,178
Solved Threads: 1,467
Skill Endorsements: 86

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.0521 seconds using 2.65MB