Saturday 16 June 2012

Learning the MVC principles with Zend

Getting to grips with MVC using Zend

As I mentioned in a previous post, I could neither get to grips with or understand the positive aspects of programming using the MVC principles.

It was recommended to me that I follow the Zend Framework quickstart guide. Apparently it gives a good basic understanding of the MVC principles and will take around a day to work your way through it.

I started setting up the Zend Framework on my computer a few weeks ago, but got stuck and frustrated several time and could not force myself to go back and try again. It is not the simplest thing to set up if you're not used to configuring system files such as PHP's .ini file. But I have finally got there!

The quickstart guide navigation is not all that friendly I found and so I will put some links at the bottom of this post.

There were several places that I got stuck while setting up the framework. The last and most frustrating is when I actually visited my local version of the quickstart site to be greeted with the error 'Warning require_once(Zend/Application.php)[function.require-once]: failed to open stream: No such file or directory in /home/michael/Projects/quickstart/public/index.php on line 18'. I'm still convinced that I must not have followed the setup guide correctly, I followed it through twice after to make sure I had done everything and set up any symbolic links I needed to.Google didn't seem to help. I finally gave up and started messing around the the set_include_path call on the index.php and added under the realpath bit '/home/michael/Zend/ZendFramework-1.11.11/library' it finally worked! So if you get that problem, just put that bodge in.

I am now greeted with the following image. Boring, but satisfying.
I imagine my next post will be when I have completed the guide. (Probably in a few months)


Zend Quickstart links:

Download Zend and then follow install.txt

No comments:

Post a Comment