Tuesday, 27 September 2011

Want to be a web developer? (part 6)

Version control / backup

Git is great for this - you will need a repository to store your code. This can either be a public or private repository. git hub has both public and private, codebase is private only. You can also setup your own repository on your host but it will probably need to be on a dedicated server rather than a shared server. Using git is great for collaborative development and merging code.

The basic procedure is
  • Go to your development directory then enter
  • git add * - to add files to the git repository
  • git commit - commit changes to your local repository
  • git pull - pull down any changes so you can merge
  • git commit - another commit with merged changes
  • git push - finally push them onto your remote repository
You should also install Meld - this is a fantastic tool for showing differences in 2 files and/or folders - but also allowing you to make changes to the files. To install

sudo apt-get install meld


Always a good idea to have a bit of documentation! You'll notice a lot of code will have tags in the comments in front of a function or class. These are tags that are recognised by documenting systems. PHPDocumentor used to be the one to go for, but it hasn't been updated since 2008. Doxygen is a great alternative and has been kept up to date. To install

sudo apt-get install graphviz
sudo apt-get install doxygen
sudo apt-get install doxygen-gui

Then to run the program use



From a career point, you might want to get an industry certification - for PHP this is a Zend certified engineer. You might also want to consider getting an LPIC for Linux and Apache

And finally...

Thats pretty much it! I don't think I've left anything out - let me know if I have. Hope you have have found this series helpful

Cheers, Russ

No comments:

Post a Comment