Thursday, December 10, 2009

Holiday Queues

Its that time of year again, Holiday’s are coming fast, and for me and other geeks we get to play with some new gadgets that we couldn’t get to all year. In the office I also use this time of year to try new things and experiment a bit because the last week in December and early January is usually a perfect time to do this for me. There’ve been some major new releases of OSS apps that I am planning to install and work with ontop of Zend Server in 2010. As my regular readers know, in the past I have already written about Zend Server and how it can significantly improve performance and identify problems in some popular OSS apps like Drupal, Joomla, Wordpress, SugarCRM and Magento.

At the holiday break I will take the latest beta released versions of phpBB 3.0x & Magento 1.4x and experiment with Zend Server’s Job Queue. When you work on a PHP project from scratch its easy to implement new capabilities, but with existing code bases like phpBB and Magento there seemed to be some very obvious places to use Job Queue and enhance performance. If you’re not familiar with Queueing, we had a good webinar this past month from Shahar the lead engineer on this. For places in the project with long-running tasks, such as order processing, catalog importing/exporting, content indexing or sending an email just to name a few obvious ones. These tasks can unnecessarily load your web server and increase application response times for the end user because the processes are sequential. Zend Server 5 beta features Job Queue support, enabling you to offload the execution of such tasks to a parallel request, or even to a different server when needed. I’m going to keep it simple and parallelize a lot of long running tasks in these projects. We have a draft of the API online already, you can find the whitepaper here for Job Queue if you want to experiment along with me.

As far as getting ready for the holiday’s, I’m am still having a hard time finding one last gift for my young nephew (who I know will be an aspiring developer/entrepreneur some day), I wanted to get him a collection of stuffed Open Source mascots as inspiration when he gets older. I already have the uber rare Mozilla, ElePHPant, Tux, but am missing and cant find a Mysql Sakila dolphin but I know some folks have a bunch like this guy in the photo, so am willing to trade PHP Elephpants for one or two and complete my stuffed animal LAMP stack. Contact me if you have any spare ones, and have a happy holiday.

Thursday, November 12, 2009

PHP at Government Open Source Conference 2009

I attended the first GOSCON 2009 (Government Open Source CONference) in DC last week and learned a lot about the government’s use of open source software (OSS). There were two major announcements at the conference, first by the DoD and the second by the White House.

The keynote with DoD CIO David Wennergren was the most anticipated event for most at this conference as his talk was about the newly released DoD guidance document that clarifies the use of open source software at the agency (and is also considered a template for all the rest.)

To quickly sum it up for anyone who missed his talk, he reiterated current federal law, which states Government agencies HAVE to look at commercial items [when building out new capabilities] and that open source is considered commercial software also. So a tip to all of us in OSS land, when dealing with the government agencies, if the agency you are working with already knows how to budget and procure commercial software today, then the procedures are the very same for agency projects that want to use open source software.” It’s that simple! then he went into specific examples in the DoD.

A lot of newspaper articles were written about how this will revolutionize the software landscape in Government, but I would argue that the revolution is already underway as most progressive government agencies are already using open source software. Though I would also say that this document will make OSS use more common place now as many in the room seemed to struggle with licensing and procurement in the past (based on the questions being asked at the conference it was just as much about OSS and the services for the project.) This memo clarifies a lot of misunderstandings within DoD (and the government) on how and when open source software can be implemented. This evens the playing field because it says open source solutions should be allowed to compete when the department is implementing a major system.

Did we really need a memo that reiterates what most enterprises have already discovered: open source saves money, is scalable, secure, and easy to adapt? Not for the early government adopters like the White House. The other big presentation at GOSCON was about the switching its site to use open source software PHP and Drupal. For many of you who have been following my blog articles, back in February I had an article about “The most Tech Savvy use of OSS in Government” and that distinction went to and the folks at Blue State Digital who took their ideas and implemented them in open source PHP to change the state of politics and campaigning forever, read more here. A little over 9months later, the president’s office does it again, and revamps one of the most important government sites, and again proves why the most Tech Savvy president’s office uses open source PHP to make fast, flexible and frugal government a reality.

After months of planning the White House has ditched the proprietary content management system that had been in place by prior administrations in favor of the latest version of the open-source content management system based on PHP. As first reported by the AP The Obama new media team, with a few months of executive branch service under their belts, decided they needed a better development environment for the White House web presence.

After Obama’s new media team entered office and started tweaking the old, they decided they needed a more flexible development environment for the White House web presence. They wanted to be able to more quickly, easily, and gracefully build out their vision of interactive government. General Dynamics Information Technology (GDIT), the Virginia-based government contractor who had executed the Bush-era White House CMS contract, was tasked by the Obama Administration with finding a more flexible alternative. The ideal new platform would be one where dynamic features like question-and-answer forums, live video streaming, and collaborative tools could work more fluidly together with the site's infrastructure. The solution, says the White House, turned out to be a PHP based content management system. That's something of a victory for Drupal and PHP (not to mention open-source) community.

Is this the first move to a more open and transparent government even in code? As government developers start to embrace OSS programming and other open systems like open - forges, frameworks, languages and applications etc? I think the White House's move to open-source software signals a move towards this idea that collaborative programming can also inspire (or at least support) more open government systems.

As PHP programmers we all have seen how code openness (transparency) has made a huge impact to our own systems. When some other group/programmer wants to add or improve something to a shared OSS system, they can with open systems or they can just fork your work as a starting point. When we PHP programmers need a new system and there was already an open source project that can help get us started quickly, we just went to and downloaded the PHP application to get started (just like the site team did.) If we needed to implement something truly innovative and revolutionary, we could still use PHP to build it, even hire consultants to do it for us, and yet still we are free to build more into our system at a later date since the code is open to change (just like online social politics and networking did.)

David Wheeler from DoD made a real good analogy to one attendee who was having a hard time with the concept of open code in government, he said it this plainly after several prior attempts - by comparing OSS project to buying a car for government use, "Do you want your new government car to have a hood that is welded shut because that's what proprietary software is like, or would you rather have a car that lets you open the hood, and lets you pick whatever shop or mechanic you need to improve it, not just today but into the future, and that's what open source using open languages are like" Yup that's what PHP will offer government applications, it will allow them to build IT projects with a hood that can be opened by any programmer (of course with the right approval and security - there is after all a key needed to open that hood, just like the car.)

What I think that these examples start to show us is that transparency in open code can offer transparency and agility when government polices change over time, and that’s real exciting and a huge step forward for Government. Fewer projects will be started from scratch, and more reuse and evolution of ideas will undoubtedly become the norm with more OSS proliferating government. OSS use also allows the government to reuse ideas and code that has already been proven in commercial settings. If you look at all the opportunities for different government agencies to not only reuse much of OSS code that’s out on the web, but also share more unique and US government focused projects on its own internal forges. ( is another agency example of the forward thinking DoD open source initiatives) Many of the large enterprises that I work with have this very same type of open source policy for internal business as well as leveraging the OSS forges and applications. I’m sure this will inspire other governmental agencies (and contractors) to think about how best to leverage and share OSS code to make fast, flexible and frugal government a reality in the US. So let me know how you’re using PHP in government today and making fast, flexible and frugal government possible.

Other articles:

Monday, October 26, 2009

Zend Server 5.0 Intro to Code Tracing

Zendcon2009 ended this past week, and we introduced a new beta version of Zend Server 5.0 with several new features. In this article and video blog I will review Code Tracer. Think of it as a blackbox flight recorder for your PHP applications. When something goes wrong with an airplane, everything is saved during the flight onto the blackbox to help the investigators figure out what went wrong. What if you can do that in production with your PHP applications to figure out problems when they happen, now you can with the new Zend Server 5.0 Code Tracer.

In this video I will setup Zend Server Tracer to capture a problem from an open source application called phpExcelReader . There are two problems with this project once you download it from sourceforge that Zend Server can help you quickly identify it and fix it. I wanted to keep this first example real simple to show how to setup the CODE TRACE and used a real world FOSS application with the typical white screen problem that is so common with development. There are far more difficult problems that this feature can help you solve, including performance issues, code problems and even segfault issues when they happen a trace is the only thing that can help you figure it out. Let me know what problems this feature has helped you identify in your project, drop me a post here.

If you want to follow along be sure to get the new beta software from here:
and review the whitepaper for TRACING:

And to register for the free webinar that will go into more details and a longer demo of Code Tracer, click here.

Monday, September 14, 2009

A CTOs IT CHALLENGE - Do it in 7 Days

At Zend, I am lucky to meet and talk to a lot of innovative people who take technology such as PHP into imaginative ways in their business. I had such a conversation recently with a CTO from a large Bank who had called us for advice. During the conversation he and his team were really excited to share the details of a new PHP project that they were just about ready to release out of development, but had a problem with it. It turns out this project was the first public PHP application at the Bank, and they were typically doing everything in Java in the past. So I got curious and I asked them, What made you pick PHP for this?

The CTO said that its because PHP had proven itself to be a faster way of getting web ideas out the door. He was already a big Open Source proponent and bet big on Java at the bank. His firm had built most of its systems in Java technologies but when the projects started to pile up on his desk he got creative. He wanted to see if there was a better way to get some of this work done faster on his desk. So back in the beginning of this year, after last years books were closed, he decided to run an internal coding contest with his team. He selected one of the more common requests on his desk with a list of requirements and he sent an email out to his IT staff with a simple challenge. You have 7 days, use any technology or software in the bank even open source and proprietary applications were allowed, but you could only have three team members max on the project working on the requirements (an average size for them.) There were three submissions, one from a JAVA team who wrote everything on a Java/JBOSS platform, one from a team that used sharepoint, and a final winning team who used PHP and met most of the requirements of the project in the time alloted. They started with a popular open source PHP CMS and some custom coding to deliver on what the CTO had requested, and in turn helped him prove something important out during the contest. That it doesnt have to take months to rollout an idea or prototype at the bank. A small team can put an idea together in a just a few days to a few weeks, and then keep evolving it over time. And it doesnt have to take months to get his team upto speed either, most of his JAVA developer have now become very addicted to working on ZendFramework projects, just by initially prototyping in it. They already have many intranet PHP apps developed since the the contest. And as this most recent new project moves from the internal labs and enters public beta, the CTO was interested in sharing more details behind his early success with PHP. So an upcoming customer case study is bound to happen, but I did think his idea on how he jumpstarted PHP development at the bank (with a contest) was something that needed to be shared.

A different approach was used by another fortune 50 firm CTO I work with, he measured productivity of web projects during certain stages in the development cycle for both PHP and Java projects. Although the process used was a bit less fun then the first, the results also showed that PHP projects were more then 30% more productive then the Java way. He will be presenting the details at ZendCon.

So have you measured how much more productive PHP makes your business?, if so, drop me a line and let me know how you measure it for your firm. Also let me know what else you're doing to improve that productivity with PHP.

Monday, August 3, 2009

Web Services a la Zend

Zend Studio 7 was released this past week, and I wanted to commemorate this announcement by showing something new that hasnt been done on devzone or the rest of the web yet. In the past I have already shown how to debug a script, and how to reproduce and troubleshoot a problem, and even how to profile a bottleneck and then fix it with caching, so this time we will create a SOAP web service and use Studio to generate the WSDL.

The hardest part I find in creating SOAP services in PHP isnt the actual PHP coding but the assoc WSDL file, so in my article I will be using both Zend Studio 7 and Zend Server to create a very simple SOAP server and client and show how to easily create the WSDL file.

Let's start with the example, it will be a simple SOAP service that will just join two strings together, I'll call it JOINER. To call the SOAP service, I need a client so I put this code in a file called SOAPclient.php. (click on code to see it bigger):
Notice in the client code above, there really is only two lines 5 and 6 that are actually needed to call a SOAP service in PHP, line 5 references the WSDL file in this case it will be on local server. and on line 6 we are calling the JOINER function and passing two parameters to the service. On line 3 we are disabling WSDL caching so that if there are any changes to the file it wont be cached, you can delete that line when you are done with developement. This is all you need if you are calling a SOAP service from PHP. In our case we will also create the PHP service part and assocated WSDL file. I'll keep it all on the localhost but you all know we can move things around so that both parts are on different servers, just change the reference of "localhost" to its IP address or DNS name.

Next we need to create the service and we start with a simple PHP function that we will expose to the internet as a SOAP service. I call this file SOAPserver.php

The first thing to note in this code is the function JOINER it looks like a normal PHP function, but to expose it to the internet as SOAP service we just need to add lines 13-15 and also create a WSDL file for it.

For the WSDL we need to add a spcial docblocks to the PHP code that specifies what TYPE the incoming and outgoing parameters will be for the service, even though PHP is loosely typed, other languages that need to talk to my SOAP service will need to know exactly what variable types to pass along, that's why we have lines 2-7 with @param and @return. This will help when we are creating the WSDL file.

Now in Zend Studio 7 to create a WSDL file, click on the SOAPservice.php file and press (CTRL+N) in menu select WEB SERVICE > WSDL

and I gave my WSDL a file name called "myservice.wsdl" see the following

Then press NEXT>

In the namespace its important to type "URN: somenamespace", and select RPC literal for a REMOTE PROCEDURE CALL. Then press FINISH button. There are 4 things to update in this next screen:

Make sure your properties tab at bottom is selected, then press on the left box called myserviceSOAP that entry inside it should say "" you will replace this with the location of your SOAP service, in my case the following "http://localhost/MyDemos/SOAPserver.php"

Next in the center box, you should see "NewOperation" so change that to one of the function calls in our service, in our case "JOINER"

Then next to INPUT you should see "NewOperationsRequest" and I changed mine to "A" so it assoc to the first parameter in my function.

Next press the RIGHT mouse button on it and select ADD PART and change "NewPart" to "B" that is the second name of my parameter.

That's it!!! Now save your WSDL. You can look at the XML SOURCE or use the GUI WSDL designer like we did to create the file for our function.

Execute your soap service by using the client script. http://localhost/MyDemos/SOAPclient.php

If it worked you should see something like this:


Now for my simple example both the client and the SOAP server are on the same machine so the next step would be to move the SOAPserver.php and WSDL file to another machine and adjust the "localhost" references in both the PHP code and the WSDL file to the IP or DNS of the remote server.

It makes sense to also do this example in Zend Framework, but in the next day or two, I'll try to post a video of these same steps above atleast.

Monday, July 20, 2009

One small step for Open Source

My good buddy was celebrating the Apollo landing anniversary with his son this week with some very cool events, like building rockets, and watching the old clips of the landing, and he showed me something I didnt even know was out there. An open source computer simulator of the onboard guidance computer used in the Apollo mission. If you're a big kid, or want to introduce your own to a bit of space history, checkout this GPL simulator called Virtual AGC and AGS homepage.

Friday, May 29, 2009

Zend Server (Lesson 3) Solving a performance problem

