Archive for the ‘Around the web’ Category

Chris Hartjes: Zend_Application and Zend_Acl

Chris Hartjes has written a new article on implementing ACL within a Zend Framework application:

When I try to implement something, my first question is no longer “how will I do this” but “where the hell should I put this code?”. In my case, the problem I was attempting to solve was “how do I implement ACL for one module in my application?”.

He then goes on to show to to implement a custom Zend_Acl extended class and how to use it in the init() method of a controller.

Posted by Rob on 18th August 2010 under Around the web | Comments Off

Nick Belhomme: PHP 5.3.3 Namespaces

Usually I only point out interesting Zend Framework articles, but with ZF 2.0 requiring PHP 5.3 and using namespaces extensively, I thought this would be useful.A few days ago, Nick Belhomme has posted a good introductory article on PHP 5.3′s namespaces.

I really feel it is time that php developers are taking namespaces seriously. If you don’t I guarantee you will be out of a job within five years. Namespaces are a fundamental part of the future of PHP.

He goes through how to use namespace and provides the source code to a small project that demonstrates the concepts and then provides a detailed look at the code so that you should have a good grasp by the end of the article.

Go and read it now!

Posted by Rob on 28th July 2010 under Around the web | 1 Comment »

Andrei Gabreanu: Zend Framework Tutorial Series

Andrei Gabreanu is writing a multi-part tutorial series on Zend Framework that will develop an application with ZF 1.10.

These are a series of tutorials which are meant to show you or guide you through developing a complex application with Zend Framework 1.10.

The series consists of the following parts:

  1. Setting up a module based application
  2. Setting up helper plugins, methods & debugging with ZFDebug
  3. Setting up a login page and signup page with captcha
  4. Setting up OpenID to login/create account
  5. Setting up an API to create/login an account
  6. Improving performance implementing Zend Cache

At the time of writing, he has got as far as part 3 and it’s well worth a read.

Posted by Rob on 15th July 2010 under Around the web | Comments Off

ZF2: Survey on ACRONYM casing or MixedCasing

There’s been a discussion on the Zend Framework mailing lists about how to capitalise acronyms when used in class names.

i.e. Zend\PDF or Zend\Pdf; Zend\XMLRPC or Zend\XmlRpc?

Matthew and the ZF team have decided that this issue needs to be sorted and so he posted recently:

Our team is at a point where we actually think the important thing is to simply have a rule. As such, we’re leaving it up to you, our users, to decide.

Simply fill out this form:

http://short.ie/zf-acrocase

We’ll close it in a week or so, and use the decision from that form to determine how to proceed. We even promise to publicly export the results, in the interest of transparency. :)

So, help choose the direction of ZF2 today!

So, if you use Zend Framework, please take the time to answer the question!

Posted by Rob on 11th July 2010 under Around the web | 3 Comments »

Remi Woler: Automating form creation with Zend_PDF

Remi has posted a new article on how to automate form creation with Zend_PDF.

After some digging around, I settled on a work-flow where I would create a PDF of an empty form once, use that as a template and use Zend_Pdf to ‘paste’ the text on top of it, saving the end result as a new PDF. Read on for a description of how I achieved this.

He then goes on to show with code samples exactly how to load up a template PDF file into a Zend_PDF instance and then add your own text at specific locations and finally save to a new PDF file.

It’s well worth a read.

Posted by Rob on 17th June 2010 under Around the web | Comments Off

Zend Framework 2 development starting in earnest!

The git repository for Zend Framework 2.0 is now available at http://git.zendframework.com/.

Matthew posted the following to the ZF contributors mailing list:

the Git repository is now created and ready to clone.

You can do so using the following:

   git clone git://git.zendframework.com/zf.git

For right now, we ask that you issue pull requests to myself, Ralph, or Alex; you can do so using the zf-contributors mailing list, or direct contact; whatever works best for you. When you do so, either do so by using “git send-email” or indicating the URL of your repository and the branch and/or revisions to pull.

If you want your changes pulled you also need to ensure that the user.email configuration in your clone matches the email address with which you are registered in JIRA. You can find full details here:

   http://short.ie/zf2-git-readme

If you want to track commits, you have three methods:

  • viewgit: http://git.zendframework.com/?a=summary&p=zf
  • RSS feed: http://git.zendframework.com/feeds/master.xml
  • Email: send an email to zf-git-subscribe@lists.zend.com

We have a few TODOs left open with the Git repository:

  • Establishing a mirror on Github. I have a request in to the folks at Github currently, and hope we can make some arrangement very soon.
  • Establishing a read-only SVN repository mirroring ZF2 development
  • Establishing methodologies around including ZF2 in your Git projects. I have some ideas on this, and have one tested approach ready to implement if I can’t find something simpler. Until the MVC is migrated to namespaces, however, this is not as imperative.
  • Splitting out the documentation into a separate repo (will make it potentially possible to license docs separately, and thus ease contributions)

If you want to be involved, now is the time! For right now, we particularly encourage working on Service components (any that don’t get migrated to namespaces get axed, with a few exceptions), and non-MVC components (the MVC components still need to be migrated to namespaces, which is a task myself and my team will be doing over the next 2-3 weeks).

Ask around on the list or in IRC to find out who is working on what so you can collaborate, and start feeding us patches!

Thanks everyone for your input and patience over the past few months, and I look forward to your participation in ZF2 development!

Now’s the time to learn git and start looking over the code!

Update

The ZF2 repository is now mirroed on github here: http://github.com/zendframework/zf2

Posted by Rob on 4th June 2010 under Around the web | Comments Off

Chris Hartjes Blog: Testing Controllers Hiding Behind Zend_Auth

Chris Hartjes has written an article on how to test Zend Framework controllers which are protected by Zend_Auth.

I found quite a few examples on how to test a controller, using the $this->dispatch(‘/path/to/action’) method but found that I wasn’t getting redirected properly to the post-login page. I was passing proper credentials in and everything. Then finally after deciding to go back to basics and read up on just how to test Zend_Auth. After some swearing a few face-palms, I realized what I had been doing wrong.

The then goes on to explain how you should do it by ensuring that the unit test logs in via Zend_Auth and provides code to show how it all fits together.

Posted by Rob on 3rd June 2010 under Around the web | Comments Off

ZF and Doctrine 1 integration

Benjamin Eberlei posted some excellent news about Doctrine integration with Zend Framework to the mailing lists:

Hello everyone,

I completed a first version of Zend + Doctrine 1 integration today and want to share it with all you. Since currently the status on a 1.11 release is unclear I contacted all the contributors to various Doctrine-related components and combined them into a single release and wrote some documentation on all the different parts and how they relate to each other.

http://github.com/beberlei/zf-doctrine

The code is under the New BSD License. There is a comprehensive getting started guide shipped with the Github Project.

The following parts are included in this release:

  • Application Resource contributed by Matt Lurz
  • Dynamic Form Generation contributed by Jani Hartikainen
  • Paginator Adapter contributed by Matt Lurz and Juozas Kaziukenas
  • Zend Tool Provider and modular Zend Project Style Support

Thanks to all the contributors and various other people that contributed ideas and code.

For any feedback regarding this integration, you can use the issue tracker on Github.

This release depends on Doctrine 1.2.2 to allow model code-generation from YAML files that supports Zend Framework Modular projects and their directory structure.

Most of the current glue code out there is made obsolete by generating Models that follow the Zend Framework naming conventions, into Zend Framework models/ directories. Additionally there is also support for modular applications whose model classes should follow the PEAR naming schema.

Additionally the dynamic form support allows to create simple forms that allow to create and edit Doctrine_Record instances and their relations. This is a great help to rapidly prototype admin forms (however support for more complex forms is not yet included).

Since both projects are currently very focused on their 2.0 releases, this release aims to glue all the existing code for Doctrine 1.x and Zend Framework integration 1.x together, giving them a platform to flourish.

greetings,
Benjamin

If you’re interested in using Doctrine with Zend Framework, then this is the way forward.

Posted by Rob on 26th May 2010 under Around the web | 2 Comments »

Robert Basic: Honeypot for Zend Framework

Robert Basic has posted an article showing how to detect when an automated spam script has been used to complete and post a Zend_Form form.

I just hacked up a little code snippet based on Matthew’s Honeypot WordPress plugin. It’s basically just a Validator for a Zend Form element which is hidden from the user via CSS. Cause it’s hidden, users won’t see it, but spambots will, well, cause they are bots.

He supplies code for the validator and also shows how it can be used with a text element. Well worth a read and adding to your forms.

Posted by Rob on 21st April 2010 under Around the web | 5 Comments »

Christian Kirkegaard: Password confirmation using Zend Form and Validators

Christian Kirkegaard has posted an article on how to create a password confirmation validator for use with Zend_Form.

A while back i needed a password confirmation field for my users. I looked and found this neat little snippet. I cant remember who created it originally so i cant give credits to the person but its quite easy to use.

There are two code snippets: one for the validator itself and one showing how to use it in within a Zend_Form instance object.

Posted by Rob on 6th April 2010 under Around the web | Comments Off

« Prev - Next »