Sunday 17 June 2012

Part way through the Zend tutorial

The Zend quickstart tutorial is really helping me get to grip with the MVC and front controller way of doing things. Although I'm not yet connived that it is the best way of doing thing, I am beginning to understand it, how it works and the reasons that people think it works well.

I thought I would quickly share a few things at the halfway stage.

Development Environment

Zend makes a lot of fuss about file structure and while at the beginning of the project my plan was to keep things as basic as possible and only use a text editor to edit my files, I caved in. I installed NetBeans in order to see the file structure of the quickstart project. This was actually quite good for understanding where all the files lived.
In order to install NetBeans, you must first install the JavaSDK which you can do by typing sudo apt-get install openjdk-7-jdk in a terminal window.
You can then download NetBeans from http://netbeans.org/
Once you have done that, open NetBeans and choose New Project. Then just navigate to the quickstart folder.

MySQL vs SQLite

The ZEND tutorial on creating models uses SQLite as the database of choice. Whereas this blog only talks about MySQL. The tutorial starts talking about initializing a Db resource. Read this part but don't follow the instructions to do with SQLite or creating scripts (you can if you want as you can revert it afterwards). Instead follow the simple MySQL instructions in this comment. You can then pick the tutorial up again where it starts talking about a Table Data Gateway.

No comments:

Post a Comment