Brad Cottel - 9:29 am Q: Do you personally use PHP_Beautifier? What are the pros/cons? _________________________________________________________________ It's a good starting point to quickly and consistently format source code. If you want to keep additional new lines that you use to make the code more readable, you'll probably have to create your own formatting style, which is a bit of work, but on the long run ist definitely pays. Muhamme AbuElezz - 7:35 pm Q: is this like "Indent code" in ZEND IDE _________________________________________________________________ Yes. Like always, you can use whatever tool works for you. The advantage of a tool like PHP_Beautifier is that you can easily automate the formatting task using for example a build tool like phing. Muhamme AbuElezz - 7:46 pm Q: wjy we use underscore here ? _________________________________________________________________ I use underscores on the local variable names so that it is easy to distinguish the scope a variable is valid in just by looking at how the name is written. Again, you can use whatever convention works for you, I would strongly recommend to use one scheme consistently. The guidelines I presented are pretty widely-used so it'll be easier for other developers to read your code. Muhamme AbuElezz - 7:51 pm Q: any example on assumptions please _________________________________________________________________ Example: I expect the first parameter of a function to be an integer. Instead of just hoping an integer will be passed in, you should document this (see API documentation part) and explicitly code an appropriate type check. It's not more work to write if (!is_int($x)) throw new Exception('...') than to write // $x should be an integer. The first makes your code more robust, however. John Brunton - 9:50 am Q: Don't answer now - plz recommend book that shows proper way to design web applications with PHP. i.e. form input, processing, response. ________________________________________________________________ I can recommend "PHP 5 Objects, Patterns, and Practice" by Matt Zandstra. It seems a second edition has just been published. Bill Bolte - 9:52 am Q: is there a PHPDoc plugin for Eclipse? _________________________________________________________________ Another attendee said there was, though I could not find it on the web right now. You can always integrate PHPDocumentor by calling it on the command line and setting it up as an external tool in Eclipse. See here: http://www.plog4u.org/index.php/Using_PHPEclipse_:_Installation_:_Installing_the_phpDocumentor Zend Studio for Eclipse seems to directly support PHPDocumentor. jef derby - 9:56 am Q: This only works if we use classes? _________________________________________________________________ (refers to API documentation) Not necessarily, though it makes most sense for OOP code. You can still use PHPDoc to document procedural functions. Some of the OOP concepts (like access modifiers) do not exist in procedural code, so the documentation will be somewhat shaky. Muhamme AbuElezz - 7:58 pm Q: already Zend IDE have this feature, arent that _________________________________________________________________ (refers to API documentation) Yes, see above. Patrick Brooks - 9:59 am Q: You mentioned articles on xDebug -- where can they be found? _________________________________________________________________ http://devzone.zend.com/tag/Xdebug moutaz salahat - 10:00 am Q: whatdoyou think about ZDE , how could it be usefull forus in this topic? _________________________________________________________________ I do usually not recommend specific tools unless they are free software, but if you are willing to spend money, a Zend IDE is probably the best you can get for PHP. My philosophy is that everybody should use whatever tools work well for him. jef derby - 10:00 am Q: How do we register for 2nd part? _________________________________________________________________ Online, in the same way you have registered for the first part. See here: http://www.zend.com/de/company/events/ Brad Cottel - 10:01 am Q: Will you be covering more agile techniques in future (like more on how important tests are, how they help one be confident in being able to refactor all the time, at will, etc.)? _________________________________________________________________ I will not focus on tests in the second part, since many existing PHP projects do not have a lot of tests. My approach is instead of "scaring people away" by forcing them to extensively work with tests from day one to get them started with refactoring, which in turn will show them how important tests are. This not to say that tests are unimportant, quite on the contrary. Bill Bolte - 10:02 am Q: i would like to see a webinar on refactoring procedural into OOP. Any chances of that? _________________________________________________________________ I'd love doing this. If there is interest for this, just let the guys from Zend know, and tell them I'd be willing to do such a webinar. If there is enough interest, maybe we can make that a workshop at the upcoming Zend/PHP conference. For the time being, I have written a three-part series on refactoring PHP code for php|architect in 2006 (volume 5, issues 3, 6, and 7). You can purchase PDF copies of these issues at http://www.phparch.com/. jef derby - 10:02 am Q: Can you send links to those? [articles you wrote] _________________________________________________________________ I'd love to, but I don't hold the publication rights, php|architect does. You'll have to buy the magazines to get the articles. For the xdebug articles see above. A good place to look for new content that I publish is my blog, http://inside.e-novative.de, where I usually announce anything I publish. Scott Barr - 10:03 am Q: Which editions of PHP Arc? _________________________________________________________________ See above. moutaz salahat - 10:03 am Q: About Performance ? _________________________________________________________________ Refactored code will not be noticeably slower than code that is less readable. Instead of trying to save execution time by making your code less readable, save one database or filesystem access, which will overcompensate any potential slowdown introced by refactoring. Developer time is more expensive than computing time, so I suggest focussing on making code developer-friendly. You can always scale rather easily by adding a bytecode cache or another server. moutaz salahat - 10:03 am Q: you do not think refactoring will affectthe code _________________________________________________________________ No, I don't. See above.