One of the recurring questions on CakePHP forum is “what is the best editor for PHP”. Although, for years, I have been a zealot of “Macromedia Dreamweaver”, recently I tried Eclipse and soon I fall in love with it. The power of Eclipse mainly comes from thousands of plugins it has to offer. Using eclipse, I am able to write code with twice the speed as compared to Dreamweaver, and at the same time reduce the number of mistakes quite considerably. Two important features of Eclipse are:
1. Code Lookup – if you properly document all your functions, eclipse will complete code for you and also show all the functions and arguments of the function. Being able to see function names and their arguemets save enormous time in trying to switch files to identify functions and argument orders.
2. Highlight errors: This is the best feature of Eclipse. It constantly monitor your code and informs you about mismatch bracket, missing end of statement parameter, undefined variable, or uninitalized variable, etc. On one hand, this not only helps in debugging but also helps in reducing many common mistakes that are often a nuisance
Note: this features are only avialable if you also install below mentioned plugins, mainly PHPEclipse and PHPDocumentor
If you are considering Eclipse for PHP development, you need to have these plugins:
1. Eclipse – (only mentioned for the completeness of resources)
2. PHP eclipse (Required)- a plugin for PHP – you need to have this for PHP development. Checkout the tutorial on how to install phpeclipse plugin. If you are new to Eclipse, I would recommend using automated process. Carefully read the note on “Install” and “Install All” options.
3. PHP Documentor (Required)- Any development is not only about implementation. An important aspect of any software development is documentation for maintainability. PHP documentor does a decent job of creating documents. Although its the not the best, but it works. There is a tutorial on how to install php documentor in Eclipse.
4. SimpleTest (Optional) – It allows you to write simple test fixtures. CakePHP is nicely integrated with SimpleTest and within minutes you can write extensive test for all your models, controller, and view. Checkout a tutorial on bakery on how to use simpletest within CakePHP 1.2.