Showing posts with label PHP Framework. Show all posts
Showing posts with label PHP Framework. 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.

Saturday, 19 December 2009

Symfony

An exciting couple of days have just passed. I had a great telephone conference call with a business associate about a new project. It's something that will keep us busy for a good few months.
The need for a decent development framework is now even more pressing, so yesterday afternoon, I downloaded and installed the most recent supported version of the Symfony framework.
Installation was fairly straightforword: just a case of RTFM and taking my time. The one slight problem I had was getting the apache virtual host directives to work properly. These were sorted out this morning - I was tired and forgotten to change a couple of parameters that appeared in the vanilla directives given in the Symfony manuals. I had also forgotten to add an entry into my /etc/hosts file.

It was quite a surprise to find and fix the problems so quickly as one of our dogs ate something unpleasant (fox or cat poo) a day or two ago. Since then she's had a bit of an upset tummy which came to a head at bedtime. Standing at the back door at 2:00am when it's -2C waiting for a dog to relieve herself for the umpteenth time isn't conducive to a good night's sleep. She's a bit quiet at the moment and probably very hungry as all she's had is a tablespooon of rice for breakfast.

Anyway, time for a(nother) cup of restorative coffee and a shower.
Once I'm fairly compus-mentis, I have Christmas presents to wrap and I want to have a go at making a Stollen.

A bientot!

Sunday, 13 December 2009

Downtime

One skill that I have recently acquired is baking bread. As I type this, I have two batches rising. The first batch is destined to become a couple of wholemeal loaves. It's a basic recipe from an old Good Houskeeping cookery book that my wife has had since the year dot. The second, is an enriched dough (by that I mean I've replaced some of the water with soya milk and a couple of eggs), which I'll use to make bread rolls for Christmas. Most of them will be destined for the freezer. I have some ideas for the rolls, for example, incorporating some stilton and walnuts into some of them.
You may be wondering what all this has to do with IT. Well, two things: first, as the proverb says, "All work and no play makes Jack a dull boy" and second, kneading dough gives me a great opportunity to ponder things that need to be "background-processed", such as the look and feel of my next project, which framework and so on.

Talking of frameworks for PHP, I'm going to have a look at Symphony and will probably install that tomorrow, along with Netbeans, as I think my current PHP editor, Bluefish, could be better. A full IDE will make me much more productive.

Anyway, I think my first batch of dough is ready for knocking back and putting into tins ready for proving.

TTFN


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!

Wednesday, 9 December 2009

Good Karma...

I downloaded the latest version of Ubuntu this evening. Version 9.10 is known as the "Karmic Koala". I have been running "Hardy Heron" for quite a while and whilst I am generally happy with it, there have been a couple of things that bothered me. Moreover, there are new versions of Firefox and OpenOffice.org which I am definitely interested in.

The new version looks much slicker and loads very quickly indeed, so I will definitely upgrade.

Upgrading won't be a trivial task though as I will have to reinstall quite a lot of software. The list includes: Apache, MySQL, PHP, Thunderbird, Bluefish, Subversion and GPass amongst others. Ubuntu's package manager makes software installation nice and easy. My broadband connection will be busy tomorrow morning!

I have good quality backups of my data, having installed BackupPC on my "server", which is actually another PC running as an ubuntu workstation with Apache, MySQL, PHP and Subversion. For added belts and braces, I have added all of the websites that have been under development to my Subversion repository. This is in addition to the BackupPC backups!
When I pluck up the courage, the desktop edition on this machine will be replaced with a server edition.

I think tomorrow will be an interesting day - hopefully it won't be too "interesting"!

The other thing that piqued my interest today was the Zend framework for developing web applications. This and other development frameworks look very exciting and I will be doing quite a bit of research on Zend and other frameworks before I make a start on coding my next project.