Zend Framework 2 – could it be even worse?

tl;dr
ZF2 is overcomplicated, reminds me of Java, there are no good tutorials to help you started or overcome specific problem, there is almost no community to help you, there is not enough community modules, and if there is some, its incomplete, broken or unsupported.
if you are considering ZF2, avoid it for now, it seems like no one is using it.


i like Zend Framework 1. i’ve built couple of projects based on it and it did simplify my work. but its learning curve was too steep and i did questioned it a lot initially. than i’ve started to work with Magento and the time spent on learning ZF1 did paid off.

recently i’ve decided to give Zend Framework 2 a chance, even though Magento team already announced that their 2nd version will still be using ZF 1. and now i understand why. ZF2 was completely rewritten and it is not backwards compatible. whats even worse, its so complicated that it reminds me of Java.

Tutorials
8 months since the 1st stable release (September 2012) there are no solid tutorials or use-cases out there. (just try to find end to end tutorial about User Management system)

Documentation
the official documentation is confusing with occasional bugs and what makes it even worse, they use 1 DISQUS discussion per page across multiple versions! (discussion for version 2.0, discussion for version 2.2)
another ‘feature’ is version switching. one would say that is as simple as replacing number in the url (actually this is the only way it can be done properly), but if you use provided dropdown, you will be always redirected to index and loose current page.
luckily there is alternative.

Modules
modules were supposed to be the main horse power of ZF2. i think that ZF team have seen success of Symphony2 and tried to replicate it. unfortunately, they expected people to jump in and create all this modules for them and it did not happen. now we have ZF Skeleton Application, zf-commons (zfc) and some random attempts. also there is this module database, but i did not find anything useful in it yet.

Module ZfcUser
is trying to cover the basic functionality but it is still incomplete. it lacks the main features such as ‘forgot password’, ‘remember me’, ‘login expiration’ (auto log out after certain time)

Module BjyAuthorize
possibly the best supported module out there, but even this one is not perfect. 3rd step of their 4 step Configuration guid on the homepage is wrong.
one of their main feature, Controller Guard, doesn’t work

Module GoalioRememberMe, GoalioForgotPassword
very helpful modules adding missing functionality to ZfcUser. however those 2 modules doesn’t work together out of the box, as each of them overwrites login view and therefore cancels each other. to make it work, you have to create additional view for login form and output the main form, ‘remember me’ and ‘forgot password’ fields. both modules lack tests. both modules require “dev-master” version of zfc modules. (read Composer section below)

Module CrunchySignup
possibly the worse module im forced to use, as there is no alternative. same as Goalio modules, this module doesn’t come with tests and use “dev-master” requirement for composer. so far i’ve created 10 issues and 7 pull requests on their github but the repo seems to be dead.

Composer
it looks like some module developers don’t understand versioning and version dependencies. lots of modules do not have any version tag, and require “dev-master”. that means that those modules doesn’t work for me, as i always specify current version in my composer. how can i be sure that the module will not be fundamentally refactored in next version? if it works for me now i dont need the latest version next month. i dont know what will be the average number of modules in one project, im currently on 10 and all my project does, is user management, but debugging the whole project just because 1 module introduced bug in the latest version is the last thing i want to do.

Community
basically none existing. there are some people around zfc, sometimes you google name or two, in my experience it was mostly Abdul Malik Ikhsan discussing academic examples (good for learning, but nothing what you would use in the real project, so far)

Conclusion
the only reason why ZF2 is still around is the Zend in its name. Zend as Zend Framework 1, Zend as company behind PHP, Zend as supposedly seamless integration with Zend Studio and Zend server.
but as there is PhpStorm/Sublime, Apache/Nginx, there are also other PHP frameworks…

Tagged on: ,

4 thoughts on “Zend Framework 2 – could it be even worse?

  1. Niko Vasilev

    We created a lot of modules for ZF2. You can start from here https://github.com/coolcsn?tab=repositories
    – CsnUser (Authentication (Login) with Zend Framework 2 and Doctrine 2. “Remember Me” mechanism.)
    – CsnCms (Zend Framework 2 CMS system )
    – CsnAuthorization (Authorization module for Zend Framework 2 )
    – CsnAclNavigation (Zend Framework 2 Module for Navigation using Acl )
    – etc.
    You can build whole system with these modules.
    Also look http://www.youtube.com/user/coolcsn/videos to see how they was created.

  2. gondo Post author

    thanks for the tip, however your repos are wrong! please read my post again, mainly the section about Composer and tags/numbering versions. having just the master brunch is, if nothing else, lazy.
    i’ve moved onto symfony and i can say that the ecosystem its incomparable better and more mature.
    good luck with ZF2, maybe i ll check it again when there will be ZF3. but for now im adding it next to Typo3 into the “never ever put your hand on it” box.

  3. Jett

    Post writing is aoso a excitement, iif you be familiar
    with after that yoou can write if not it is complicated to write.

    Feeel free to visit my weblog … denver seo company (Jett)

  4. joe

    I completely agree. I have used ZF1 in the past few years, it has it’s problem but after working them out, it was a good stable framework.
    ZF2 is slower than ZF1, it is too complicated with it’s configuration arrays, especially when you need more advanced use cases, and you are struggling to find these configuration options as there are no documentation. Mostly I had to analyse ZF2 code itself, just to find out what parameter to pass from config.
    Also currently there are 499 open bug tickets on ZF2 GitHub page, with lots of them dating from 2012 and still not closed.
    The company I am working with at the moment has a payed ZF2 support. Unfortunately, not much help out of it, as we do not get quick responses, and often their responses do not provide a solution.

Leave a Reply