Archive for the ‘Around the web’ Category

Zend Framework and Doctrine

Juozas Kaziukėnas has posted the first part of a series about Zend Framework and Doctrine:

After evaluating possible solutions I decided to stay with Doctrine for a long time. I don’t know any other solution coming, I definitely don’t want (mainly because I don’t have time) to invest on creating my own library and Doctrine is simply awesome when you get used to it. After all this time I can say that it was a right call – Doctrine is on a way to being officially supported in Zend Framework

He then goes on to talk about the benefits of Doctrine and why it can save time. Well worth a read and following the rest of the series.

Posted by Rob on 16th November 2009 under Around the web | Comments Off

Action Delegates

There’s an interesting post over on the mrBurly blog about using action delegates to avoid having duplicate controllers.

One weekend after two years of working with the Zend Framework I threw together a basic application by perfecting one LIST/CRUD controller and then performing your standard copy/paste grepWin replace to create 4 others from it. I may have sensed a better way before that day, but on that day it was obvious that a better way existed. That “better” way in my opinion is the… Delegation Pattern

Definitely well worth having a read.

Posted by Rob on 3rd November 2009 under Around the web | Comments Off

New Filters for ZF 1.10

Thomas Weidner has recently blogged about two new filters coming to Zend Framework 1.10:

As you’d expect ZendFilterCompress and its counterpart ZendFilterDecompress handle compression and decompression from a number of formats including bzip2, gzip, zip and tar. Usefully the format support is via adapters so more can be added.

ZendFilterPostcode is locale aware and can validate the format of postcodes from around 150 different countries. I don’t know about you, but building the regex for postcode handling is tedious at best, so this will be a very useful component for me at least!

Full details on how to use these new filters are on Thomas’ site.

Posted by Rob on 20th September 2009 under Around the web | Comments Off

Rate limit component for login forms

Tom Graham has recently posted about a component that he’s written that notices when a login form is being brute forced and then adds a captcha element to the form. I really like this idea as it doesn’t inconvenience genuine users at all.

In his own words:

The easiest method of preventing such attacks is to implement some kind of rate limit. Twitter now does this on their login form by adding a CAPTCHA that the user must solve after a number of failed login attempts. The theory behind this is that even if the attacker does manually solve the CAPTCHA it would sufficiently slow them down to make the brute force method unfeasible.

I had been doing a similar thing in one of my applications for some time, and eventually decided to move my code into a re-usable component.

He goes on to explain how to use it and how it works and has published the code on github.

I highly recommend checking it out.

Posted by Rob on 8th September 2009 under Around the web | Comments Off

Email validation messages

Thomas Weidner has posted an article about how to set your own validation messages when validating emails.

It turns out that it’s quite tricky to do as ZendValidateEmailAddress uses ZendValidateHostname behind the scenes. He documents how it will be much easier to do in ZF 1.10:

I added a new feature which is available as with Zend Framework 1.10. With it you can set hostname messages from within the email validator… the above code can then be simplified to:
$validator = new Zend_Validate_EmailAddress();
$validator->setMessages(
    array(
        Zend_Validate_Hostname::UNKNOWN_TLD => 'I don't know your TLD',
        Zend_Validate_Hostname::INVALID_HOSTNAME => 'I don't know your hostname'
        Zend_Validate_EmailAddress::INVALID => 'Are you sure this is a email address?'
    )

Very useful stuff.

Posted by Rob on 9th August 2009 under Around the web | Comments Off

Zend Framework and the Dojo dijit editor

Jason Houle has posted an article on how to use Dojo’s digit.Editor WYSIWYG editor with Zend Framework.

In one of my current projects, AircraftConnection.com, I decided to use the dijit.Editor WYSIWYG editor in my user’s forms. I ran into a few problems and could not find much documentation on the topic.
  1. I wanted the label, description, and field in a different order.
  2. I wanted the data entered into the editor to actually be passed to the server when the form was submitted.
  3. I wanted to pre-populate the form with data the user had previously entered.

He shows how to extend Zend_Dojo_Form_Element_Editor to provide a customised set to decorators and then goes on to show to to use it within a Zend Framework MVC application.

Check it out!

Posted by Rob on 22nd July 2009 under Around the web | Comments Off

Zend Framework tutorial on YouTube

Alexander Romanenko has recently posted a Zend Framework tutorial video on YouTube.

If learning visually is your thing, then check it out!

Posted by Rob on 6th July 2009 under Around the web | 1 Comment »

Secure login with Zend Framework

Enrico Zimuel has posted an article on how to build a secure login with Zend Framework:

After a long pause i’m come back on my blog with a post about the development of a secure web login system in PHP with the use of Zend Framework. The issue to build a login system in a web application is quite common. The security aspect of a login system is absolutely important and in this post i have summarized some of the main security points. Of course this is not the final solution but, in my opinion, is a good point of start for PHP developers.

He goes on to show all the key steps required including the use of ZendFormElement_Hash to help secure against CSRF attacks.

All in all a good read and Zend Framework 1.8 compatible too :)

Posted by Rob on 4th July 2009 under Around the web | 2 Comments »

PHP 5.3 is released!

It’s happened! PHP 5.3 has been released. This version was a long time coming and as such has lots of new features and bug fixes.

The key new features for me are:

There is a migration guide available, but you should also check out Cal Evans’ migration notes over at TechPortal too.

You can download it directly now, or wait for your favourite distribution to package it for you soon!

Posted by Rob on 30th June 2009 under Around the web & News | Comments Off

Registering front controller plugins in Zend Framework 1.8

Wenbert Del Rosario has posted an article on how to register a front controller plugin using Zend Framework 1.8.

With ZF 1.8, we can now use the application.ini file and he shows the format of the lines required, along with setting it up so that you use your own name space.

Posted by Rob on 20th June 2009 under Around the web | Comments Off

« Prev - Next »