Surviving The Deep End – Free Zend Framework Book

0

I mentioned in one of my previous posts, ZFDebug – Zend Framework Plugin, that I have really enjoyed developing my personal web projects with Zend Framework. I am still pretty new to it and am constantly learning new tips, tricks, and best practices. Scouring the web for as much information as I can possibly consume, I came across this free online book. Zend Framework: Surviving The Deep End is comprised of ten chapters with three appendices from introducing Zend Framework to installing Zend Framework to developing a blog application with Zend Framework. You can find a full book index on the website.

As I see it there are three main advantages to this book:

  1. Both the book itself and the code snippets within the book are freely available online and licensed appropriately. The book content is licensed under a Creative Commons Attribution-Non-Commercial-No Derivative Works 3.0 Unported License and the code is licensed under a New BSD License. You can see the licensing information in Appendix C, part 2 - Licensing.
  2. The content is well written, easy to understand, and well designed for beginners like myself. I don't have any first-hand reviews from advanced Zend Framework developers, but I have gone back to this book multiple times while working with Zend Framework on my own projects.
  3. The book is open to user comments. This is a really neat idea. Not only are comments available, but you can comment on every paragraph of the book individually. There are a lot of comments out there already, many of which are quite helpful in reaffirming a statement made in the book or offering further information about the subject at hand.

If you are looking for some good help as you work with Zend Framework to develop your web projects like I was, I would recommend giving Zend Framework: Surviving The Deep End a chance. I have really enjoyed it.

ZFDebug – Zend Framework Plugin

2

I have spent a lot of time recently working with Zend Framework. As I get further into its features and capabilities, the more I enjoy developing websites and web applications with it. While researching ideas and options, I came across ZFDebug, a plugin that adds a debug bar to the bottom of your pages if you are in the "development" environment. The plugin is hosted on Google Code and is licensed under the New BSD License.

At current release (1.5) ZFDebug offers the following features:

  • Cache: Information on Zend_Cache and APC.
  • Database: Full listing of SQL queries and the time for each.
  • Exception: Error handling of errors and exceptions.
  • File: Number and size of files included with complete list.
  • Html: Number of external stylesheets and javascripts. Link to validate with W3C.
  • Memory: Peak memory usage, memory usage of action controller and support for custom memory measurements.
  • Registry: Contents of Zend_Registry
  • Time: Timing information of current request, time spent in action controller and custom timers. Also average, min and max time for requests.
  • Variables: View variables, request info and contents of $COOKIE and $POST

(list from ZFDebug)

New Resources Posted – PHP Frameworks

0

There is a new section on the Resources page for Frameworks. This section of the resources page lists popular PHP frameworks like Zend Framework, which is my personal favorite, and CakePHP. The six common PHP frameworks that were added are also listed below:

Do you use a different framework from those listed above? Leave a comment about it and I'll get it added to the list.

PHP Date Tips & Tricks

4

For those of you using PHP to develop your web pages, I'm sure that you have used the date function at some point. There are so many cases that I have used this to show a date on a page, like using date("Y") in the copyright section of the footer to always reflect the current year. Here are a few tips & tricks to help you save some time.

Formatting

Predefined Constants

This is a trick that I really wish I had known about earlier. PHP 5.1.1 and forward offers date formatting constants. So when I was looking for examples on how to get the date in the correct format when creating my RSS feed, I could have simply used the DATE_RSS constant.

Example

Use:

<? echo date(DATE_RSS); ?>
Output: Thu, 24 Nov 2008 12:29:09 -0500

Instead of:

<? echo date('D, d M Y G:i:s O'); ?>
Output: Thu, 24 Nov 2008 12:29:09 -0500

There are eleven total predefined constants available including DATE_RSS, DATE_ATOM, DATE_COOKIE, and DATE_W3C.

User Defined Constants

Building on this same idea of constants, you could easily create your own date format constants to use. All you would need to do is define a constant with the string value of the date format and then call it within the date function. I have included a simple example below.

Example

<? define(DATE_SCOTT,'m/d/Y'); ?>
<? echo date(DATE_SCOTT); ?>
Output: 11/24/2008

Relative Dates

This trick is one I use when I need to get a date like tomorrow or the day after tomorrow or yesterday. The function strtotime allows you to easily calculate dates like tomorrow and yesterday. You can turn any GNU formatted date string into a PHP date. I have included a couplt of examples below that are based on a publish date of 11-24-2008.

Example

<? echo date('m-d-Y',strtotime('yesterday')); ?>
Output: 11-23-2008

<? echo date('m-d-Y',strtotime('+4 days')); ?>
Output: 11-28-2008

Calculate Age

This trick is a fairly simple and straight forward one. All it does is find an age in years. Simply pass the year(s) you want to compare and it will return the age in year. This could easily be made into a function like getAge($yr1,$yr2);

<? echo floor(abs(strtotime('Y') - strtotime('1985'))/31536000
/*1 year in seconds*/); ?>
Output: 23

phpMyAdmin 3.1.0 Relesased

2

For those of you that are as hooked on phpMyAdmin as I am, you will be happy to know that there is a new version available. phpMyAdmin 3.1.0 includes a number of improvements and fixes.

