Archive for the ‘zend framework’ Category

We are in the process of upgrading all of our hosted sites and codebases to Zend Framework 1.8.1. If you are a developer please be sure to update your local copy of the Framework.

Zend released version 1.8 of the Zend Framework around the first of May. Sononaco is upgrading the Zend Framework running on all of our servers. There are several notable changes to the code but there is one issue that needs to be immediately addressed: the Autoloader.

Beginning today (May 13th) we will begin upgrading the Framework on our staging/testing server, (at 66.240.223.252) and our Zend Server. All Zend Server sites have been upgraded to use the 1.8.1 bootstrapper. All site on the “dev” server include any site with the domain name beginning with “dev” or “staging”.

How does this impact you? Unless you ar a developer, not much at all. If you are one of the developers using the Zend Framework then you will need to do a couple of things:

First, update your local working copy of the site. Effective immediately all Application codebases in Subversion should contain the code for the 1.8 Framework. The 1.8.x Bootstrapper code is not compatible with versions of Zend Framework older than 1.8.x!!

If you run the new Application code against the 1.7.x Framework you will see errors so be sure to upgrade your local Framework to 1.8.x.

For the moment we are not upgrading existing bootstrapers or Application layouts to the new Zend_Application_Boostrapper. All projects going forward will contain the new Bootstrapper system.

You can download version 1.8.x of the Zend Framework here.

13 May 2009

Sononaco Upgrading Zend Framework to version 1.8

Author: keith | Filed under: zend framework

Jim Plush at Panasonic has published an excellent article on why his company went with the Zend Framework for his enterprise applications. Sononaco is in a similar situation as Jim: we build all kinds of sites of all sizes for all types of clients.

We like to think of ourselves growing along with the language. All of our developers started out embedding PHP inside HTML documents. As PHP started becoming more object-oriented we moved on to writing classes and functions. We have developed and modified other packages such as Serendipity, WordPress, Drupal and Joomla, just to name a few.

The move to Zend Framework is not limited to the developer’s perspective. We consider the benefits it brings the client and the user on the front-end as well. Easy search-engine friendly path navigation, integration with external services (YouTube, Twitter, All Things Google) and the fact that you can integrate any JavaScript Framework (we were big MooTools fans) are primary reasons we promote the Zend Framework to our clients. The speed we can develop an application and the ease of updating the Zend Framework on servers are bonus for our developers.

2 Apr 2009

Zend Framework in Enterprise

Author: keith | Filed under: zend framework

For the uninitiated, NGP Software is an excellent online tool for campaigns to help them raise money and manage constituents. They have an excellent set of APIs for submitting contributions, newsletter sign-ups and volunteer information. The problem is their APIs are mostly targeted toward Windows/ASP development. For what it’s worth, they do include an example using JavaScript.

The NGP folks have created a plugin for Drupal that integrates directly into the CMS. I tried installing it on a clean Drupal install and it didn’t work, giving SOAP errors.

Rather than reverse engineering the Drupal plugin I stripped out the basic pieces and put them together to work within the Zend Framework.

We don’t even use SOAP for this call, simply the Zend_Http_Client class.

The following are assumed:

1. You have received a valid form (using Zend_Form, of course).

2. Are a client of NGP or have a client login.

3. The CWP is set up on the site and you have generated your Credentials string.

4. You are using Zend Framework 1.7 or higher.

5. The $data[] array are reflections of the Zend_Form elements.

This would be the “process code.” Be sure to run a “convert to ASCII” code on the code block below, since WordPress like curlify-ing quotes.


$data = $this->_request->getPost();

$xml ='<VolunteerSignUp>';
$xml.='<ContactInfo>';
$xml.='<LastName>'.trim(urlencode($data['lastname'])).'</LastName>';
$xml.='<FirstName>'.trim(urlencode($data['firstname'])).'</FirstName>';
$xml.='<Address1>'.trim(urlencode($data['address1'])).'</Address1>';
$xml.='<Address2>'.trim(urlencode($data['address2'])).'</Address2>';
$xml.='<City>'.trim(urlencode($data['city'])).'</City>';
$xml.='<State>'.trim(urlencode($data['state'])).'</State>';
$xml.='<Zip>'.trim(urlencode($data['zip'])).'</Zip>';
$xml.='<Email>'.trim(urlencode($data['email'])).'</Email>';
$xml.='<HomePhone>'.trim(urlencode($data['phone'])).'</HomePhone>';
$xml.='</ContactInfo>';
$xml.='</VolunteerSignUp>';
$post='Credentials={YOUR_AS-IS_CWP_CREDENTIALS_STRING}&data='.$xml;

$client = new Zend_Http_Client("https://services.myngp.com/ngponlineservices/VolunteerSignUpService.asmx/VolunteerSignUp");
$response = $client->setRawData($post, 'application/x-www-form-urlencoded')->request('POST');

A bit later I will be posting the Zend Framework code used for the contribution and newsletter sign ups.