In this Zend Server video lesson I will be dealing with a performance problem in my CMS Drupal. Performance problems happen in all sorts of scenarios and applications, so am not picking on Drupal project at all, just using it as an example in this lesson as a way to educate. Sometimes in a project, even one that's so mature like Drupal, a performance problem can be introduced just by adding in a simple tweak or new module to the core Drupal. With my site the problem is that it's sooo slow, the pages are rendering more then 5 secs with only a single user on the site, that's way too slow. I'm using the latest version of Drupal 6.12 free open source software (FOSS) code right off the site today Download Drupal 6.x and am using Zend Server + PHP5.2.9 + Zend Studio to get to the root cause of the performance problem and fix it fast. You'll soon see what the site owner did to cause this performance problem. In this video I reduce the page render time from 5sec down to 0.19sec and that's a 26 TIMES speed improvement, nice. If you want to follow along with me, review my prior lesson 1 and lesson 2 to prep for this one. And let me know what your own results are with tracking down performance issues. The lessons learned here will help you in your own PHP app, or any other PHP app on

PS: I had to keep these videos short for Youtube to accept the download so its a quick 5min video lesson

Friday, May 22, 2009

Open Source helps deal with 60yr Old War Wounds

As everyone around here get's ready for another great memorial day weekend, I had a few minutes before my own break to share a WW2 story. Its about a fascinating discovery and how the internet and open source was used to solve a 60year old WW2 mystery. You see my wife never knew her grandfather growing up, he served on the USS Grunion submarine in the 2nd world war, and was MIA. But about 2yrs ago his sub was discovered and the story behind how it was discovered and the forensics was quite fascinating to anyone who loves history.

Some background the USS Grunion, was an American submarine commanded by Lieutenant Commander Mannert “Jim” Abele, disappeared on July 30, 1942, in Alaska waters. After World War II ended, Japanese records were searched but they did not reveal any mention of the sinking so the mystery of Grunion’s fate endured for decades. One day one of the sons of the captain was on the internet and bumped into some recently posted information about the Grunion on the US Sub Command site by an amateur historian from Japan.

He posted some information about a battle between the Japanese freighter Kano Maru and a US sub on the morning of July 31, 1942 near Kiska Alaska, the freighter was hit by a torpedo which knocked out the ships engines. Over the next twenty minutes three more torpedoes were fired: one passed harmlessly under the ship while the other two hit but failed to explode. The submarine surfaced and Kano Maru began firing its forecastle gun. The freighter's crew observed that the 84th shot fired hit the conning tower of sub.

After discovering information on the internet in 2002 that helped narrow down the USS Grunion’s possible location, the sons of Grunion’s commanding officer, Bruce, Brad, and John Abele, began working on a plan to find the submarine.

“This discovery has come about through a stream of seemingly improbable events; it’s like we won the lottery 10 times in a row,” said Bruce Abele, eldest son of Grunion’s commanding officer.”

I think one of the key factors that led to the successful discovery of the USS Grunion was the use of the networking effect on the internet used by the Abele brothers. In the very beginning they had setup a website to share every piece of evidence uncovered with the world. And that led to the network growing with crew family members, naval sub experts, historians, history buffs and one very important Japanese historian.

My wife discovered that the first expedition was about to go to Alaska quite by accident by doing a yahoo search for the USS Grunion and it brought up the social blogging Wordpress site (a PHP site btw.) This site became the main vehicle to communicate about the search. It was very exciting to see the search all unfold online, day after day the Abele brothers posted pictures, sonar scans and wrote in there blog to keep everyone up to date. All this hundreds of miles from the Alaska main land, in the middle of the ocean using satalite communication to update everyone back home via the internet with the latest images and details of the search. For anyone following the day by day progress, it was exciting to wake up in the morning to read what they found during these expeditions. The second one was even more action packed with HD video images of the actual sub being uploaded for all including my mother-inlaw and wife to see. It was like we were all on the boat with them.

“The synergy of our group working together with the Navy for the common cause has been a wonderful group effort,” Bruce Abele said. “The teamwork combined with everyone’s compassion and wisdom has resulted in our success.”

According to Bruce’s brother John Abele, those responsible for contributing to this discovery included historians and engineers from the U.S., Australia, Israel and Japan. Of particular note was the involvement of Japanese naval architect Yutaka Iwasaki, who provided information critical to pinpointing the location of the submarine.

The search to find all the living family members of the crew was also challenging but I think the blog also helped the family members heal those old war wounds. If you read the online blog and letters from the family members you really get a sense of how things have changed in the past 60yrs. I read some of the original letters from the crews wives/girlfriends back to the captains wife and tears would swell up. You can just feel the frustration they felt when no information was shared by the Navy, so she became the focal point and sole support contact for the 70 wives about it. Back then letters were sent back and forth between her and the crews wives.

So 60 years later those families have grown, children, grandchildren, uncles and even son-in-laws spread allover the country, and they not only write to the captains wife, but to his children and other crew families on the Wordpress Blog, and also used Skype to call Japan to thank the historian that helped start it all. I wonder what Catherine Abele would say about how things have changed to help the families cope and heal their wounds from 60yrs ago? From my wife's and her mom's point of view, the social family network that was created by the Abele brothers helped heal those old war memories. I saw it first hand and it was amazing to watch it unfold and recorded for history online.

More information about the search and history of the USS Grunion can be found in the following links. I had the pleasure to be invited to the USS Grunion Memorial in Cleveland Ohio last year and wanted to thank the Abele brothers on behalf of my wife and her family for your success in finding the USS Grunion. As many of you who read my blog already know, I worked at Netscape in the early days of the Internet, but to see firsthand how it can help solve a 60yr old WW2 mystery was amazing. Happy Memorial Day everyone, its good to remember those that made the ultimate sacrifice and to thank their surviving families.

Read more: "The Search for the USS Grunion: How a Missing United States Submarine was Found After Six Decades

US Navy Press Release regarding USS Grunion (SS-216) discovery

Eternal Patrol The Fate of the USS Grunion and the Search article

The Search for the USS Grunion
with HD images

USAToday Article, click Exploring the Vessel for video of the discovery
at the top of article

TODAY show piece about the search and persistence of the Abele brothers:


Most Savvy use of Open Source in Gov awarded

I attended the April Boston PHP User group meeting to give the ELE award for the most savvy use of Open Source to the team at Blue State Digital that built If you recall back in Feb we announced the winners in this post, here is the video presentation from the April meeting and a snap of the awards given by me. Congratulations to all. Josh King and Chuck Hagenbuch share their experiences building and scaling the tools which powered and the millions of phone calls and billion emails that helped make history on January 20th, 2009:

Friday, May 1, 2009

Taking Zend Server for a Spin - (Part 2 Troubleshooting)

In my last article we took Zend Server for a quick spin, getting some Zend Framework demos to work and we started to look at application monitoring. In this article I will be configuring Debugging/Profiling between Zend Server and Zend Studio Eclipse to enable better troubleshooting and quicker resolution. When things go wrong in your app, you want to know about it ASAP and fix the problem quickly before it affects the end-user. Zend Studio Eclipse can be tightly integrated with Zend Server and gives you a powerful way to address application problems. I'll be building upon my last article so if you want to follow along, please install Zend Server and get everything working from my PART 1.

Zend Studio Eclipse (ZSE) by itself supports local debugging out of the box, when you install ZSE, it installs its own PHP environment and allows you to "Debug Scripts". The downside is that the bundled Zend Studio PHP environment may not have all the extensions and capabilities you need to replicate your production/dev environment. This is why Zend Studio also supports "Remote Debugging", and dont be confused by the name, since you can use Remote debugging on the same server. Think of it as Client/Server debugging. The Client is Zend Studio that can debug against any other Server side PHP with the appropriate Zend Debugger installed. In this article I will be using Zend Server with the preinstalled debugger to get all this working.

Steps That I will show in my Video

1) Pre-req to install Zend Server and Zend Studio Eclipse
2) Verify debugger is active on Zend Server
3) Configure debugging permission for the Zend Server
4) Browse website page and Debug from IE or FF toolbar
5) Test Debugging in Zend Eclipse
6) Test Event Debugging and Troubleshooting from Zend Server
7) Test Profiling of an application bottleneck

Tuesday, April 7, 2009

New Zend Application Server released today

It was an exciting day here at Zend today, we officially released Zend Server into GA, and I have to say this is an important milestone for the industry. It reminds me of the time 12 yrs ago when I was working on another new server technology at Netscape the very first Java Application Server that started a whole new category of software and opportunities on the web. Well NSCP's app server was technically not the first version as NSCP merged with the first one built by Kivasoft and release the next version under the new NSCP name. But it was that next version that made a huge impact on the internet and the name change was one of those things that signaled a maturing of the corprate market that was ready to adopt application servers as solutions. Websites needed better Scalability, High Performance and productivity improvements over the old way of doing things on the internet back then.

NSCP App Server was the beginning of the shift away from client/server corporate initiatives and desktop apps development like powerbuilder and visual studio onto the web. As of today only 33% of these internal employee applications have moved in 12yrs to the web, and that's mostly because of the lower productivity and high startup costs of early app server solutions. Scripting languages like PHP improve things at the language layer, but a complete solution is needed to addresses best practices and gain even more productivity while developing your next web ideas. As Yogi said once "This is like deja vu all over again"

Now fast forward to today's release of Zend Server, it offers PHP websites enterprise capabilities without the complexity and overhead of those first generation Java App Servers. Sure it can help with High Performance, it has the fastest PHP Byte Code accelerator technology out there. No other PHP caching technology is faster either, not even APC, and if you are running PHP applications on Windows then there is no other technology that is more reliable and tested for production environments under stress then Zend Server. We've implemented an APC function mapping layer into Zend Server that will allow your PHP apps using APC calls to utilize the faster internals of Zend Server without need to change your app code. So examples like phpBB modified to use it will run on Zend Server without code changes, and run even faster but with additional capabilities that will surprise you. Like better troubleshooting.

