Tuesday, April 7. 2009Zend Framework 1.8 PREVIEW ReleaseBy the time you read this, the Zend Framework team will have released a preview release of 1.8.0. While the final release is scheduled for later this month, this release represents the hard work of many contributors and shows off a variety of powerful new components. If you're a Zend Framework user, you should give the preview release a spin, to see what it can do: One common criticism of Zend Framework is that it doesn't fulfill the traditional definition of a framework. One definition cited has been from TheFreeDictionary, and includes the following two potential matches: A structure for supporting or enclosing something else, especially a skeletal support used as the basis for something being constructed. A set of assumptions, concepts, values, and practices that constitutes a way of viewing reality. The argument is that ZF does not provide the "assumptions" or opinions on how an application should be built. However, this makes sense only if you buy into the idea that a framework should always follow the "convention over configuration" rule -- which we soundly reject with Zend Framework. Our opinion has always been that developers know best how their application should be built, and that ZF code should support the myriad uses to which they will put it. That said, with the addition of Zend_Application and Zend_Tool, Zend Framework now provides a comprehensive framework for its users that is opinionated and provides the flexibility for developers to impose whatever structure they need.
% zf create project foo and generate the skeleton for a new project in a directory named "foo", with the following structure: |-- application | |-- Bootstrap.php | |-- configs | | `-- application.ini | |-- controllers | | |-- ErrorController.php | | `-- IndexController.php | |-- models | `-- views | |-- helpers | `-- scripts | |-- error | | `-- error.phtml | `-- index | `-- index.phtml |-- library |-- public | |-- .htaccess | `-- index.php `-- tests |-- application | `-- bootstrap.php |-- library | `-- bootstrap.php `-- phpunit.xml In the future, we will be adding more support to this. A big kudos to Ralph Schindler for doing the heavy lifting on this project.
There are many other stories in this release:
A hearty thanks to all who have contributed so far in this release. Start testing it, and let us know what we can improve for the final 1.8 release later this month!
Posted by Matthew Weier O'Phinney
in PHP
at
22:27
| Comments (50)
| Trackback (1)
Defined tags for this entry: php, zend framework
Comments
Display comments as
(Linear | Threaded)
In my opinion 1.8 will be one of the most important releases for ZF yet. While it is great to give every developer the opportunity to set up the application his own way, providing a ready-to-go solution for bootstraping will ease the collaboration between developers. You no longer have to dig into the source code to find out how things work - when you know Zend_Application you are all set. I think I won't need to tell anybody about the usefulness of Zend_Tool.
I hope that Zend_Navigation doesn't get lost in all the news though. I know it from its Zym days and I really like the idea and implementation. You will need some kind of navigation on 99.99% of your websites, so give everyone the tools to handle that is one another huge step - give it a try! Hi,
Got one question, how resources are gonna be autoloaded ? Because this doesn't seems to work... This is from last function on main Bootstrap: $acl = new 'MyModule_Model_Acl($auth); Fatal error: Class 'MyModule_Model_Acl' not found in D:\_Work\site\application\Bootstrap.php on line 154 Would love to see this little one fixed .. *nudge nudge*:
http://framework.zend.com/issues/browse/ZF-6185 Great news Matthey. Can you tell me something about how and when Zend_Application and especially Zend_Tool will be incorporated into Zend Studio for Eclipse? Thanks!
Great news, surely going to take a spin.
Only waiting on some 'password protection' ability for Zend_Pdf though This sure is great stuff, Zend_Application and Zend_Navigation were really missing, the first thing I did when starting a new app was copying over the bootstrap which justs feels wrong.
Hope the issue I had with Zym_Navigation got fixed: if you had a custom default route (say, :section/:article) which all gets handled by Content module, the navigation would get confused which menu item was active (in my menu I change the :section part of the route). Anyway, looking forward to seeing ZF 1.8 final. I would like to see http://framework.zend.com/issues/browse/ZF-5163 fixed. It's really trivial to fix and more than just a minor bug IMHO.
Zend_Application_Bootstrap_IBootstrap, Zend_Application_Bootstrap_IResourceBootstrap, Zend_Application_Resource_IResource??
What naming conventions are those? Shouldn´t it be: Zend_Application_Bootstrap_Interface, Zend_Application_Bootstrap_Resource_Interface, Zend_Application_Resource_Interface? We're moving away from '_Interface' in preparation for namespaces in PHP 5.3. Having the final segment of the classname use that verbiage will cause headaches later, as Interface is a reserved word.
I'm trying to decide if we'll go with I[Name], [Name]Interface, or just good, plain old descriptive naming at this point; we'll have a decision before 1.8.0 GA goes out the door. Ah ok, thought it might have to do with 5.3+namespaces, but was surprised that Zend_Application seems to be the only/first component to embrace that style. I thought that all components would change to the new style at once when 5.3 is final and there would be a new major release of ZF for that.
I strongly dislike the direction of I[Name]. This would be a rather bad convention IMO. Are we to start naming our variables by type as well? a la: intFoo, strBar, ...
Please, please let it be [Name]Interface, or "just good, plain old descriptive naming." We're planning on following PEAR2 standards at this point. Those standards require plain old descriptive naming for interfaces and abstract classes -- though abstract classes may have a suffix of 'Abstract'. (Zend_Application in current trunk follows these conventions now.)
I'm so glad! Thanks for the follow-up. Keep up the great work!
#8.1.2.1.1
Stewart Lord
on
2009-04-26 13:47
(Reply)
And they are using _Base instead of _Abstract for the abstract classes as well.
One of the best things Zend has done was have a uniform naming convention in Zend Framework... I'd hate to see that die. It won't die.. it's just that everything will be rewritten at some point
Abstract is another protected keyword in PHP, and when we migrate to namespaces, this will also be problematic.
I will be firming up guidelines in the next two weeks for naming conventions of Interfaces and Abstract classes. In coming releases, we will be migrating to these conventions, while leaving the original classes/interfaces available. This will provide a gradual migration path as we prepare our 5.3 support. Matthew, please feel very much encouraged to bring your findings to the internals mailinglists. We should really update the current class naming guidelines in the manual and we might even implement some user and internal restrictions to "forcefully" guide people to prevent issues in their current and future code.
Lukas, yes, I plan to.
Don't wait too long. Especially if we need to make internal changes this needs to start happening sooner rather than later. Also there are a few bright minds on the list that might have a thing to say as well
Not yet, but likely it will be able to prior to the 1.8 GA release.
Not yet, but that functionality will be coming soon.
The release notes didn't mention Zend_Loader_Autoloader, which if I remember correctly was a dependency for Zend_Application.
It looks like Zend_Loader_Autoloader is in the tarball. I haven't tried it yet, is it usable in the Preview Release? Thanks, --Rob Yep, Zend_Loader_Autoloader and the resource autoloader are in the tarball, and completely tested and documented!
Speeding up ZF load time with resource autoloader:
If I followed things correctly, there was work to be done to speed up ZF load time by using the resource auto loader and removing many of the require_once() calls to allow for lazy loading only what is needed. Now that the resource (auto)loader is in 1.8, when is this work targeted for? Thanks, --Rob T. While the autoloader can help speed things up, it does best when you strip require_once calls from the library. Unfortunately, we cannot do that in a packaged release until 2.0, as current revisions do not require autoloading in order to work. In the meantime, the performance appendix provides instructions on how to do so, and they can easily be added to a deploy script.
I thought it might be 2.0. I did some quick searching for a 2.0 time-line or roadmap, but didn't find any.
Thanks, --Rob
#10.1.1.1.1
Rob T.
on
2009-04-10 12:23
(Reply)
Great news, thanks!
Do you have any porting notes you could share for those of us who might be migrating from pastebin/bugapps's My_Application and My_Application_Loader to Zend_Application? Thanks, --Rob I'm trying to play with Zend Tool, but it keeps throwing an Invalid Argument error when trying to run mkdir() on line 15 in Zend/Tool/Project/Provider/Project.php. I'm running on win and think that may have something to do with it. I've tried endless variations on the path name and still no luck. Any help? Also 'directory' is misspelled on line 18. This is probably not the best forum for this post, but I though I would throw it out there.
I experienced the same. I opened an issue report for it: http://framework.zend.com/issues/browse/ZF-6262
It works if you put the path name in the initial command (see the report for details). Thanks Glen. Looks like Ralph is on it, so we should have a fix for 1.8.
I've been so excited for this release! I have been checking the ZF homepage almost every day hoping that it has finally been released. Especially for Zend_Application and the resource autoloader for Modules...I can't wait! I will have to play around with the preview release.
Thanks for all your hard work...and your blog! You've helped me a lot! I finally managed to run my own Zend_Tool_Framework_Provider action, however currently its only able to preform generator actions on filesystem.
What about provider actions that can initialize current environment and obtain database access to perform database specific actions ? I've created my own implementation to that problem, but it's lame so I was hoping that ZF will solve that issue in a more elegant way. Do you have plans for such behaviour and if so when we can expect some preview release ? We have discussed this internally. Right now, we're looking at consuming Zend_Application within Zend_Tool_Project to grab DB connection details and setup the DB adapter. However, useful as this may be, we're not considering it a "must have" for the 1.8 release. Once we have figured it out, though, we will likely release the providers to drop into your library until they can appear in an official packaged release.
I am very happy to see zf moving forward!!
I was embarrassed that there is no mention of speed improvements. I thought this would be the main priority of future releases? Thinking of zf 2.0: will it be completely restructured to make use of php 5.3+ features (namespaces, functions, etc)? While we are keeping an eye on performance, it is not the main priority of our roadmap. The 1.8 release is focussing on rapid application development tooling -- Zend_Tool and Zend_Application -- which is a different kind of performance altogether.
ZF 2.0 will likely focus on PHP 5.3; to what extent, we haven't fully decided at this time. "which is a different kind of performance altogether."
Thanks, I am looking forward to it. Cool, this looks like a copy of the CakePHP structure and bake shell
Ralph, the lead on Zend_Tool, actually looked to a number of projects for inspiration, including Symfony, CakePHP, Rails and Django. There will likely be something familiar in the tool for people coming from many backgrounds.
Not sure how to report this so I'll put it here and those that know may be able to check if this is a bug and if so, has been reported:
I'm currently using ZF-1.7.3 and Zend_Date::now()->get('WEEKDAY') returns the correct day of the week (Wednesday) However when I change to using ZF-1.8.0PR the same command generates WWedK104613960002009 Jim:
The manual clearly states since before release 1.0 that you should use the constant Zend_Date::WEEKDAY. Zend_Date::now()->get(Zend_Date::WEEKDAY); Using the content of a constant is never a good idea as there could be reasons to change the content, but never to change the constant itself. In this case the date validator, and the date rendering did not work like described in the manual. This bugs have been fixed by changing the content of the contants like several times in past through the rest of the framework. I expect that you are using ISO notation so the given string should correctly be rendered to "W Weekday3Digit K DayOfYear SwatchTime Year4Digits". I would propose that you use Zend_Date like described in the manual, by using constants when you really want constants, and not by giving strings which would mean that you want to create your own format. Use Zend_Date::now()->toString('WEEKDAY') in 1.7.3 to see what I meant with bug in the rendering engine. Greeting Thomas Zend/Console.php ???
Zend_Console_Context_Interface&Zend_Build_Manifest not exists. Zend_Console was added for a previous incarnation of Zend_Tool; it's now removed from trunk. Thanks for bringing it to my attention!
Small bug in Zend_View_Helper_Json, $options is used in Zend_Json::encode but is only set if $keepLayouts is an array.
This is fixed in the repo already and will release with the GA release.
I'm eagerly anticipating the final release of 1.8. The one thing i liked about your post was that you clarified what a framework actually is and what it isn't. I too, was under the assumption that a framework should follow convention over configuration, but now have changed my mind.
When I attempted to setup the structure like done in the example above, I recieved the following error:
Fatal error: Class 'Zend_Controller_Action' not found in C:\wamp\www\ZendFramewo rk1.8.0\application\controllers\IndexController.php on line 3 The command I executed was: zf create project C:\wamp\www\ZendFramewo rk1.8.0\ Can anyon help me out? Any help would be GREATLY appreciated. - Moshe Add Comment
|
CalendarQuicksearchLinks
ArchivesCategoriesSyndicate This BlogShow tagged entries |






Zend Framewor 1.8 is almost ready and as such, it’s time for me to look into what it’s got. There’s a good listing of what’s new over here and really on the surface it doesn’t look like much. But as a person who’s be...
Tracked: Apr 18, 11:37