2010 February

PHPBuilder.com: Create a Unit Conversion Application w/the Zend_Measure Component

Jason Gilmor published on PHPBuilder.com new tutorial about creating unit conversion application using Zend_Measure component of Zend Framework.

Whether you’re trying to develop web applications with a truly global appeal, or you’re one of the roughly 300 million United States residents mired in a maddening cacophony of conflicting measurement standards, chances are you’ll need to regularly convert data from one standard to another. Of course, performing even relatively simple conversion calculations such as from pounds to kilograms from memory can be fairly difficult, let alone calculating more esoteric conversions such as from square meters to acres. To automate this conversion process, I used the Zend Framework to create a calculator capable of easily migrating data among the most commonly used formats. In this tutorial, I’ll show you how you can use the Zend Framework’s Zend_Measure component to create your own measurement-conversion calculator.

While creating simple page with “Cooking Conversion Calculator” he talks about typical problems with unit conversions and how Zend_Measure helps in making it simpler for developers.

by Wojciech Szela on February 18, 2010 in News, No Comments »
tags: ,

Adrian Schneider’ Blog: Testing Zend_Mail

When testing an application one not always needs exact replica of production environment. It’s good enough if you can plugin in yourself into specific level of application under test. In his recent post Adrian Schneider looks into using fake mail transport class to catch all e-mails being send and store them in the way testers can access them easily.

Zend has the ability to set a default mail transport class to be used when none is specified, which I’d imagine to be 99% of the time. [...] The alternative (for the 1% who want to manually specify), you’d simply pass an instance of your mail transport object to Zend_Mail::send() when you call it. What should your class contain? It has to extend Zend_Mail_Transport_Abstract, which at this time of writing this, will specifically need to override the abstract _sendMail() method. You can use it to create a new record in your database, create a file, or do whatever you need it to.

Adrian talks about other way of testing e-mail delivery in development/testing environment.

Adrian Schneider’s Blog: Caching Zend Framework Forms

On his blog Adrain Schneider shares his ideas about using Zend_Form component. In his first post he talks about typical use cases of the component – defining inputs, filtering, validation, using models and decorators.

I’m often asked what my favorite component of Zend Framework is, and I invariably answer: “Forms”. Forms have always played an awkward role in the model-view-controller paradigm. Sure, the form is just HTML, but to me, it represents something more abstract than that. It represents the HTML form itself, taking user input, normalizing and validating it, and also being able to show the form again when errors occur. This can take quite a large amount of code.

In the second post he presents his way of speeding up forms by introducing caching.

Generating a form is an expensive process in ZF. It’s always bugged me that I can’t find any resources on trying to cache the initial HTML anywhere, so I took a stab at it myself. I use a loader from inside my controller action to load forms and models, so I found that was a good place to start.

by Wojciech Szela on February 18, 2010 in News, No Comments »
tags: ,

February’s Zend Framework Bug Hunting Days have begun

Today fifth monthly Zend Framework Bug Hunting Days have begun. For those of you unfamiliar with the event, each month ZF team organizes the community to help reduce the number of open issues reported against the framework. If you want to participate, please read guide in the wiki and join #zftalk.dev channel at Freenode.

by Wojciech Szela on February 18, 2010 in News, No Comments »
tags:

Zend Framework 1.10.1 released

Last Wednesday Zend Framework 1.10.1 stable has been released. This is first maintenance release in 1.10 series. The release includes over 50 bugfixes (see changelog for details).

In addition, few feature has been added to online manual. Manual pages can be now commented, also by casual users.

by Wojciech Szela on February 12, 2010 in News, No Comments »
tags: ,