Quickly pinpointing the root cause of a problem and the tools to reproduce them faster is a major feature developers are surprised about when they start to use Zend Server. Like a sports car that you test drive because it performs well on the road, you the driver soon fall in love with the internals. As you sit behind that wheel you'll really get a good feel of the Zend engine and quick acceleration, but also fall in love with all the other things that makes driving it special. So take the new Zend Server out for a spin, you will also find many surprises that will WOW you even more then the thrill for speed as you sit behind the wheel. I'll be blogging more about those in the next few weeks, but since we are on the topic of speed. I had a meeting with one of our closest customers today, and used Zend Page caching to make a new PHP app more then 70 times faster, took only a few min after installing the server. I'll show you how to do the same thing in opensource using Joomla and Drupal in my upcoming article.

Thursday, April 2, 2009

Zend Framework can save your weekends?

And maybe even your marriage. I wrote this on Apr 2nd so that its not mistaken for an April fools joke, but a customer of ours wrote a very interesting article about the benefits he sees from using Zend Framework. He listed many great benefits of ZF standardization at Panasonic, but one of the more interesting ones was a business value that I have not seen blogged about much.
Jim Plush wrote: Upsides to this for (my) developers is the fact you're getting trained on the most popular php framework out there and no longer will you have to spend your weekends learning someone (else's) code who just quite.

This indeed is a major problem faced by many managers who have to support not just PHP, but other legacy environments both old PHP ones and other apps like the one Jim writes about in his blog when the team changes over time. As managers we know that successful apps will live on for many many years so a good strategy of how to reduce support costs over time was an important factor for Jim, so his solution was to simplify and standardize on best practices with the zend framework moving forward. As he put it so well in his own words.

We're dedicating all in house development to Zend Framework. If it's a web app it's either built in our Zend Framework infrastructure or it doesn't get built (in Panasonic.)

This final statement was something I have been hearing a lot from development managers who are optimizing the productivity of their web development efforts using PHP. I hope to share this same scenario from one of the largest Fortune 500 firms in an upcoming article. Today I learned that they also are writing about their own results using Zend so I wont spoil the presentation. Stay tuned. But if you want to learn more about why Jim at Panasonic chose Zend Framework and PHP for his Enterprise, read on.

It looks like he's also looking for a few more good people to add to his Zend Framework team, read job post here - the March job numbers are expected to be horrible, but folks with Zend skills are doing very well indeed this year.

Wednesday, April 1, 2009

Taking Zend Server for a Spin (part 1)

April in my neck of the woods is when the weather starts to get nice and Spring is in full bloom, its also the time my wife and I take our classic car out for a spin. Its fun to drive with the top down to shake off winter blues and drive somewhere new. Well I've been doing a lot of that at work too testing the new Zend Server and seeing what's under the hood (not just the Zend Engine 2, but all the other things that make the new server go).

If you've missed all the news and announcements about Zend Server, take a look at Andi's blog, it has some real good posts and an insiders look at the Windows and Linux versions.

In my blog this week I'd like to take Zend Server for a spin, if you want to follow along you will need to install it first, and then activate all features by installing a trial license, your first screen should look all green on the right side like the figure above. If not, you may not have licensed your trial copy, click here for instructions, or if you originally decided not to active some features, its easy to reactivate.

Next let's setup some PHP apps to work with, setting up the preinstalled Zend Framework demos are easy to do. If IIS is your web server I recommend using IIS7 that supports the apache rewrite rules module and just copy the demo zend framework directory into the www root.

If youre using apache web server you can also copy the "demo" directory from the Zend Framework install, to your htdocs web root. To find out where the demo's are located, you can do a browser page search in the following PHPINFO screen, it can be found in ZendServer Admin menu Monitor>PHP Info and then do a search in the page for the word ZendFramework. That will list out the entire path downto the library subdirectory, just go up one level and you will see the demo folder.

If you copyed it in the right place it should all work now, your first Zend Framework demo should display now in the browser, http://localhost/Demo/Gdata/YouTubeVideoBrowser and it should look like this screen (BTW you can click on any screen shot to zoom in and get a bigger view of it):

This Youtube demo is using the Zend Framework GDATA modules, there are many other examples that interface into Google apps like calendar, spreadsheet, photos, health, books, docs, and blogger. For full details of the ZF API for Google apps and all source is provided on how to do it in PHP. This would be a great way to build some of those web apps that I wrote about from Genentech last week.

There are quite a few web services examples, to run the Amazon book example type the following,
http://localhost/Demo/WebServices/Amazon/amazon-search.php there is also a UPC lookup example http://localhost/Demo/WebServices/Protocols/xmlrpc-upc-lookup.php

