tags:

views:

113

answers:

3

Anyone's been trying himself at object oriented programming ? Most probably every developer I guess:D I for one have never studied OO design patterns thoroughly, and trying to put it all together now does prove at times thrilling, and many times frustrating also. Even more so when trying to do it in : PHP!

All-in-all, my boss asked me to add some Database persistence functions to her server, but most of all, she asked me to translate her already working procedural code into a working Object Oriented code.

Here I am, still standing on my PHP OO project. I'm (already) fed up with this "file logging only" PHP capability. I believe there must be some (free or not too much expansive) PHP debugging utility ? I've heard about Zend Studio and PHPEd so far, which didn't quite do the trick for whatever reasons. WIRCW("Which I don't Remember Correctly Why" lol)

What say yé? on debugging PHP ? Is there a tool that provides a good debug mode? what's more, don't forget I'm not speaking about the classical web Request/response model. Talking about a debugging facility which can enable you to trigger a web service (aka client request) and go into debug mode on the SOAP web service side.

Thks for any input.

+1  A: 

This is a nice article on PHP debugging techniques:

http://www.ibm.com/developerworks/library/os-debug/

webbiedave
+2  A: 

You won't be able to debug a SOAP service locally really. You'd have to build a SOAP class and catch the errors there, based on response codes from your web service.

In your specific case I would probably var_dump() the return response from the service and see what's happened there, or use something like SoapUI http://www.soapui.org/ to test my queries.

As for converting procedural code to object code, I would try and break up the logic into chunks and then create classes based around the actual data you're dealing with. So stuff dealing with users would end up in a User class and similar.

As for debugging software, I would probably recommend XDebug as it cab be pretty handy. I would also recommend just turning on display_errors and setting error_reporting to E_ALL or strict.

DavidYell
Thks all for the swift answer. This community is truly awesome. I've never doubted it, but now I can really confirm it. I believe I had downloaded SOAPUI, never used it yet though.Cheers, we're going to do it, however all in all PHP sucks for object oriented programming :D joking thks for the insight Dave and all.
NutMotion
A: 

There are enough PHP debuggers out there:

  • Xdebug
  • Zend Debugger

I'm sure there are more. They offer the typical debugging features (stepping, watches, ..) andare best used with an IDE like Netbeans or Eclipse.

Techpriester