CW10 - May 22, 2008 - Zend PHP 5 Certification Study Guide and Open Flash Charts

Angelo discusses the Zend PHP 5 Certification Study Guide 2nd edition and explains how to implement Open Flash Charts into your PHP project.

Don’t forget to E-mail comments and suggestions to compiledweekly AT gmail.com.

Links:

Download This Episode

 
icon for podpress  Standard Podcast: Play Now | Play in Popup | Download

Columbus PHP Meetup tonight - The Art of SQL Tuning for MySQL

If you’ve been following my Twitter (@AngeloMandato) lately, you may have herd me mention previous Columbus PHP Meetups. These meetups are great for meeting fellow PHP programmers in the Columbus area and a great way to learn about different libraries, techniques and frameworks that are available.

Columbus PHP Meetup web site: http://php.meetup.com/93/

Tonights meetup topic is “The Art of SQL Tuning for MySQL” presented by Jay Pipes from MySQL. I can’t wait to attend this meetup and gain some insightful knowledge how to tune MySQL. Ever since I started my career, I’ve encountered many issues either with server loads and/or time due to poorly written queries. I think I’ve done a decent job deploying indexes, grouping like queries together, etc… but I know there is more to learn.

The past two Columbus PHP Meetups covered the Zend Framework and CakePHP. Both were great presentations.

The Zend Framework presentation from February was very informative. The Zend Framework was written in a way that the developer can decide how much he/she wants to use from the framework. This makes it possible to easily add the Zend Framework to an existing project. I think the word framework may not be the best word to describe it though, perhaps it should be called library and framework. Many parts of the Zend Framework are really just libraries to help with things like email, XML-RPC, OpenID, Flickr, Amazon, etc… I now plan on using parts of the Zend Framework in some of my projects.

I learned a lot from the CakePHP presentation from March as well. CakePHP is definitely a “framework” with all of the University taught thinking of object oriented programming and separating presentation with logic integrated. What I found interesting is CakePHP took somewhat of a Ruby on Rails like approach in managing your SQL queries. I think this type of development is fine for small to medium size projects but anything where you need full control of the queries or presentation you may find yourself feeling restricted. The presentation side of things reminds me of Smarty Template Engine, which my past experience with Smarty started out great but ended with frustration that I couldn’t add the logic I wanted at the presentation level.

I would like to learn more about CodeIgniter. CodeIgniter is the application framework that Joe used for developing the registration system for PodCamp Ohio.

PHP 5 Study GuideRelated news, I purchased a copy of the Zend PHP 5 Certification Study Guide. I own a copy of the Zend PHP 4 Certification Study Guide and loved the book till the pages started falling out. It is not just for those who want to be certified in PHP, the content is perfect for a developer who already knows how to program but just wants something to reference for the language. You should already have some background in C/C++/Java/PHP before you read this book though. I’m very pleased with this addition as well as the first one. I think I may order the Guide to Programming with Zend Framework next.

So are you attending PHP meetups in your area? If so, what sorts of things are you learning?

MetaWeblogAPI Web Resource

Sweet AttachmentIf you are looking for excellent resources for the MetaWeblogAPI and derivatives (Blogger 1.0, Wordpress, MovableType APIs), look no further. SixApart has an excellent web site that documents all of the APIs pretty well.attachmentsBlue.gif

www.sixapart.com/developers/xmlrpc/

test with media

test with media, beep!

Download Episode

Apache Module Rewrite - URL Rewriting Guide

If you’re looking for clean and simple resource or reference on the Rewrite Module in Apache, look no further. This page is the most useful and to the point resource on the subject I have come across to date.

Module Rewrite - URL Rewriting Guide

If you are looking for a cheat sheet, check out I Love Jack Daniels’ mod_rewrite Cheat Sheet for a Rewrite Module cheat sheet as well as others.

Line-bar graphs and Pie charts for your web application

Open Flash ChartIf you ever needed to display reports of information in a visual way in your web application then you’ll appreciate Open Flash Chart.

This flash based charting library has everything. From line graphs, bar graphs, pie charts, mixed line/bar graphs and more with the ability to add hovers, custom colors, sizes and web links. The quality of these charts is remarkable. If you have ever used Google Analytics, these charts and graphs match, if not surpass, in quality.

Sun acquires MySQL

If you have not herd, Sun Microsystems is acquiring MySQL. I think this is a great move, especially since Sun has embraced the open source community as strong, if not stronger, than other large companies such as IBM, Yahoo and Google.

Article: http://www.mysql.com/news-and-events/sun-to-acquire-mysql.html

I think the move is a good one for MySQL. With the recent purchase of the InnoDB storage engine by Oracle, there has been some concern that MySQL could end up in the hands of a company that’s best interests do not involve the open source community.

The recent influx of participation in the development of MySQL by Google gives me a lot of hope that MySQL’s future will be a bright one. The next generation storage engine called Falcon hopes to become a replacement for InnoDB and many of the performance tweaks Google has implemented over the years will most likely find their way into the future versions of MySQL.

Will be on the 24hr podcast Friday at 2pm

I will be on the 24 hour podcast event planned for Friday, December 21 at 2pm.  I’ll be discussing download Statistics, web programming and answering questions anyone may have.

More information is available at the Geek News Central.

PHP code to format Program Name for 1-click zune subscription

ZuneI added the Zune 1-click subscription option to the RawVoice properties at www.blubrry.com and www.techpodcasts.com. I ran into an issue where show titles that contain special characters, such as quotes, would break the rest of the web page.

Below is the solution I implemented for the problem.

Fix

<a href=”< ?php
$title_for_zune = ereg_replace(’[^A-Za-z0-9 ]‘, ”, $show_title);
$title_for_zune = str_replace(’ ‘, ‘_’, $title_for_zune);
echo ‘zune://subscribe/?’.$title_for_zune.’=’.$feed;
?>” title=”Add to Zune”>Add to Zune</a>

Having spaces in the URL does not validate, so I replace spaces with the _ character. If you are not worried about HTML validation, you can remove the str_replace function call.

I am not sure who came up with this protocol for the add to Zune 1-click subscription, as it does not appear to be very well thought out. Most other sites like Digg only require the feed url, which will never contain characters that could break your web pages.  As Jason Van Orden points out, the format is more complex than it needs to be.

Source for Lighttpd mod_redirect rewrite module to use status code 302

Lighttpd web server, also known as Lighty, is an excellent web server and has potential to replace Apache completely.  I am slowly migrating web sites that use feature specific settings in Apache to use Lighty.  A few months ago I ran into a problem with Lighty’s ModRewrite alternative for rewriting URLs.  Lighty uses two separate modules to handle internal rewrites and Location: redirects.  It uses the common HTTP 301 Moved Permanently status code.  For most circumstances, this works well but in some cases the application may require that the redirect only be temporary and return the HTTP 302 Found status code.  Instead of modifying the mod_redirect.c source and changing the http_status code value from 302 to 301, I added new code to support a new url.redirect parameter url.redirect-found.

I’ve posted the source to the Lighttpd bug tracking system in hopes it will be added to a future version of Lighty.  http://trac.lighttpd.net/trac/ticket/1446

This addition should help the Lighty web server to be capable of handling the appropriate HTTP status codes for all situations that may arise for the web site in question.

Blubrry player!