Skip to content

Instantly share code, notes, and snippets.

@weierophinney
Created March 3, 2016 13:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save weierophinney/8a63e8ca27106abfcb36 to your computer and use it in GitHub Desktop.
Save weierophinney/8a63e8ca27106abfcb36 to your computer and use it in GitHub Desktop.
Response to twitter comments

I received this comment on twitter earlier today, in response to zendframework/zend-mvc#89 (comment)

"recommended for literally years developers not [lazy load]" - official Zend certification taught it depends on situation!

To this, I have two responses.

When was the certification created?

The certification was created within the first year of the first ZF2 stable release, and is current to ZF 2.2.0. That release was almost three years ago, and, at the time, we were still figuring out what the best practices should be.

The certification exam and study materials are correct for the version of ZF2 they target.

By the time we released 2.3.0, we were already seeing the problems that ServiceLocatorAwareInterface creates, and introduced lazy services and delegator services to the zend-servicemanager component to help direct developers to better practices.

A new major version

The changes in zend-mvc 2.7 are to help developers migrate to a new major version. In this case, the certfication exam and study materials, which, again, target version 2.2 and earlier, simply do not apply.

Summary

I stand by my original comment. The community review team, trainers, and professional users have been weighing in on this matter for literally years, and we have even updated our tutorial to detail injection. Apigility has generated factories from the very beginning, encouraging developers to inject all dependencies. It's time for the framework to make that the default way to do things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment