Posts filed under 'PHP'

New tutorials and articles

I have just added to my site a tutorial on converting a Spry Menu Bar into a server-side include. I have also been busy adding a bunch of brief articles to the Dreamweaver Cookbook on the Adobe site.

I answer a lot of questions in the Dreamweaver forums, and realized that a lot of the solutions I was coming up with for people weren’t easy to find after a couple of days. So, rather than letting them disappear into cyberoblivion, I decided to add any of general interest to the cookbook when I had a few spare moments. The Dreamweaver Cookbook is intended for code samples, and doesn’t have the capability of including screenshots, so I’ll continue posting longer tutorials on my own site. But I hope you’ll find my contributions to the cookbook useful.

Here are direct links to some of the articles I have added to the Dreamweaver Cookbook:

The Dreamweaver Cookbook is open to anyone to either request recipes or contribute recipes of their own. It could turn into a very useful resource if people start using it regularly. Check it out!

6 comments January 23rd, 2010

PHP Solutions and two other books now on Kindle

If you’re in the United States and own a Kindle, you can now get PHP Solutions, PHP Object-Oriented Solutions, and Foundation PHP for Dreamweaver 8 delivered wirelessly to you in just a minute after placing your order on Amazon.com. This means that most of my books are now available on Kindle.

The only recent ones not yet available on Kindle are The Essential Guide to Dreamweaver CS3 and The Essential Guide to Dreamweaver CS4. Both are long and contain a large number of screenshots, so it might take some time to convert them. Once they are, though, I’m sure Kindle owners will be delighted at no longer needing to lug such heavy books around. :)

I only wish that Amazon would make Kindle available in Europe (and other parts of the world), too. I’ve been itching to get my hands on a Kindle.

32 comments March 20th, 2009

Essential Guide to DW CS3 in top three programming books

O’Reilly, the leading computer book publisher, has posted the results of a detailed analysis of the state of the computer book market in 2008. What both surprised and delighted me is the revelation that my book, The Essential Guide to Dreamweaver CS3 with CSS, Ajax, and PHP is listed by O’Reilly as the number 3 best seller in what it calls the Large Programming Languages category.

O’Reilly classifies a programming language as “large” if more than 100,000 copies of books dedicated to that language sell during the year. That’s the total for all titles, not how many copies of each book that sell. According to O’Reilly’s data (gathered from Nielsen BookScan, which tracks roughly 70% of book sales in the USA), books on PHP were the third most popular category, selling a total of more than 173,000 units. The bad news is that 129 titles were competing for the same PHP book market, making the average sales for each title a meagre 1,340. I haven’t seen my sales figures for Q4 2008, but I’m pleased to say that the figures for the first three quarters put my sales well above the average. However, they’re not all that big, which is why I was surprised to find my book at number 3. O’Reilly lists the top 5 as follows:

  1. Pro C# 2008 and the .NET 3.5 Platform
  2. Sams Teach Yourself PHP, MySQL and Apache All in One
  3. The Essential Guide to Dreamweaver CS3 with CSS, Ajax, and PHP
  4. Head First Design Patterns
  5. PHP 6 and MySQL 5 for Dynamic Web Sites: Visual QuickPro Guide

It’s interesting to note that three of the top 5 are about PHP, confirming my belief that PHP is a strong language that’s here to stay for a long while.

With so many books competing for a relatively small market, you might wonder why authors like me continue to write. Researching, writing, and editing a book takes many months of hard work—and all for the sake of a couple of dollars royalty on each copy sold. Part of the answer lies in the fact that I like writing. I did it for many years in my career as a radio and TV journalist; it’s what I’m good at. It’s also nice to see my work in print. In TV and radio news, I might have been seen or heard by millions, but once the news bulletin was over, that was it. Although computer books have a relatively short shelf life, they certainly last longer than a news bulletin; and I hope my readers get practical value from them.

The other thing that drives many of us to write is the hope that, one day, we’ll hit the big time. O’Reilly has also analyzed the top three best-selling writers of computer books: David Pogue, Scott Kelby, and Andy Rathbone. Between them, they account for nearly 6 percent of the computer book market. Andy Rathbone, who comes in at number 3, sells more books each year than I have sold since I started writing about PHP and web design five years ago. David Pogue, the biggest seller, clocked up an impressive 190,000 copies last year. I’m sure he’s delighted—and let’s be honest, he deserves success because he’s a good writer—but it pales into insignificance alongside JK Rowling, the creator of Harry Potter.

Anyway, thank you to everyone who bought my book and helped me reach number 3 in the Large Programming Languages category. And thank you to O’Reilly for doing all the number crunching.

6 comments February 27th, 2009

friends of ED website back online

The problem I reported yesterday with the friendsofed.com domain appears to have been resolved, and the main website is now back online. To get the source code for my books, go to the friends of ED downloads page, and select the link for the relevant book. The books are listed alphabetically using the full title, so for example The Essential Guide to Dreamweaver CS4 is listed under T, not under E. You can also get the source code from my site, as indicated in yesterday’s post.

If you’re contemplating buying one of my books, and want a better idea of what they’re like, sample chapters in PDF format are available for each title. Just go to the list of web design books at friends of ED, and click the link for the title you’re interested in. This brings up a description of the book; you can download the sample chapter from the links on the right.

6 comments February 22nd, 2009

Source code for my books

Normally, the source code for my books is available from the downloads page of the friends of ED website. However, there appears to be a problem with the friendsofed.com domain registration, and the site is currently offline. I have no idea how long it will take friends of ED to get back online, so I have uploaded the source files for my Dreamweaver and PHP books to my website (foundationphp.com).