If you try to run the flickr demo you will probably only see a white screen in the browser come up.
http://localhost/Demo/WebServices/Flickr/flickr-search.php Is there something wrong with the demo or code bug? To help figure this out, let's go back to our Zend Server monitor screen and look at the latest error at the top of the screen, I highlighted it in grey here.Click on this first event to get even more details about the problem we are having. Click the ERROR DATA tab in the middle of the screen and we can see exactly why the problem is happening, its an INVALID API KEY.
So let us click Show File in Zend Server if you have that up and running and enter a valid key in the file flickr-search.php, you should register for your own key, its free at flickr and can be found here. There are a lot of problems scenarios like this that come up in real production and testing environments, that makes Zend Server ideal to track down quickly. Many times just looking at all the data collected is enough to figure out the problem like in this case, other times the applicaiton and problem is more complex and we would need to troubleshoot it with the Zend remote debugger or profiler. I'll have some more examples that will show how this is used, but for now let us just edit the file in Zend Studio and enter the API key in the code.

And save it, to test it goto http://localhost/Demo/WebServices/Flickr/flickr-search.php and if your key is valid you'll get a screen full of pictures instead of a blank window as before.
Next let us look at a feed demo, its a typical thing you would find in any content management system or PHP portal like Joomla, Drupal, or Dekiwiki. http://localhost/Demo/Zend/Feeds/consume-feed.php If you go back to Zend Server you will notice a new event at the top "SEVERE SLOW REQUEST EXECUTION", that's a bottleneck identified by Zend Server. On my laptop it sometime takes more then 2sec to execute this feed, I should know because on my firefox I have also installed a plugin to show me the rendering time of a page (FF plugin is called LORI)

There's another useful utility called the Zend Controller preinstalled in the bin subdirectory of ZendServer that can help us measure performance. Let's paste the feed URL into the utility and run a quick test to see how many requests per sec it can handle. Looks like only 1.1 requests/sec on my laptop, see figure below:

Now lets use Zend Server's page level caching to improve the performance of this feed as you can imagine this is a common problem in many portals and wiki's. I go back to Zend Server Admin, menu>Rules Management>Caching and will add a new caching rule.

I called my rule "FASTFEED" I filled in the URL to cache the output "http://localhost/Demo/Zend/Feeds/consume-feed.php" and then set the rule to cache the output for 360 sec and saved my script. Be sure to RESTART PHP after saving rule for it to take effect. Now I re-run my performance benchmark in Zend Controller, here's a screen shot of both the feed and performance test:

Notice in the Zend Controller I now have 3.75 times more requests per sec, and in Firefox the page speed went from 2-0.9/sec to 0.24/sec a dramatic speed improvement. Since this is a RSS feed, the timings vary wildly at different times during the day but this example is representative of realworld situations. Also note the Zend Controller measures first byte returned so tools like Apache Benchmark, JMETER and LOADRUNNER are good tools for further benchmarking.

So download Zend Server and take it for a spin, if you also use open source projects like SugarCRM for example, many will detect the installation of Zend Server and its data caching and will perform significantly faster automatically. In an upcoming article, I'll take some of those for a spin too and list out all the ones that I have tested. For more news on Zend Server release, click here.

The band I've been listening to the most while taking things for a spin this month is
Kings of Leon

Friday, March 20, 2009

Genentech Future vision of Tech Business

Wednesday I was invited to a meeting at the Princeton Nassau Club to hear Todd Pierce VP CIT of Genentech talk about the "Future of Technology in Business". The company is considered to be the founder of the biotechnology industry , and the IT leader was talking about the future of tech at one of the most advanced biotech firms, I had to go.

He first started with a little history of the company. The company's goal was to develop a new generation of therapeutics created from genetically engineered copies of naturally occurring molecules. The first discovery was targeted at insulin growing needs, many millions of animals were slaughtered to meet the diabetic needs of patients, but it couldn't scale. Within a few short years, Genentech scientists proved it was possible to make medicines by splicing genes into fast-growing bacteria that produced therapeutic proteins. in 1978 Human insulin was cloned by Genentech scientists. The latest research developments provided a new way of looking at Alzheimer.

Mr. Pierce was very optimistic about these economic times we are in these days, he sees a bright future for innovation during these tough times. He noted that one of the founders Robert was unemployed at the time that he discovered a new scientific field called recombinant DNA tech. It was during that time that he saw opportunity to build a new business and partnered with Dr. Boyer and founded Genentech, with the first breakthrough just two years later. He wondered what new innovations would spring from the current crisis.

Today Genentech continues to use genetic engineering techniques and advanced technologies to develop medicines that address significant unmet needs and provide clinical benefits to millions of patients worldwide. Kleiner Perkins was an early VC and invested $100K to start Genentech and its worth something north of $360mil now, not a bad return since Roche is trying to buy the rest of the company that it doesn't already own.

Then he discussed the corporate culture at Genentech, the first idea was about the company becoming more efficient during these times. Like most companies, Genentech has many new research initiatives, a growing customer base, and many new partners - collaboration is key. To facilitate better efficiency without sacrificing creativity, they decided to use Google Apps. The entire organization moved to using Google calendar, and he shared the risk that his organization was faced moving the entire enterprise into using a mostly consumer web service. He said at one meeting they had over 150 change requests that were implemented by Google web team in only a few days. It was that kind of business efficiency and agility that allowed him to move all his 2.5mil MS Outlook meetings onto using Google apps. The company is also a big user of Wikis and crowd sourcing like I discussed in one of my earlier articles.

He also talked about the opportunities of mobile computing, using the iPhone as a specific example. Only one week after the phone was released he saw the opportunity for collaboration on the go, and worked with ATT to create a corporate plan so that Genentech could do corporate purchases. He also discussed this weeks new iPhone 3.0 demo from J&J of a diabetes application that would monitor glucose/sugar and transmit the patients data back to a website to help them better manage their blood levels.

Since Genentech is on the cutting edge of cancer treatment (read more about Avastin) I asked a question about how devices like iPhone could be used in personalized medicine a movement to more efficiently treat cancers, is Genentech using this kind of device to collect research data from the field?

IT has been a big enabler for the scientists and researchers, but now IT departments will be in the middle of patient care just as important to the treatment as the pills and doctors and hospitals, because the devices will be with the patient all the time. Monitoring vital stats, creating alerts for the patient, auto-scheduling dr. appointments when needed, and preparing the doctor ahead of time for his patients condition, etc.

It was a real enlightening meeting and I can't wait for what comes out of the labs at Genentech next.

New York City Zend Framework Meetup and SIG started

After the Zend Framework presentation at the February NYPHP user group meeting a bunch of members came upto Alan and myself asking to start a SIG or meetup, so we did. You can join the NY/NJ/PA Zend Framework Meetup here. We'll try to find interesting speakers to talk about ZF and other relevant topics. Members will also be encouraged to present applications that they've built with Zend Framework and share interesting challenges and their solutions with the rest of the meetup group.

Our first meetup March 24 is after the NYPHP meeting (4th Tuesday) you can RSVP to get into this months meeting at and then meetup with us at TGI Friday's at Lex and 56th St.,+New+York...

We also will have meetings in Princeton, NJ and Philadelphia in the coming months. Let me know if you have ideas for a meeting room in your organization.
More info about

If you're looking for a complete list of ZF meetups I'll keep this list updated, CA, NJ and PA meeting are upcoming but here are the links to join:
CA/LOS GATOS - Zend Framework Meetup
NJ/PRINCETON- Zend Framework Meetup
NY/NYC - Zend Framework Meetup
PA/PHILI Zend Framework Meetup

Wednesday, March 18, 2009

CISCO and IBM bet big on Open Source this week

Its been a busy week of open source activity by two of the tech industry's bellwethers. Early this week CISCO made a big announcement of its new architecture called Unified Computing. Aside from the usual new CISCO hardware there was a big bet on using open source software on its complete virtualization solution, based on LAMP and yes PHP can be shipped on every hosted server.

If you recall, it was only last month that I wrote an article in our Zend Newsletter and quotes from CISCO leader John Chambers. He was hinting about "aggressively investing in new markets to ensure success when the economy becomes healthy once again", but he said that Cisco will be even stronger, I think he was referring to his big bet on Unified Computing and Open Source initiatives. You tell me, here's that article and Cisco comments at the end.

Another divisions at Cisco called Webex, continually rolls out innovative PHP projects. The latest project took only 4 days to develop a iPHONE application in PHP, wow that's real agile development. How did they roll out soo fast, they took advantage of open source Zend Framework and our developer stack to quickly develop it.

Today's big rumor was about IBM merging with SUN MICRO in the Wall St. Journal. Sun has been struggling to revive its financial prospects and declining Solaris business, the only semi-bright spot has been its open software. But open sourcing Java has been a rocky road, and more agile environments like PHP and others, have made significant progress. Ajaxian claims more new web2.0 app developers are using PHP then Java, Burton study reported on Ajaxian, more then 5 times more PHP developers. oDESK high tech job site reports 6 times more demand for PHP developers even during these difficult economic times. And over 22mil websites run PHP on the internet, its because PHP is easy and usually installed by default whenever a new LAMP server is spun up.

But inside the firewall, Java and other tech like ASP and Client/Server have ruled for a long time because of the head start, but luckily PHP programmers can play nice if they need to frontend a Java server. Its call Java Bridge for PHP and its available in our beta Zend Server, see this Caffeinated PHP video webinar to get a good insight of what is possible by my pal Kevin who was using our current production version of it. Works the same in the beta.

So I am excited about this IBM rumor, I have to say its a big bet by BIG BLUE on open source and IBM has been betting on both Java and PHP for a long time. Zend has had a long partnership with IBM and recently all IBM iSeries boxes ship with Zend PHP stack by default. Read more about the announcements in our Zend IBM Newsletter. And if you want to see all the interesting PHP projects at IBM, look here on IBM developerWorks. Take a look at one of my favorite IBM projects built on Zend Framework in the early days, here's the case study, and video.

Have you placed any open source bets inside your own company? If not, take a look at using ZEND PHP stack to do a project faster, better, cheaper. Lots of info on Google, and our site, but if you want to chat with a live person to help get you started, you can ring us at Zend or ping us on chat.


Here's a musical selection for this article to celebrate the symphony of these announcements, a classical favorite of mine from the USSR Orchestra playing Chopin, press play