I’ve created a simple application as an example for beginners starting with zend framework 1.9. I used the zf command to create the project, so it is somewhat similar to the quickstart directory structure. Many current examples are following the old directory structure which will confuse a newbie.
This is a very simple blog application, missing most of the features of a full blog system such as Wordpress.
It’s just designed to show how the Zend_ACL, Zend_Auth, and Zend_Form components of Zend Framework are used. I really hope that this will help newbie Zend Framework developers learn how to built simple applications like this.
I have looked many sites to learn and understand Zend Framework and spent lots of time thinking about the best way to develop this application. So I think that other newbies like me will be trying to learn similar ideas, and trying to learn similar information. Based on this assumption, I hope that this helps them out. You must have some prior application development with PHP and also with the Zend Framework quickstart to understand the application quickly.
Its available on my blog at http://www.harikt.com/content/simple-blog-using-zend-framework-19 . You can grab the github code here: http://github.com/harikt/zendblog/


Comments (Login to leave comments)
I am really sorry for the Bandwidth Limit Exceed . I was not aware that my bandwidth will run out like this.
Contacting http://rackloop.com admin for the upgrade . Stay tuned and browse devzone or feel free to grab the piece of code from github.
Thanks for the wait .
I am really new to Zend Framework and Unit testing . As I have used OOP and some other small framework I can understand and use ZF. But I am really new to Unit testing . So I am really sorry for it now doesn't have unit testing .
But posted this article if it helps some one learning ZF 1.9 . I have spend lot of time trying to learn many of the components used in it . So I think if a person who is like me this will help to shorten the steep curve .
And one more thing my site is up as the admin increased the server bandwidth . So Thanks and Love to hear your new comments in my site.
radhad, while your enthusiasm for unit tests is perhaps admirable. I think that your attitude was a bit harsh here. This was a ‘Look, I wrote a blog using Zend Framework as a learning exercise’, that was being shared with the world in case other beginners could benefit from seeing a simple example that had been done.
While unit tests might have been nice here, there certainly wasn’t a ‘need’ for them, given the context of the application.
@chrisweb369 : Yes I know there is a slight problem in the design . But didn't get much time to fix it. I will try to fix in my free time .
@all Thank you ... Me too really Happy to know my post helps you and seeing your comments .
Great work sharing... Im also new to ZendFramework MVC...
For me the blog dont work out of box (but i might have issues with enviroment)...
Lets go... first I run the aplication on apache virtual directory so the root of the application is the public (I dont know if u do that 2)...
The FrameWork goes on library inside the "blog"...
I change the application.ini adding:
resources.layout.layoutpath = APPLICATION_PATH "/layouts"
(Change layout.php path to /layouts/layout.php)
And I made changes to resource.db (im using Postgresql)
At Bootstrap.php I add:
<CODE>
protected function _initViewHelper()
{
$this->bootstrap('layout');
$layout = $this->getResource('layout');
$view = $layout->getView();
$view->doctype('XHTML1_STRICT');
$view->headMeta()->appendHttpEquiv('Content-Type','text/html;charset=utf8');
$view->headTitle()->setSeparator(' - ');
$view->headTitle('Blog Tutorial');
Zend_Dojo::enableView($view);
Zend_Dojo_View_Helper_Dojo::setUseDeclarative();
}
</CODE>
And I change all DB models setting the column names to lower case (postgresql dont like upper case) and I add sequence on it.
- url (dont know if it is some on my conf) not working proper:
<b><a href="<?php echo $this->baseurl(); ?>">ZF 1.9 Blog</a></b> (is Geting the url u are)
I change to:
<b><a href="<?php echo $this->baseurl()."/"; ?>">ZF 1.9 Blog</a></b> (Get the base url)
- Notice references to "/index/hello" but no Action or view for it (at least not that I see)