The list of improvements includes security updates, language updates, export fixes, and general patches. The release notes highlight a few specific improvements: "this version has a new setup mechanism and supports BLOBstreaming and the Swekey hardware authentication" (release notes).

You can view the release notes for full details concerning the new release and download the new version from sourceforge.

How In-Demand Are Your Skills?

1

Have you ever wondered if your skills are in demand? With so many different possibilities available for web development, it is tough to know if you should keep mastering a specific technology or start learning a new one. After reading an article about how PHP programming jobs are in high demand, I asked myself the follow-up question: what other skills do I have that are in high demand, and which skills do I have that are not?

The article linked to a great resource from oDesk that lists the current (monthly) trends for many of the development and design skills used for web development. There are 84 different trends with a wealth of useful information about the skill's demand including graphs, stats, and recent job postings. Although these stats are pulled from information specifically on oDesk, it represents demand from all around the world. I have listed links to some of the most in-demand skills right now.

As a side note, this site is a fantastic example of how great the Google Chart API is.

Book Review: Sams Teach Yourself Ajax, JavaScript, and PHP All in One

1

Sams Teach Yourself books are great resources in a large array of topics. They have released Sams Teach Yourself Ajax, JavaScript, and PHP All in One in paperback version on July 12, 2008. This book is great for webmasters because it includes three of the most popular technologies used on the web.

Like all the rest of the "Sams Teach Yourself" line of books, this one is easy to follow, easy to understand, and takes you from a beginner to an intermediate and beyond. There are a number of visual aids including screenshots and diagrams to help you understand what you have read. Another great help is the amount of code examples used throughout the book; there are examples for most of the topics covered.

The book starts with a general overview at the beginning and works towards a more detailed explanation at the end. In chapter one, you will learn the basics of the web, HTML, CSS, and Ajax. By the end of chapter nine, you will understand JavaScript, using it to manipulate the DOM and add usability to your site. By chapter thirteen you will be using Ajax and by the end of chapter eighteen, you will be using Object Oriented PHP to make your site dynamic. Once you have taken all of that in, you can learn about XML responses, web services (REST and SOAP), and gain a basic understanding about a few popular Ajax tools and libraries that are available.

An added feature with this book is beyond the pages of helpful information. There is a CD provided with the book that includes all of the software needed to get a basic web server up and running. It includes XAMPP, jEdit, Prototype, Scriptaculous, Rico, XOAD, searchable PDF tutorials, and source code for the examples in the book. Most of these are freely available for download on the web, but it is nice to have them all in one place, especially for a beginner that doesn't know what to look for.

This book is well worth your time to read, especially if you are a beginner looking to get not only introduced to these web technologies, but also get started using them. You can pick up your copy at Amazon.com and get started building dynamic websites using Ajax, JavaScript, and PHP.

Free Online Tech Books from Techotopia

0

Techotopia offers free online books that cover a number of subjects including programming languages, security,  and Linux. The books are hosted on their wiki and are available to read online. The four main books that brought me to this site are:

As the website states that the "IT Essentials series of books are designed to provide detailed information that is accessible to both experienced and novice readers" (Techotopia). The books are clear and concise, providing detailed explanations and examples to help you understand the content. Each book is made up of multiple chapters in a logical and easy to follow order. You can access the table of contents from every page which makes it easy to skip around quickly and easily to look at what you find interesting and useful.

As well as the four books mentioned above, you can find books on these topics:

ZendCon 08 Slides Available On Zend Developer Zone

0

Zend Technologies held their fourth ZendCon conference, ZendCon 08, in Santa Clara, CA from September 15-18. In case you weren't able to attend (like me) or just want to see them again, the presentations from the conference are available online. You can view the ZendCon 08 Slides from the Zend Developer Zone website.

There are 60 different presentations available currently with a possibility of more on the way. They cover a wide range of topics including MySQL (Jay Pipes), Facebook development (Brett Harris), PECL (Elizabeth M Smith), scaling PHP applications (Shahar Evron), and many more. The presentations are broken down by the day they were presented and show you the speaker and session name. Here are a few of the presentations that I'll be checking out this weekend.

Easily Generate Sample Datasets for Testing at GenerateData.com

3

As a developer I have often wanted to be able to test query speeds among other things. The problem is I didn't always have a usable data set sitting around that could meet the requirements of my test cases. To make a long story short, I wish I had GenerateData.com a long time ago. This is a great tool and has a lot of potential. It can save a lot of time when you are trying to create your own test data set to work with.

GenerateData.com is currently in version 2.1 (released July 25, 2008) and offers a nice set of features. You can generate data in many different data types like addresses, numbers, lorem ipsum text, email addresses, phone numbers, and more. Once you have chosen what kind of data you would like to generate, you can choose from five different export options. You are able to export the data in XML, Excel, HTML, CSV and SQL formats. The SQL export options gives you the choice of MySQL or Oracle syntax. You can generate up to 200 records at a time, unless you donate $20 or more, which allows you to generate up to 5000 records at a time.

The generator is written using PHP, MySQL, and JavaScript. You can use the online version or download a copy of the script for use on your own server. The downloadable version is licensed under GNU. The website has requirements and installation instructions to follow if needed.