Alex Hudson

Thoughts on Technology, Product, & Strategy

A (fond) farewell to Zend Framework

I’ve been a Zend Framework user for a while. I’ve been using PHP long enough to appreciate the benefits of a good framework, and developed a number of sophisticated applications using ZF, to have grown a certain fondness for it. Although it has a reputation for being difficult to get into, being slow and being overly complicated – not undeserved accusations, if we’re being honest – there is something quite appealing about it. Well, was, for me at least. ZF 1.11 looks like the last version of the framework I will be using.

Why? The simple answer is ZF 2.0. Having been busily built over the past couple of years one way or another, a number of betas have been released and it looks likely to me that an initial release is a few months away. At this point I need to make a decision about my future use of the framework, and I don’t particularly like what I see.

Let’s be quite honest about one thing up-front: I cannot claim to have done any substantial amount of work in ZF 2.0. The criticisms within are all personal opinion based on little more than the most itinerant tinkering.

That said, I actually don’t feel like much of what I’m about to say is unfair, for one simple reason: I have tried to like ZF 2.0. There are of course other PHP frameworks, and I don’t really need to name them, and many of them are initially much nicer to get started on than ZF. Despite all that, I got quite happy with ZF1, and indeed approached ZF2 with the idea that it would take a similar amount of effort to learn to like it. I have attempted to apply that effort. I have failed.

Much of what I think is wrong with ZF2 you can quite obviously see in the ZendSkeleton example application. Now, of course, the example applications for most things are pretty poor: every JS framework has a To-do app, and things are generally chosen to show off the best features of the framework in their most flattering light. That’s actually the first thing that hits me about the skeleton application: it’s deathly, deathly dull, but there’s a pile of code needed to get you to that point. The sheer amount of boilerplate needed to get much further than ‘Hello World’ is incredible, and of truly Java-like proportions.

Generally, I like my frameworks opinionated. I like having a culture, or an ethos, which come through as a set of guiding principles for the developers of both applications using the framework, and the framework itself. And ZF certainly is and was opinionated. I suppose at this point, I find that my opinions differ with theirs too much, and that’s an issue.

The first opinion I would cite is the use of dependency injection. Now, I get DI, truly I do. I even like the idea of it. I can see how it would be useful, and how it could add a heap of value to a project. But there is “useful feature” and then there is “koolaid”, and DI in ZF2 is alarmingly close to the latter. As a case in point, just take a peek at the module config for the skeleton app.

The comment at the top of the file first sent shivers down my spine – “Injecting the plugin broker for controller plugins into the action controller for use by all controllers that extend it” – it’s the kind of enterprise buzzword bingo that again, sorry people, sounds just like a Java app.

And as you progress through what is supposed to be just a bit of config for a simple application, wading past the router config and various pieces of view configuration, you’ll see the thing which just turned me right off – ‘Zend\View\Helper\Doctype’. Seriously? A fragment of view code to manage the doctype? As if this is something you can just change at runtime? “Oh yeah, we built it in HTML5, but I can just downgrade to HTML4 by switch….” sorry, no. Doctype is totally fundamental to the templates you’ve written. This is so far from application config it’s not funny.

Other stuff I can’t abide: the default file tree. Did you think application/controllers/IndexController.php was bad enough? Now you have module/Application/src/Application/Controller/IndexController.php. I do get the reason for this, but again enforced modularisation – ZF1 supported modules too without forcing it.

I know how observers might respond to this: it’s a skeleton app. It’s supposed to be showing a set of best practice, you can cut corners and make things simpler. Except, this isn’t true: there’s already a whole load of corners cut. Just look in the layout; there’s a pile of code at the top of the template. Isn’t the view supposed to be where the code lives?! I would have most of that crap in my Bootstrap.php as-was, I can’t believe people are advocating throwing that in the layout template now (and I’m sure they’re not). But there it is, cluttering up the layout, when it really should be refactored somewhere else.

This is the issue. The skeleton app does a whole heap of things just to do nothing except chuck Twitter bootstrap on screen. I am, of course, willing to be shown how all this up-front investment will pay off in the end – but right now, I really do not see it. The more I look, the more I see things which will just require more and more code to get working – a constant investment throughout the life of a project, without any obvious pay-back for it later. As a rule of thumb, whenever I’ve used a framework before, the skeleton always looks pretty good, but a production app gets entirely more complex and hairy. Things don’t improve, generally, at best they stay as-bad. I would worry that a ZF2 app would just explode into a sea of classes entirely unnavigable by a junior programmer, held together by a DI system so abstract they would have little chance of properly comprehending it.

This is really sad. ZF1 had a number of shortcomings which I thought ZF2 looked on track to tackle – and, in all probability, has tackled. The REST controllers in ZF1 were complete bobbins, and ZF2 looks like it has that right. The Db layer in ZF1 was actually quite good, but ZF2 looks to have improved on it. PHP namespaces are of course ugly as sin and ZF2 embraces them, but they make sense and I could potentially learn to love them. But my gosh, just look at the quickstart. Remember, this is the “get up and running as fast as possible” guide for people who already know the language and just want to get cracking.

What is bad about it? Well, 12.2.2 is the start of the “you’ve already installed it – let’s get coding” section. First item on the todo list? “Create your module”. This involves downloaded the skeleton, copying bits over, and being told all is well. 12.2.3, update the class map for the autoloader, using the correct namespace, ensuring configuration is enabled and being lenient with the autoloading (let’s both you and me pretend we understood what on earth this section was trying to achieve).

12.2.4, create a controller. Oh my god, I don’t want to know what Zend\Stdlib\Dispatchable is there for, or why I might pick a REST controller because the quick start doesn’t cover REST. But no fear, we have a basic controller, it looks like this:

namespace\Controller;

use Zend\Mvc\Controller\ActionController,
    Zend\View\Model\ViewModel;

class HelloController extends ActionController
 {
   public function worldAction()
     {
        $message = $this->getRequest()->query()->get('message', 'foo');
        return new ViewModel(array('message' => $message));
     }
  }

Unfortunately this reminds me again – I hate to use the J-word – of all the geek Java jokes. Boilerplate object-this and method-other-thing-another-method-that().

I so want to be interested in ZF2, but it’s about as far up the corporate enterprise architecture-astronaut ladder as I have ever seen PHP climb. And honestly, if I wanted to program Java, I’d use Java. And then I’d download Play or Scala and actually enjoy it. But for PHP, no. So, adieu, ZF. It has been nice knowing you.

Previous

“Dart” out in the open – what’s it all about?

Next

packaging a virtualenv: really not relocatable

48 Comments

  1. You might enjoy node.js.

  2. Alex

    Quite possibly πŸ™‚ I also enjoy django, and (staying in PHP) Photon looks incredibly interesting. The point isn’t so much “Which framework is right for me?”, though – this is more just some views on ZF2 from someone who quite likes ZF1.

  3. Remaining in the php framework area, I would reccomend giving a look at Laravel http://www.laravel.com From my experience it’s a simple to use framework but with a lot power under the hood. Totally worth giving a try

  4. “Unfortunately this reminds me again – I hate to use the J-word – of all the geek Java jokes. Boilerplate object-this and method-other-thing-another-method-that().” i agree with everything, on that last one you just LOST me like Sawyer & Jack on that island!

  5. Yii, Symfony, CodeIgniter are vaiable alternatives!

  6. LC

    “Zend\View\Helper\Doctype” ? It’s already in ZF1.

    I’m a ZF1 and Symfony2 user but I haven’t tried ZF2. I wait for a initial release. I just hope they got rid of the decorator pattern for forms and that layouts support multiple level of inheritance.

  7. Just to clarify, DI is *totally* koolaid. It is the koolaid of choice in all the top frameworks (Zend2, Symfony2, Rails etc).

    It is an architecture not needed by 99.9% of applications. But the koolaid tastes really good once you want advanced customization. For everyone else… it’s just overengineered.

  8. Alex

    Yeah, you’re right, that component is already in ZF1 – I didn’t remember it being in the quick start (although it is there now), maybe it wasn’t there when I first went through. I still dislike it though πŸ™‚ I don’t even think the examples they’ve given are correct – so, for example, they have this demonstration of using the helper to drop RDFa content into the page. But if you’re genuinely going to do it properly, you also need to wrap your xmlns attribute on the HTML tag in an XML check. Is someone seriously going to output <footer> in HTML5 mode but <div id=”footer”> in XHTML strict? The whole idea just seems absurd; you can use it to switch some key stuff in some different layouts, but to think of it as genuinely switching the output between different doctype-conformant modes is a misrepresentation of the reality.

  9. i got the same problem with ZF. I took 5 days with symfony2 and could not be more happy.

  10. Wow, I’ve heard that ZF2 wasn’t pretty, but I never imagined to what extent.

    I wish good luck to the enterprise PHP people, they get to enjoy all the ugliness of J2EE, with abstract factories of factories and all, without even scarce benefits of J2EE, like static typing.

  11. have you used Symfony2 ?? or plan to use in future.

  12. Alex

    No, I haven’t used it – I looked at it briefly, and it looks nice. It’s definitely a viable alternative.

  13. Does anyone still remember back in the days they were marketing Zend Framework as “Extreme Simplicity”? πŸ˜‰ http://fredwu.me/post/19888742513/zend-framework-from-extreme-simplicity-to-enterprise

  14. Got to agree with you Alex! DI has appeared with vengeance in Symfony2 and it bugs the shit out of me. It really feels like frameworks are over-engineering stuff.

  15. It’s a fair viewpoint Alex, but remember, this is beta code, in as much as it’s named beta for marketing rather than traditional reasons. In all honesty it’s more like an alpha release. What’s missing from this alpha, and what you will certainly see in the initial release proper is a lot of the config that is currently in module config having proper working default values. You’ll also get a cli tool for creating modules much like Zend_Tool in ZF1. The ZendSkeleton app is meant mainly so that contributors and the curious have a quick way to see how ZF2 currently hangs together. I hope that you will revise your opinion when you see how everything works in the initial release.

    Disclaimer: I am a ZF2 contributor.

  16. Alex

    Hey Spabby, thanks for the response – and certainly, I would be quite willing to believe that things will improve before the final release.

    I have to say, the cli tool doesn’t really excite me that much πŸ™‚ I think I used it a couple of times in ZF1, but a lot of the time I found that I ended up having to massage stuff it did for me – for example, adding a new action to a controller was exceptionally limited and never gave me the result I was after. I never got to the point where the cli was more value than trouble, and I would be really interested to know how many ZF developer-users who do use it successfully.

    Having good defaults is absolutely crucial though, and I look forward to seeing that. I did feel with ZF1, though, that there was a lot of “magic” happening behind the scenes – part of the initial difficulty of learning how it works was figuring out why or how code in the guide actually worked. With the ZF2 skeleton app, things are a lot more explicit, but making them implicit as a default doesn’t really simplify the app – it just hides the complexity, and that only really makes sense if the complexity is to a large extent avoidable, at least initially. With ZF1, I don’t think it ever was like that – a lot of the complexity you needed to get to grips with pretty quickly. Of course, this isn’t an issue that can be easily solved: I appreciate it’s difficult to have a sophisticated framework which is powerful and configurable, yet simple and accessible.

  17. I myself only really use Zend_Tool to create a brand new application, and since I now have my own starting point, I don’t even use Zend_Tool for that any more. But I can see a point where you can do zf2 create module foo, and the module will be created, added to your application config and will be ready to use.

    Part of my head scratching at the moment is understanding the Dependency Injection Container. It’s not actually something you *have* to use, but things like the wip version of Zend\Db rely on you injecting the right db adapter in order that it will work out-of-the-box. The jury is out on whether this is required complexity that can safely be masked for the person who just wants a pre-configured MVC stack with tasty extra components ready to use, or whether it is complexity for complexity’s sake. One thing I will say is that the new module structure absolutely and totally blows my mind. I would expect to see lots of code blocks you can drop in to your project that will integrate seamlessly with each other. Need a registration module? Drop in ZfcUser. What to add a blog to your site, there’s a module for that too.

    Lastly, if your keen to use ZF2 but don’t like the direction it’s going in; get involved! Sign up for the contributors mailing list, or drop into #zftalk.2 irc channel on freenode and voice your complaints to the developers. Lead Matthew Weier O’Phinney is in there most days from around 2.30pm UK time, and is only too happy to discuss the base concepts around the framework.

  18. Hey Alex, your post inspired me to write my own blog post on the subject: http://www.matthewratzloff.com/blog/2012/03/25/why-i-moved-on-from-php/

  19. I’ve never been a big fan of Zend Framework. To me it’s always seemed like more of a “library” than a framework. I’ve tried CodeIgniter before in the past, on numerous client websites and I think it’s lacking in a lot of key areas.

    I’ve used CakePHP quite extensively, we chose it as the platform for the enterprise/government level software that we write on a daily basis. It’s fared extremely well, I would definitely recommend it to anyone looking for a decent framework. Although it is lacking in it’s own areas, I think it’s rather extensible for a competent developer.

    That being said we are considering a leap to either Rails or Django though, just because they fit a bit better with what we’re trying to accomplish.

  20. I proposed the DI component back in 2007, and warned them that it was not only going to add more flexibility, but also more complexity. Apparently, complexity is what they were after.

    For me ZF2 is an example of something that went wrong. It was supposed to be a clone of Rails, a simple MVC framework. However, the limitations of PHP and a bunch of bad design design decisions turned ZF1 into PEAR and ZF2 into Spring. You don’t have to be a genius to realise that while Zend Engine 2.0 is trying to be more like Java, ZF is trying to be more like Spring.

    The more you work with Rails and Django, the less you understand ZF.

  21. Hello Alex,

    I would recommend you to try Symfony2 PHP full stack framework, which is stable and is progressing very rapidly. It has a live community and has good performance.

    I can say for sure that Symfony2 is simply the best PHP framework in the world.

    Kind regards,
    Peter.

  22. Although I agree on some things you say about ZF 2.0, I also have some points I think you’re overlooking. For instance, the doctype. A doctype helper is great. What if I want to output something in a list? Do I need closing tags? Do I need XHTML ‘s? Actually, do-I-have-a-valid-dtd-and-can-I-parse-or-validate-my-output-comma-even-if-just-for-testing-purposes? Yes, setting a doctype is useful outside of the template.

    Also, all the complicated stuff may seem, err, complicated, but at some point you extend your application beyond the original purpose and need to make changes at a different layer. Zend tries to give you this option. Unfortunately in my experience it always (you only remember when it goes wrong) miserably failed in ZF1.

    I do think ZF is broken and doomed. I think ZF fails at the decisions they do ‘hardcode’. Try to lazily render a layout and view in ZF1. Somehow there’s a couple of output buffers preventing any of that, and even if you get around those there’s a trillion places where a string cast/conversion is done before the actual rendering stage…

    Anyway, just my 2 cts, perhaps it’ll give you a tiny bit of fondness for ZF2 anyway…

  23. Alex

    Michael, I do understand what you mean about the doctype, but I think you have to acknowledge that actually there’s a range of different things there. So, for example, self-closing tags are used by XHTML, you don’t need them in HTML5 but technically in HTML4 the sole ‘/’ attribute is illegal. Is someone *really* going to wrap that in a view helper? My argument is that you should have a specific set of templates for a doctype and/or view helpers that know how to output compliant code, not some kind of uber-switch. And honestly, if you’re outputting XHTML by pulling together strings (templates), you’re Doing It Wrong. How many “XHTML” pages work when you send an XHTML mime type? Virtually none – they actively break in Firefox.

    So, it’s not that I don’t appreciate the complexity. I absolutely do. But I also believe that when you need to pay the price of the complexity, it’s because it’s delivering value above and beyond. I don’t believe in paying the price before you need it.

  24. Ex Java (J2EE), now PHP developer here.

    I always thought Zend was ‘far up the corporate enterprise architecture-astronaut ladder’ (great line!).

    Developers following this kind of ‘enterprise architecture’ always seemed to me to be suffering cognitive capture – too focused on the instrumentation and not the whole environment (kinda like the mathematicians working in credit derivatives, very clever guys, until…) – extensibility is great but you simply cannot prepare for all future eventualities.

    The J2EE frameworks I used suffered from this – bootstrapping too complex == slow growth of knowledgable developers == slow to fix bugs / update 3rd party libraries.

    My advice – if you want a PHP MVC framework that accepts and embraces PHP for what it is but takes on board great concepts from other languages and frameworks try Yii (just a user, no affiliation)

  25. I’m a little disappointed with ZF 2.0 as well, and the fact that ZF 1.0 is left to “die”. For example, ZF1 team won’t even bother fixing a minor issue with unit tests (http://framework.zend.com/issues/browse/ZF-11781) saying they would rather focus on ZF2.

    From my point of view, ZF2.0 is pretty much a completely new framework. I probably won’t be able to migrate my existing ZF1 projects because of the amount of api changes.

    I hate the DI settings/module layout as well.

  26. JiN

    You had me up until you brought up the namespace look. Fact is that any PHP framework that is being re-written/newly developed and don’t use namespace is worthless. As someone else mentioned Doctype has always been there and finally there is still 5 months left before the projected 1.0 release.

  27. Keep your eyes open for ZF1.12 releasing soon (mid-April at a guess). ZF1 is not being “left to die”. Might I repeat, what you are testing is a beta, and is missing lots of sane defaults and the convenience layer.

  28. Just to put to bed your criticism of the doctype helper, because its making me cringe just how wrong people’s comments about it are. Its only actual practical use is 1 thing. to make the closing tags of generated code correct. e.g. the input tags from zend_form. this is also why you should set it from bootstrap time, as the view is rendered before the layout, if it is only declared at the top of the layout, then your form tags may not be correct.

    it does also have the convenience of being able to output the correct doctype header for you, which many people find to be a pita to remember.

    Of course its not going to magically fix your template code!

  29. Also, @Adar who is this mythical “they” you speak of. ZF is an open source project coded mainly by volunteers. If nobody else has time to fix a minor issue, why not fix it yourself and submit a patch?

  30. Alex

    @Ryan – I’m not quite sure who you’re cringing at, but you’re conflating mime and doc type. Having a switch for outputting XML is not totally unreasonable, although I’d still argue XML by string concat is a recipe for disaster. But that’s nothing to do with doctype.

  31. No one has mentioned FuelPHP. 1.1 was lovely to work with and I’d recommend taking a look. 2.0 might be heading in a direction you might not like :
    http://fuelphp.com/blog/2012/03/why-the-20-changes

  32. I have used some classes from Zend Framework 1.x in several projects before and was glad to have them. I never used the MVC parts and didn’t really follow the ZF2 development that much but I totally agree with you, it looks like a Java framework, seems to be very complex and like the complete opposite of ‘get up and running fast’ – especially compared to Rails.

    Also I don’t know if I’d consider Symfony2 to be that much different, I started a small weekend project with it and it felt quite Java-ish as well. But at least Symfony2 is very modular and all the components can be easily used in own projects, which is great. It definitely seems very good and ‘high quality’ but there are just some things I don’t like (such as annotations in the Model/Database layer – you aren’t forced to use them but everything else seems like more hassle).

    I think I prefer the ‘micro’ approach and using Slim or a similar small framework alongside other libraries to get the job done in PHP from now on. But I’ll go build something with Rails finally soon as the PHP framework landscape just doesn’t seem to ‘get there’, even after all this time.

  33. You must give a try to the Kohana framework guys πŸ™‚

  34. Like many on here, I’m quite disappointed with the current state of ZF2. I just read a short tutorial on how to output JSON instead of HTML on Rob Allen’s blog.

    Everything is so complex in ZF2, comparing it to a framework like Sympfony 2… I am able to understand pretty much everything that’s going on. Without reading a single line of code in the framework itself.

    The simple task of outputting a JSON response to the browser should be straight-forward in any framework. But looking at the code….
    http://akrabat.com/zend-framework-2/returning-json-from-a-zf2-controller-action/
    http://symfony.com/doc/current/book/controller.html#the-response-object

    I really hope the ZF2 team will be able to sort these kind of things out. But that will result in putting things “back under the hood” and introducing a lot of new “magic”. Which, in my opinion, is a real problem in ZF1 and it’s “resources” in application.ini for example.

  35. I was holding out for ZF2 but agree with the general consensus of the comments. The increase in complexity may be good for enterprise but they already have alternatives in Java and ASP.NET. Complexity isn’t so good for developers that need to get things done in a hurry. Think I will stick with CakePHP where v2 is looking pretty good, and may even try and find the time to have a play with Rails.

  36. I know it’s still in development but I’ve given the ZF2 skeleton application a try and my initial impression is it still looks like there will still be a big learning curve…it would be great to see some solid documentation accompanying the release of ZF2.
    Until then i’ll be giving Symfony 2 a try.

  37. Just imagine that you hire a new developer that has programmed in ZF1 before…. It is completely in-relevant, cause ZF2 ain’t ZF1!

    The skeleton application apparently didn’t work for me at all, the config killed my passion, and then read that the Doctrine2 integration will probably not be there out-of-the-box straight away.

    Like somebody said: Where is EXTREME SIMPLICITY gone???

    PHP !== Java (true)
    ZF2 == Java (true)

    What for???

  38. Felipe

    Hello guys,

    First of all, im not a developer, but the “boss”. I got here by searching around about Zend vs another frameworks.

    Long story short is: Our company (online game company, by the way) develops its own websites and systems with a small team of developers.

    Couple months ago we decided to adopt Zend Framework, due to the promises of finding certified professionals, which would solve our problem, finding people to work!

    But the oposite happened. 1 guy quit the job a month ago, said he couldnt stand zend, he would prefer cakephp.
    Another guy is constantly complaning about it (specially zend studio), and according to his own words (which I mostly do not understand).

    here it goes:

    “Very nice of ZF to not support a simple “MPTT”, never saw such ridiculous tool in my life, where you have to create stuff in order to work properly, its the same as having to put oxigen and hydrogen together to create water, why reinvent the water again?

    Why download over 25mb of files, where 90% is composed by libraries you dont even use, where the MVC standard isnt used properly, where to do ORM you need another framework (Doctrine).

    Looking around ZF community I saw thousands of projects for new components that would really be useful on ZF, but no one gave a damn about them.

    Where is the promise of a huge community and support for new ideas again?

    But you told me that ZF offers you a certification that will be good for you, and Zend is the main company behind PHP. Let me remind you that Microsoft offers free certifications for their tools, and it doesn’t mean I’ll use them!

    ZF was one of the most horrible and stupid things i’ve ever studied in my life, worse than vb.net (and its 2-faced code)”

    Honestly I dont know what to do about this one… There are only 2 guys left.

    Hopefully someone can show me the way to go here..

    Best regards from Brasil,
    Felipe

  39. Hello Alex,

    Wonderful post. I started realizing something was afoot while watching (or trying to watch) the Zend Framework 2.0 webinars. It would have been nice if the complex stuff in Zend 2.0 was hidden where I didn’t have to see it. Ha ha ha.

    Over the past 4 days, I’ve played around with CodeIgniter which a friend recommended. I found it to be very similar to Zend, but perhaps a little more simple. I was successful in integrating both Smarty and Propel into CodeIgniter. Definitely take it for a test drive if you’re still experimenting with alternatives. I’m impressed so far.

    Take care,
    – Bret

  40. Great post. I’ve used ZF1 a lot, and I’ll probably still use it for a while, but I won’t even download ZF2. It’s a whole new framework, and way to complicated for my taste – to be honest, it seems that I’ll have to work more to achieve the same results… :/

  41. I guess I’m a little perplexed at all the people recommending symfony2. I’ve used both ZF and symfony (1), and so far my symfony2 experience has been pretty much exactly as you have described… you could just replace all instances of ‘ZF’ with ‘symfony2’ in your post and it would pretty accurately describe my experience.

    I feel like symfony *did* a whole lot of stuff for me. symfony2 *requires* a whole lot of stuff from me.

  42. To Felipe from Brasil,

    I’m sorry to hear you got so disappointed with ZF. It is always dangerous to base management decisions on what the whitepapers say. With certifications comes study. Study means investment. Personal investment of developers expressed in time an money. Therefor, ZF certified developers can be both rare, expensive and taken. It is possible however to teach developers how to use and like Zend Framework. If you want me to help you, send me an e-mail, I will be available after the summer.

    ZendStudio is a whole different story. I used to like the product a quite a bit until it wouldn’t start up anymore after an automatic update (on a Mac for crying out loud). I then switched to PHPStorm from jetbrains. I do not regret the switch, although, like with any change, it takes time to learn how to use new tools and to become really familiar with them.

    The same goes for ZF 2. It takes time to get used to a new way of thinking. It is a new product if you compare it to ZF 1, so it takes new investments in time and money to get to know it.

  43. Hello,

    I just wanted to point out to you and others that a large number of your complaints are no longer relevant with the latest ZF2 master. At the time that you wrote this, plenty of people within the community shared many of your complaints, and have since worked to resolve them.

    Cheers,
    Evan Coury

  44. “I so want to be interested in ZF2, but it’s about as far up the corporate enterprise architecture-astronaut ladder as I have ever seen PHP climb.”

    I fully agree with that!! I’ve looked at ZF2 and so want it to be the next step up in my development but there is SO much to learn just generally and your article makes me wonder if its really worth it??

    I am hoping that over time a) tutorials will really open ZF2 up and b) the new manual will amply cover over concerns. I’m a PHP up developer (rather than say a C > PHP) and namespaces, DI, class maps etc etc are very new for me!

    Perhaps its the end of Zend for me … I just can’t do it though!

  45. Thx for the post Alex. I have been using ZF since v0.2 and it has met our enterprise needs quite well, but I am very hesitant about ZF2 for many of the same reasons. Too most (if not all) of the microframeworks use PDO. We are on Oracle and pdo_oci rots.

  46. Completely agree. I took both ZF1 online courses at zend.com (those are VERY expensive by the way) and now I’m left to dry as almost nothing I learned can be used in ZF2. And also Zend won’t even give you a discount even after having dropped a couple grand a year ago to pay for their ZF1 course.

    I completely admire the lead people behind ZF2, I totally do. But I think that by “over intellectualizing” their framework they just basically left out not only the average framework user but even advanced programmers. There are so many advanced and complex concepts behind ZF2 that you need a freaking PhD to even start to configure it.

    I love ZF1 and have been using it in many projects and can very well say that I have stretched it’s possibilities by customizing the heck out of it. I’ve done sites that handled millions of hits per day, I’ve done CLI applications, etc, etc. But I’ve played around with the skeleton app and to me it felt like I had to learn everything from scratch.

    Definitely not liking ZF2. And I’m dreading the months I’m going to have to invest in it to learn it.

  47. I couldn’t have put it better. This sums up what I’ve been thinking about ZF for about 5 years now.

    I’ve briefly tried Yii, but it’s almost the opposite in terms of modularity. ZF is very modular, but takes it too far. Yii, for me, is far too tightly coupled and logically coherent to be useful in real world situations.

    Symfony, well, it has a nice sheen to it. I’ve actually wanted to like it, but it’s too much like someone took the ZF, limited it’s component set, gave them odd names and rearranged them so that you would scratch your head when you look at the code wondering why it was done the way it was. There are good parts to it – such as the view component, and I love Twig – but it’s too hipster for me and I really don’t think it’s written that well.

    I throw up in my mouth every time I look at Codeigniter and Kohana. I just can’t stomach them.

    The worst part about all these is that they try and do everything even the smallest really aren’t very focused. They’re jacks of all trades, but masters of none. Not only that, some don’t give you just a couple of really good ways to do something, they’ll give you 20. For companies with more than a few developers this actually is not a good thing.

    I spend less time hand-picking the libraries I need and setting them up than I do picking one large framework and getting it all set up. People may say that using a big name gives you access to more developers that can hit the ground running. I say that’s BS. I say find a developer that can read code and who understands best practices. They’ll hit the ground running just as quick and be a better investment in the long run. I say this from experience.

    For what it’s worth, most of this is just my take on things. If someone doesn’t like it, I really don’t care.

    If you really want to know, I wrote EuropaPHP (http://github.com/treshugart/EuropaPHP). If you didn’t, well, sorry. There’s only a handful of people using it, but maybe that’s a good thing. I am not the smartest person in the world, but I’m no dumbass and I really think it could help some of you out there.

  48. I think this article brought up some legit criticisms, but it might have been a little premature. At this point, ZF2 is now on Beta 5. There are many parts of this article that seemed to address ZF2 as a finished product. Five months later, we are now starting to see RC1 on the horizon.

    For example, Zend\Di has largely been replaced with the service manager. Zend\Di is still available, but it’s not mandatory. Additionally, from what I’ve read on the ZF community forums, the skeleton application will be expanded to include examples of other ZF2 features like Zend\Navigation before the stable version is released.

    With that said, I still haven’t bought into the ZF2 concept of modules. I liked the ZF1 approach a million times better. As far as configuration, I both agree and disagree. In my experience, there is more up front configuration, but with less to do at the controller level. There’s also a global configuration that automate some of this.

    Anyway, I’d be interested in seeing another article when we get closer to RC/final. I think you’ve presented an interesting take on the topic.

Leave a Reply