Pragmatism in the real world

Zend Framework Tutorial for ZF v0.8

A few people have asked about updating my Getting Started tutorial for version 0.8 of the Zend Framework.

I finally had a chance to check the code and it worked fine with no changes (as expected!)

Darren, one of my colleagues as recently gone through the tutorial for me and found some typos, so I have put out a new version (1.2.4) that fixes these. I’ve also updated the code too to make it slightly cleaner.

10 thoughts on “Zend Framework Tutorial for ZF v0.8

  1. The advantage of PHP over ASP and JSP is that PHP is very modest and practical language that is as efficient as ASP/JSP but without the overhead complexity. The reason why experienced programmers like Rasmus Lerdorf prefer and preach the developers to create their own project specific framework is that the code can remain self explanatory.

    When I first read about the zend framework, I was very excited that there is finally a hope for a rational and practical PHP application development framework.

    But when I tried the latest (0.8) version I was disappointed to see how complicated it is to just implement a simple mvc app. This is obviously because the zend framework is very feature rich but the very luxury of feature richness is making the framework unnecessarily heavy and bloated with code. Because all features are integrated, one feature complicates the implementation of another and the overall design is turning into an Object Oriented diarrhea.

    A much better and cleaner approach would be: A very light weight MVC skeleton framework should be provided and all other functionality like session management, access control, json etc. are provided as pluggable extensions to the framework. This way you will not mix up functionality with infrastructure. And the monstrous zend framework will adhere to the PHP style.

  2. Zuhair — I'm not sure what framework you were looking at, but I don't think it was Zend Framework. The MVC implementation does not include session management, ACLs, authorization, json, etc — you have to explicitly use those when you want them. The MVC only controls (a) decomposition of a URL to request parameters (Routing), (b) dispatching (taking the request parameters and determining what controller and action to call), and (c) returning the response. If you want need acls, session management, json, etc., you pull in those components yourself, either in your bootstrap, plugins, or action controller classes.

    Also, compared to other frameworks currently available, I'd argue that ZF is not incredibly feature-rich at this point: no form handling modules, no integration with ajax libraries, etc. These will come, but you can hardly accuse ZF of being bloated with features at this point.

  3. I can only echo what Matthew has already said so eloquently.

    The amount of code for the MVC in ZF is small and remarkably flexible. Even the M, V and C are all completely separate and in reality you could choose to not use the M or V and still use the C :)

    It's still missing an ActiveRecord too :)



  4. Youre rite, I was indeed looking at another framework. I downloaded a number of frameworks to choose one and mixed things up. My bad!

    However the extracted size of zend framework is around 60 MB. Do you think it would be better to have all non-core functionality as downloadable packages that can extend the core framework as needed?

  5. Hi Rob, i am new to all this and am very excited with the framework. I first read your tuto and found it is great. Thanks! However, when trying it, I found problems with my apache config. I am running it on windows, so I have to name my access files ht.acl. The problem is that I cannot see the zftuto folder in my browser, only the others. If I rename ht.acl to anything else, the folder becomes visible but logically I lose all the modwrite configs. Can you help me with this?
    Thanks a lot for your tuto and your attention.


  6. Arttie_br,

    Try enabling mod_rewrite in your httpd.conf file. On Windows it is commented out by default (semicolon in first column of the line).



  7. After a whole day searching I found my answer. The line
    "LoadModule rewrite_module modules/"
    was commented in my apache config. Uncommenting it solved the whole problem.
    Thanks, and regards.


  8. Please, delete my post above. If I had refreshed the page 17 minutes earlier, I'd had solved my problem with your advice. Thanks for everything ;)

  9. I've read that ZF will not use mod_rewrite in future release. It would be great for those who work with Microsoft IIS.


Comments are closed.