Showing posts with label Subversion. Show all posts
Showing posts with label Subversion. Show all posts

Sunday, 9 May 2010

Bye-bye Symfony and Netbeans...

I can't believe that it's been almost six months since I last posted anything on this blog. How time flies when you are having fun!
A great deal has happened since my last post. Having written about the Symfony framework, I decided to abandon it after a few days, mainly because the documentation was somewhat lacking. Instead, I opted for the Zend Framework. After checking out a few online documents and buying a few books on OOP, I was away in next to no time.
I am running the latest version of the framework (1.10) on my development workstation and staging server and it is a very good development environment. Once a project is set up, it takes very little time to have a working website.
One area where it scores very highly is the creation of forms. The built-in validators for Zend_Form and Zend_Validate mean that it is easy to create a form which is fully validated when it is submitted to the server. Moreover, the forms should be more secure as there are validators to help stop XSS and SQL injection attacks.

On the subject of integrated development environments (IDEs), I decided to abandon Netbeans and go with Eclipse. There is nothing wrong with Netbeans per se, other than it ran very slowly on my workstation. Eclipse runs much more quickly and once I had got used to its user interface, I felt it was much better.
One thing that I really like is the way it integrates with my subversion server, so I can commit changes to the repository from Eclipse, without having to go into a separate shell. It saves time and encourages good practice.

All of this has meant that once we had agreed on the overall design, I have been able to make excellent progress with the website I am currently developing with a business associate. There is no doubt in my mind that the combination of an IDE like Eclipse and a programming framework like the Zend framework make a huge contribution to productivity and speed of delivery. That said, some of the modules in the framework can be a little hard to get going and it's often necessary to search the fora or google for solutions to problems. Overall though, it's definitely quicker than having to hand craft code.

Monday, 14 December 2009

Beanz meanz Netbeans!

It's been a really fun day. I spent quite a bit of time going through some object oriented php tutorials on the killer php website. There are some excellent tutorials plus short video clips that go a long way to explaining what object oriented PHP is all about and how to start using it.
My previous projects have been based on "traditional" programming methods, making extensive use of functions. Whilst I have gone to great lengths to try and separate dislay code form "business" code, I think a more structured approach is needed for future work. The approach will make a huge difference to maintainability and scalability of any new applications that I write.

I successfully downloaded the Netbeans 6.8 IDE package this evening. Once I had installed a JDK, the package went in without a hitch. I love the way it integrates with Subversion and has support for the Symfony framework right out of the box.
Netbeans is a really feature-rich package and it will take a while to get the hang of its myriad features. The time invested in this (and getting stuck into OOP) will reap dividends though with respect to productivity and code quality.

I also love the fact that I can run the same package on my Macbook as well as my Ubuntu workstation - or Windows if it comes to it, though hopefully, I can avoid THAT route!

Friday, 11 December 2009

Definitely good Karma!

My installation of Ubuntu 9.10, the Karmic Koala went without a hitch. Well, that's not strictly true, as I did have a few problems getting the BackupPC server to restore data onto my newly formatted and repartitioned hard drive.
It was a fairly simple fix though - I had forgotten to add a couple of parameters into my rsyncd.conf file: something that became apparent after a cup of strong coffee and a ponder.
Once the rsyncd.conf file was corrected, I was able to start moving data between the backuppc server and my workstation with surprising rapidity.

The main problem I had was restoring my mySQL databases. I had used mysqlhotcopy to create backup copies of the databases on the system. It took a couple of attempts to get the databases working, but I got there in the end.

The process I followed was:
  • log in to the mysql client and create the databases (create database {databasename})
  • stop the mysql server
  • when the databases have been created, copy the backed up files to /var/lib/mysql/{databasename}
  • As I copied the files over as root, I then needed to call chown mysql:mysql /var/lib/mysql/{databasename}/*
  • start the mysql server
  • log into the mysql client and check the databases were OK - a couple of describes and selects does the trick. It's pretty obvious when there's a problem
  • finally, test the web application(s) that use the databases.
As far as my website development projects were concerned, rather than use backuppc to restore them, I opted to use subversion to load them from the repository I set up last weekend.

So, apart from a couple of applications that I need to load and setting up rsync so it runs as a daemon, the system is fully functional.

My first impressions are of a system that loads really quickly. The new versions of OpenOffice.org now supports the latest .docx files, so it looks like it's fully compatible with the most recent versions of MS Office. That said, I haven't tried spreadsheets yet...

Overall, a good day's work. Time for another coffee and a surf to find out more about PHP development frameworks!