Setting up a development environment
by , 12-21-2010 at 11:10 AM (120345 Views)
If you want to help out developing HotaruCMS or you just want to have a nice PHP development environment I would like to recommend a tried and tested development environment (my own) on Windows. I have to warn you tough, this is a highly technical article with many perquisites and references, if you don't seem to get it,... don't try too much. I am being this hard because developing HotaruCMS is 3 times more technical than just setting up the development environment.
The Basics (webserver, php, database, ide)
First things first, get XAMPP for Windows and install it following the instructions. Make sure that everything works nicely by visiting http://localhost/ with your browser.
I like having the htdocs folder outside the XAMPP installation folder. The default is C:\XAMPP\htdocs\ see instructions on how to move it somewhere else.
Proceed to getting Netbeans for PHP and install that too.
More involved stuff (xdebug,svn)
Next thing you'll want to do is download the Xdebug extension that is appropriate for your setup and configure the php.ini of your installation to load it and have it cooperating with Netbeans.
Netbeans can also interact with SVN very well and I use it a lot myself. It is just that TortoiseSVN is more feature complete. For doing simple checkouts of the SVN repozitory the Netbeans SVN module is fine as it stands. Nevertheless if you want to have more power in your hands as far as SVN is concerned, get TortoiseSVN and follow the instructions on the wiki on how to get the source from the project's SVN. Bare in mind that the development right now is happening in the /branches/1.5 branch not the /trunk as mentioned in the instructions. This will create a folder with the latest revision of the files that are in the development.
Make sure that you checkout HotaruCMS sources in the folder that your XAMPP installation is serving files from.
Now visit you http://localhost/ again and try installing your HotaruCMS from that folder you just checked out. Finger's crossed everything will go smooth.
Go into Netbeans and from the menu choose File->New Project... and choose a PHP project from existing sources. Point the Sources folder field to the folder you have the SVN checkout of HotaruCMS.
Make sure to have Netbeans save the data for this project outside of that folder by checking the Put Netbeans metadata in a separate directory and choosing a location for them. In the next page of the Project setup wizard, make sure that the Project URL path is correct and click on Finish. Now you have a HotaruCMS ready for development.
Extra stuff (javascript, css)
For the last part... do get Firefox if you don't have it already, and install the Firebug extension.
References
Here is the list of software discussed so far:
- Netbeans for PHP as an IDE
- XAMPP includes the Apache 2.2, PHP 5.2.x, MySQL 5+ stack
- Xdebug (for debugging through Netbeans)
- Firefox + Firebug (for debugging Javascript)
- TortoiseSVN for SVN interaction
- Disgsby + Skype for communication with other team members








Email Blog Entry