You can find a link to the zip file for each book at the bottom of the following pages (files added for “Foundation PHP 5 for Flash”):

The problem with the main friends of ED website does not affect the friends of ED forum, where you can post any questions about the books and any problems you might encounter.

6 comments February 21st, 2009

New setup procedure for phpMyAdmin 3.1.x

I seem to be jinxed with the way phpMyAdmin “celebrates” the publication of one of my books by changing its setup process. It happened twice with Foundation PHP for Dreamweaver 8. I updated the instructions between the first and second printings, but was caught out by a second change. Now it’s happened with The Essential Guide to Dreamweaver CS4 with CSS, Ajax, and PHP. The book was published on 1 December, and on the very same day phpMyAdmin 3.1.0 was released, changing the setup procedure yet again.

I’ll create a full tutorial on the revised procedure when I get time, but you can find a summary of the main differences on the updates page for The Essential Guide to Dreamweaver CS4.

20 comments December 7th, 2008

Problem with PHP 5.2.7

PHP 5.2.7, which was released last Thursday (4 December), has a bug that prevents “magic quotes” from working. If you rely on magic quotes, do not install PHP 5.2.7. Either revert to PHP 5.2.6 or wait until a fix is released. The bug has been fixed in PHP 5.2.8. the “snapshot” version of PHP, which can be obtained at http://snaps.php.net/

If you turn magic quotes off in PHP—which you should—you won’t be affected by this bug. It serves as a reminder that magic quotes are due to be removed in PHP 6. Magic quotes were originally introduced to make life “easier” for inexperienced developers by automatically inserting a backslash in front of single and double quotes in user input to prevent problems with database insertion. However, they have proved more trouble than they’re worth. Instead of magic quotes, you should use dedicated functions, such as mysql_real_escape_string(), or prepared statements with MySQLi or PDO to handle quotes and other special characters and protect your database from SQL injection attacks.

9 comments December 7th, 2008

Video tutorials: local PHP testing server in Dreamweaver

Defining a local testing server in Dreamweaver isn’t difficult, but a surprising number of people get it wrong. So, I have created a couple of video tutorials that describe the options and then take you through the actual process in the Site Definition dialog box. Because the options are different for Windows and Mac OS X, I have created separate tutorials. Both are approximately eight minutes long.

The tutorials are hosted on an Adobe site, and the videos start automatically after opening in a new window. A control panel lets you skip to different sections of the tutorial, and most of the text can be read by opening the Notes tab. The videos are resizable, but are best viewed in a 1024 x 768 browser window. The Windows tutorial is here, and the Mac one is here.

2 comments November 21st, 2008

Essential Guide to Dreamweaver CS4—Coming soon

Adobe has officially announced the forthcoming release of Creative Suite 4, including Dreamweaver CS4, which I consider to be the most significant upgrade to Dreamweaver since 2002. Over the past few months, I have been beavering away rewriting The Essential Guide to Dreamweaver CS3 with CSS, Ajax, and PHP to bring it up to date with all the new features in CS4. Every chapter has been rewritten, and there’s a lot of new material, including coverage of time-saving features, such as Related Files, Live view, and the Code Navigator. The coverage of Ajax has also been strengthened, with a new chapter that helps you get under the hood of Spry, Adobe’s implementation of Ajax, as well as working with other JavaScript frameworks, such as jQuery and the Yahoo! User Interface (YUI) Library. The Essential Guide to Dreamweaver CS4 with CSS, Ajax, and PHP is due to be published on 1 December. More details here…

17 comments September 23rd, 2008

Heigh-ho, it’s off to print we go

I got word from the production manager of my latest book, PHP Object-Oriented Solutions, that everything has gone to schedule, and the book shipped to the printers just before the weekend. It usually takes about three weeks after sending all the chapters and images to the printers before a book appears on the shelves in bookstores. I’m told that 18 August is now the official publication date. The eBook version should be ready about a week earlier (a link will appear on the book’s page on the friends of ED site as soon as it’s available).

I’m quite pleased with the way the book has turned out. Well, I would be, wouldn’t I? ;)

It’s aimed at readers who already have a good understanding of PHP, but it doesn’t assume any prior knowledge of object-oriented programming (OOP). Although the book is devoted entirely to OOP in PHP, it makes the point right from the start that OOP isn’t a replacement for everything that you have already learned, but an extra, very powerful tool to add to your skillset. The book concentrates on a small number of custom-built classes that can be reused in a variety of projects. It also uses some of the built-in classes, such as DateTime, DateTimezone, SimpleXMLElement, and XMLWriter.

One chapter that turned into a voyage of discovery for me deals with the Standard PHP Library (SPL). Even though SPL has been part of PHP for more than four years, the documentation is difficult to follow. Once I peeled away the mysteries of the various iterators, I realized just how powerful they are. An iterator lets you use a foreach loop on an object, which is pretty useful in itself; but what makes iterators really useful is the way you can combine them. For example, I used a DirectoryIterator in combination with a RegexIterator and a LimitIterator to display a long list of images in a folder just ten at a time. Without SPL, it would have taken a lot of code. With SPL, just half a dozen lines.

PHP Object-Oriented Solutions is exclusively focused on PHP 5 (and ready for PHP 6 when it eventually emerges). The code will not work with PHP 4.

21 comments July 29th, 2008

Previous Posts


Calendar

March 2010
M T W T F S S
« Jan    
1234567
891011121314
15161718192021
22232425262728
293031  

Posts by Month

Posts by Category