I started learning this language on being given a project at work to design/implement a tool which was to be used for scheduling some of our jobs, which was done manually. Well, after reading a bit about PHP, it was clear using Apache, MySQL and PHP should be the easiest to cook up a website. Some of the advantages you might have using this bundle :
- Pre-configured packages such WAMP ( windows ), LAMP and XAMPP make it incredibly easy to install PHP, Apache HTTP server and MySQL.
- Well, there does exist a bundle for Solaris too, its called SAMP. The latest version can be installed using Glassfish 1.5, provided by Sun Microsystems.
- Once installed, you are ready to go !! No need of manually configuring any parameters, ain’t that awesome !! (well, you might want to change httpd.conf to set the path to webroot, location inside which your source files would be housed and picked up by the webserver or if you want to change the port on which your localhost is to be accessed via)
I started off with developing login, registration ( authentication ) for my website. It was fairly straightforward, created a USERS table having some cliche` looking fields such as username, password, firstname, lastname, email, created_date, modified_date….well, you get the idea…basically whatever you want to save about a user.
CREATE TABLE users (
id integer auto_increment,
PRIMARY KEY (id)
Getting such an authentication up for my site did not take long, but I then realized there must exist certain frameworks which make such tasks simpler for us. Well, after googling for it a bit, CakePHP is one such framework. And how do you implement authentication using it, with probably 15-20 lines of code….Im not kidding, I did mean 15-20 lines.
Please wait on, I will get into more details on installing CakePHP and having it work with your existing AMP. I’m using WAMP, the steps I follow would most likely be applicable to the same installation.
A few useful links I will leave you with :
- Download Eclipse – I use this as an editor for php development
- Install Wamp – http://www.wampserver.com/en/download.php
- Install UML tool – http://amateras.sourceforge.jp/cgi-bin/fswiki_en/wiki.cgi?page=AmaterasUML – I like drawing up some UML diagrams before actually getting to implementation. You can overlook this step.