News Feed
Jobs Feed
Sections



Recent Jobs

News Archive
feed this:

Rob Allen's Blog:
One-to-Many Joins with Zend_Db_Table_Select
February 08, 2012 @ 09:28:20

Rob Allen has a tip for the Zend Framework users out there using the Zend_Db module to connect to their database resources - how to do a one to many join with the help of Zend_Db_Table_Select (easier than it sounds).

Let's say that you want to set up a one-to-many relationship between two tables: Artists and Albums because you've refactored my ZF1 tutorial. [...] Assuming you're using Zend_Db_Table, the easiest way is to turn off the integrity check and do a join in a mapper or table method.

He includes a few lines of source to illustrate, calling the "setIntegrityCheck" value to "false" to tell ZF not to worry about the additional join value over to the artists table. The result is a new column value with the artist's name instead of just the ID.

0 comments voice your opinion now!
onetomany database table join zendframework zenddb component



Mayflower Blog:
Zend Framework Application.ini Cheat Sheet
February 06, 2012 @ 11:42:22

On the Mayflower blog today there's a new post sharing a Zend Framework application.ini "cheat sheet" with links to pages in the ZF manual explaining the details about each of the front controller options.

All this is long gone in the past since the introduction of Zend_Application and the bootstrapping resource adapters. Zend introduced a standard bootstrapping mechanism into their framework. Many of the options from different framework components can now be configured in the applications configuration file application.ini. One problem persists although: the documentation. All the parameters for components like View, Session, Database etc. are documented either with the bootstrap resource, the component itself or both.

They've posted it to github complete with sections detailing:

  • CacheManager
  • Db
  • FrontController
  • Layout
  • Navigation
  • Router
  • Translate

...and quite a few more. This is a great reference for anyone using the Zend Framework, no matter your experience level.

0 comments voice your opinion now!
zendframework applicationini cheatsheet configuration reference


Ade Slade's Blog:
Integrating Zend Framework 1 and Pimple
January 18, 2012 @ 13:11:56

In this new post to his blog Ade Slade shows how to integrate the Pimple lightweight dependency injection container with a Zend Framework application.

This post will describe a way to integrate Zend Framework 1 and Pimple. A complete working version of the code is available on github. Thankfully, Zend Framework 2 features its own Dependency Injection Container. Happy days. Still, if you're not prepared to wait, you may find this useful.

He shows how to add a resource plugin into the Pimple container - an entity manager that's part of Doctrine. He creates his controller, pulling the manager from the Pimple container and includes a unit test for the controller too (using PHPUnit, but he also suggests Mockery).

0 comments voice your opinion now!
zendframework pimple dependencyinjection container tutorial doctrine entitymanager


NetTuts.com:
Zend Framework from Scratch - Models and Integrating Doctrine ORM
January 13, 2012 @ 10:58:00

NetTuts.com has posted a second tutorial in their series focusing on the Zend Framework today. In this latest article they focus on integrating the powerful Doctrine ORM with a Zend Framework application.

Ready to take your PHP skills to the next level? In this new "From Scratch" series, we'll focus exclusively on Zend Framework, a full-stack PHP framework created by Zend Technologies. This second tutorial on our series is entitled "Models and Integrating Doctrine ORM".

They continue on from their previous tutorial to talk about what models are (with an example involving "bankers"). They also show how to use the Zend Framework "zf" command line tool to configure your database settings, set up the tables and download/bootstrap the Doctrine code. The include the code to create some simple models and how to use them to create and update records in your database. You can grab all of the sample code for their examples from The Next Social's github repository.

0 comments voice your opinion now!
zendframework doctrine model integration tutorial


PHPMaster.com:
ClamAV as a Validation Filter in Zend Framework
January 09, 2012 @ 12:20:48

New on PHPMaster.com there's a tutorial showing you how to use ClamAV support to work as a validation filter in a Zend Framework application. ClamAV is an open source project that helps identify malicious threats like trojeans, viruses and malware.

Ok, so you're pretty comfortable with using the Zend Framework, specifically the use of Forms. Along with that, you have a good working knowledge of how to combine a host of standard validators [...] but what do you do when a situation arises that's outside the scope of the pre-packaged validators and filters? Let's say you want to guard against users uploading files that contain viruses, for example. You would have to write a custom validator that checks the uploads aren't infected.

You'll need to install the ClamAV extension on your loal machine for the feature to work. Once it's there, though, it's as simple as setting up the validator (based on Zend_Validate_Abstract) and calling the "cl_scanfile" method on the uploaded file. Also included is the code for a sample controller with a Zend_Form instance and an upload file field to help prove it's working.

0 comments voice your opinion now!
zendframework validation clamav filter virus malware tutorial


Michaelangelo van Dam' Blog:
Configuring Zend Framework apps for Windows Azure
December 19, 2011 @ 08:50:51

Michelangelo van Dam is back with the second part of his series looking at running PHP applications on Azure (the first part Zend Framework.

Building web applications is nothing new anymore, as we've been doing it since the early days of the internet, but we've always done this on a single system. Even when Zend Framework came round, we kept doing the same thing and build apps for a single environment. But as I've discussed already in my previous article, developing for the cloud requires another approach. [...] With Zend Framework developing applications running on these separate compontents becomes really easy. It's like having your cloud toolbox right in your pocket.

He walks you through the settings needed to interact with a MySQL database backend, setting up sessions to write to the database, caching information to a memcache server and storing files on a remote destination (in this case cloud storage).

0 comments voice your opinion now!
windows azure zendframework application configure tutorial


Joshua Thijssen's Blog:
Compatible code starting with symfony2
December 02, 2011 @ 09:22:42

In a new post to his blog, Joshua Thijssen documents some of his first steps into the world of the Symfony2 framework (as a developer who has lived mostly in a Zend Framework/CodeIgniter world). His post doesn't compare the frameworks, it's just his discovery along the way.

A friend of mine who is a big supporter of Symfony told me to give Symfony1 a shot. Off course I was skeptical since I knew less about symfony1 than I did on Zend_Tool. That, plus the fact we needed to autoload, bootstrap and get two frameworks up and running simultaneously. What could possibly go wrong! Conclusion: I've got my tool up and running about a 45 minutes later...

He talks about the process he went through to download, setup and configure the framework and start using a "task" to create a simple executable script. He also briefly compares Symfony1 to Symfony2, noting that SF2 is a bit more "out-out-of-the-box friendly" than SF1. The overall experience was a positive one, though. You can find out more about Symfony1 here and Symfony2 here.

0 comments voice your opinion now!
symfony1 symfony2 symfony framework experience zendframework


Karsten Deubert's Blog:
Zend_MVC, Controller Plugins and Annotations
November 28, 2011 @ 12:02:50

Karsten Deubert has a recent post to his blog looking at annotations in Zend Framework applications to enhance functionality already in the framework.

Recently I had the idea to influence Controller Actions with annotations but discarded it with thoughts like "In PHP I will have to use reflection and some black magic to get this working which will have insane performance hits for my applications"... until I set everything up to see that it costs just 1-2ms in average per request without any form of caching.

He includes a few bits of code to show a simple annotation example (setting a layout) and the controller plugin that performs the translation. In his case, it's hard-coded to look for the "@layout" annotation in the docblock comment, but it'd be relatively trivial to extend it to a more full-featured version.

0 comments voice your opinion now!
zendframework mvc controller annotations docblock comment plugin


PHPBuilder.com:
Building RESTful Web Services with the Zend Framework
November 11, 2011 @ 11:37:45

New on PHPBuilder.com today is a tutorial introducing you to web services with the Zend Framework, a guide to creating a simple RESTful service with this popular PHP framework.

Rather than attempt to build and maintain multiple versions of the Web application in order to accommodate the diverse array of challenges and advantages presented by each device type, developers are increasingly embracing a unified approach which allows them to manage a single server-side code base which communicates with multiple client-specific interfaces by way of a RESTful Web service. The Zend Framework's Zend_Rest component offers PHP developers with an incredibly straightforward approach to building RESTful Web services.

He shows how to set up some internal RESTful routing (with the help of Zend_Rest_Route) and create a simple controller that responds to several of the major HTTP request types - POST, GET, PUT, etc. In his simple example, he shows how to update a basic TODO list with a POST and the JSON response that would follow.

0 comments voice your opinion now!
restful webservice zendframework routing tutorial controller


NetTuts.com:
Zend Framework from Scratch
November 03, 2011 @ 08:50:39

On NetTuts.com today there's a new tutorial helping you get started with Zend Framework "from scratch". They outline the full process - from download to the creation of a first application.

Ready to take your PHP skills to the next level? In this new "From Scratch" series, we'll focus exclusively on Zend Framework, a full-stack PHP framework created by Zend Technologies. First in our tutorial series, is "Getting Started with Zend Framework."

The tutorial (executed in a Windows environment) is broken up into seven parts:

  • Download Zend Framework
  • Set up your Zend Framework Environment
  • Create your First Zend Framework Project
  • Learn about Zend Framework's MVC Structure
  • Pass Data From a Controller to its View
  • Create a Layout in Zend Framework
  • Create New Controllers and Actions

They use the Windows version of Apache to host the site (installation instructions not included). If you'd like to get the source for this tutorial series as it evolves, you can find it on github.

0 comments voice your opinion now!
zendframework tutorial beginner introduction project apache



Community Events





Don't see your event here?
Let us know!


introduction community custom language application opinion api phpunit framework unittest podcast series test database interview conference component release development symfony2

All content copyright, 2012 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework