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.

How To Get Your FeedBurner Circulation With One Simple Function

0

If you have visited a few blogs then I am sure you have seen the FeedBurner stats graphic. The count is very useful, but the graphic itself isn't very appealing, even with the ability to customize it. Thankfully the FeedBurner API was released, which allows you to retrieve your stats without the graphic. I have taken that API and created a simple function, with the help of simple XML, to grab your circulation count and display it as text on your site without the graphic.

To start off, you will need to download the simple XML class and put it in the same folder as the file that will contain this function (or change the include path to reflect the directory of your choice). Once you have done that, you are pretty much done. All you need to do is copy the function below and call the function with your feed URI and it will return the circulation number.

You can see the function and sample usage below.

Function

function FeedBurnerCirc($feed) {
include 'simplexml.class.php';
$api = 'http://api.feedburner.com/awareness/1.0/GetFeedData?uri='.$feed;
$sxml = new simplexml;
$sxml->ignore_level = 1;
$data = $sxml->xml_load_file($api,"array");
return $data["entry"]["@attributes"]["circulation"];
}

Usage

echo FeedBurnerCirc('http://feeds.feedburner.com/webmastersbydesign');

You could also easily customize the function to include more data and return an array of results. The API returns data other that the circulation, such as your reach and views. I only wanted the circulation so I didn't return an array of results, but it wouldn't be tough to do.

10 Online Magazines for Developers and Designers

9

PHP Magazine

PHP Magazine is an online magazine in the form of a blog. There are posts that range many different categories, mainly PHP, but others from within their network of sites. There is information from software and book reviews to articles and tutorials.

Ajax Magazine

Ajax Magazine is another online magazine in the form of a blog from the publishers of PHP Magazine. The Ajax version focuses mainly on Ajax technologies and offers news, articles, and reviews to name a few.

Smashing Magazine

Smashing Magazine is one of the best sites on the web (also an online magazine in the form of a blog). They have amazing "round-ups" and posts bringing together the best sites, services, and resources on the web. They focus a lot on web 2.0 technologies and provide great content for both designers and developers.

Design Mag

Design Mag offers news, articles, galleries, interviews and more. The website is in the form of a blog and is updated very frequently. They have great resources and devote a section to freelance information. This is often a common thread between webmasters/designers/developers. They are the home of the 200+ Resources for Freelance Web Designers article.

Website Magazine

Website Magazine offers their magazine both in print and online. However, the only way you can see the online version is if you subscribe to the print version. The good news: it's free! The website has forums, articles, and blogs full of content. The magazine contains a lot of useful information in typical article format, usually offering one focus article with many other shorter articles throughout.

Digital Web Magazine

Digital Web Magazine offers news, articles, reviews, interviews, and tutorials. News is updated daily and main articles are updated on a weekly basis and are well worth the wait. The content is very useful and very thorough. They also report on upcoming events around the world.

SD Times

SD Times reports on content related to programmers and developers. In both a print version and online, SD Times has over 60,000 subscribers. They report on recent news and stories, write columns and opinions, as well as providing a job board and resource center. This publication reads more as a newspaper than a magazine.

Dr. Dobb's Journal

Dr. Dobb's Journal is another publication both in print and online. They offer information from a variety of different programming and development topics. Some topics include databases, open source, security, web development, and specific programming languages like C/C++ and Java. They also have a resource center and a blog full of information as well.

Developer.* Magazine

Developer.* offers articles, blogs, and book reviews for all things development and programming. There articles are broken down by categories ranging from software design and quality to legal issues and techniques. The articles are well written, the information is great, and the information is very thorough.

.Net Magazine

.Net Magazine is both in print and online. They offer articles to help developer, discover, and design. They also have podcasts and forums filled with content. They cover topics ranging from flash to CSS to Facebook.