In this edition…
- About This Newsletter
- On the Web => Second Example Site for “Effortless E-Commerce with PHP and MySQL”
- On the Web => 10 Sites Developers Should Have in Their Bookmarks
- On the Web => Scrivener for Mac
- On the Blog => “Effortless E-Commerce with PHP and MySQL” Complete Table of Contents
- On the Blog => “Effortless E-Commerce with PHP and MySQL” Highlights
- On the Blog => Stored Procedures in MySQL
- What is Larry Thinking? => My First iPhone-Centric Web Site
- Book Giveaway => “Effortless E-Commerce with PHP and MySQL”
- Larry Ullman’s Book News => “Effortless E-Commerce with PHP and MySQL”, Again!
About This Newsletter
For the past six weeks, all of my time, or as much as possible, has gone towards completing my “Effortless E-Commerce with PHP and MySQL” book. (This is why it’s taken me so long to get this newsletter out, for those of you that pay attention to such things.) But the book is essentially done now, so I can start thinking about, and doing, other stuff, like trying to get a newsletter out on a semi-regular schedule. Ironically, this newsletter ends up being largely about the e-commerce book. There’s an old adage that says, “Write what you know”. Well, I know a fair amount, but right now, my head is full of e-commerce! As always, thanks for reading and for your interest in my work!
On the Web => Second Example Site for “Effortless E-Commerce with PHP and MySQL”
The second example site developed in my “Effortless E-Commerce with PHP and MySQL” book is now online. You can view it at http://ecom2.dmcinsights.com. This is a fully functioning site, at least in terms of what you learn how to do in the book. It is hooked up to a payment gateway (Authorize.net), in test mode. Test credit card numbers are listed for you to use. The code for the site can be downloaded from the book’s corresponding Web site (www.dmcinsights.com/ecom/). I’m going to figure out a reasonable way to make the administrative side of the site usable, too.
On the Web => 10 Sites Developers Should Have in Their Bookmarks
Some time back, I StumbledUpon this post: 10 sites developers should have in their bookmarks. I wasn’t familiar with many of them, but am now. I particularly like the MySQL Format Date site (something I’m always looking up), the .htaccess Editor (ditto), and test everything, which will do lots of stuff at once: validate the CSS and HTML, check SEO factors, and so forth. Most of the comments in response to the post are people similarly indicating surprise that they were unfamiliar with these bookmarks, but you’ll find some additional recommendations there as well.
On the Web => Scrivener for Mac
For this edition of the newsletter, #31, I’m trying a different writing process. Up until now, I’ve written the newsletter (which gets sent in HTML and plain text format) using either my programming text editor (BBEdit or TextMate) or my information manager (Yojimbo). Once I’ve completed a solid draft of the whole newsletter, I paste it into the mailing list software (PHPList), then do another round of edits and formatting, send a test message, and do a last round of edits before sending it out. Well, a lot of that work will still remain, but I’m initially writing this newsletter using Scrivener. Scrivener isn’t a programming tool or a development tool; it’s not even really a word processor; it’s just a good writing environment (it’s only available on the Mac). Scrivener was created by a writer, for writers, with the aim of having only the features required, leaving out anything superfluous.
The key thing about Scrivener is how it helps you organize your project. In writing the newsletter, I’ll look for reader emails that I’ve set aside in my email application, bookmarks in my Web browser, and posts in my blog. When I’m writing a book, I’ll have a table of contents in Word (for the publisher), another version in Pages (annotated, for my benefit), plus bookmarks in my Web browser and code-based notes among the code itself. In both cases, the writing process itself means constantly switching programs to look something up: a URL, the title of a chapter, what I wanted to say about a subject, etc. With Scrivener, there are just two areas (three if you want to count the Trash): Draft and Research. All the writing goes into the Draft area and all the research materials (and Scrivener supports many formats) go into Research.
All of the content, including the writing and the research materials, can be as atomic as makes sense. For example, this newsletter alone is represented as 11 different items. This allows me to look at just one section at a time, making it much easier to navigate the whole document. Plus I can use Scrivener’s Outliner and Corkboard interfaces to easily reorganize the content. For each newsletter I write, there’s one folder in Drafts. All of my potential material for every newsletter can then go in the Research area. When it becomes time to send the newsletter, which is to say import it into PHPList, I can easily select all of the material—all eleven files—as if they were a single document.
I’m just getting started with Scrivener but it seems promising (and the reviews have been spectacular). I’m starting to use it for the newsletters and will apply it to my next book to see how that goes. An interesting thing about Scrivener is that it has minimal formatting capabilities. When I go to write a book, I’ll need to export documents from Scrivener, then import them into the Word template for final formatting. When I go to self-publish a book, I’ll export the text from Scrivener, then import it into InDesign to lay it out myself. This may seem like doubling the work required, but it actually allows the writer to focus: write the content first, worry about the cosmetics later. Of course, describing applications in words often falls short, so if you’re curious, check out the videos available at Scrivener’s Web site.
As two little asides, a couple of things that stand out about Scrivener from a marketing standpoint…First, it comes with a 30 day trial, which isn’t unusual, but it’s 30 days of use, not 30 calendar days, which is cool. Second, Scrivener’s Web site talks about what the application does and doesn’t do, who it’s for and who it isn’t for. I really appreciate the candor and being willing to stand by one’s product. The site even recommends alternative applications that may be more appropriate to other needs. Now that’s confidence!
On the Blog => “Effortless E-Commerce with PHP and MySQL” Complete Table of Contents
I’ve posted the updated table of contents for the e-commerce site on the blog and also on the book’s dedicated page. The blog page has some annotations that you might be interested in, however.
On the Blog => “Effortless E-Commerce with PHP and MySQL” Highlights
In reviewing the PDF versions of the e-commerce book, I’ve had the chance to reflect a bit on the book as a whole, in particular what it does well about which I’m particularly pleased. I briefly discuss ten highlights on my blog.
On the Blog => Stored Procedures in MySQL
The second example project in my “Effortless E-Commerce with PHP and MySQL” book uses stored procedures exclusively for the public side of the site. Stored procedures are a way of recording memorized bits of code in the database (kind of like user-defined functions in PHP or other programming languages). By integrating stored procedures, the e-commerce site is more secure, will perform better, and allows me to really separate my PHP code from my database queries and logic. For more on this see, https://www.larryullman.com/2010/08/26/mysql-stored-procedures/.
What is Larry Thinking? => My First iPhone-Centric Web Site
Despite the fact that I’ve been developing Web sites for over a decade now, I have yet to create one intended for mobile devices. This is partly because I don’t even have a smart phone myself, so I don’t think about it, and partly (largely) because I tend to do Web sites for educational purposes, which aren’t logically applicable to mobile use. But I’ve been working on a small, personal Web site and ended up creating a stand-alone iPhone version for it, which was an interesting experience.
The site in question actually goes back to the first Web site I ever created. Back in 1999, I tried to create a series of CGI scripts in Perl for an online (American) football pool that I run with my friends. Frustrated with Perl and CGI, I discovered PHP. I was able to get that site working, complete with dynamically generated graphs and more, in no time. Well, that rusty old site was cobbled and hacked and lasted well past its prime, so this year I decided it was time to create a more modern version (I’m not saying “Web 2.0”, though). I initially thought I’d use Yii for the site but quickly realized it’d be overkill for this particular project. So I used straight-up PHP and MySQL, added a splash of jQuery, and I was quite pleased with the results. But several of my friends have iPhones and complained about a particular aspect of the site not working well on their iPhone. Why they can’t just use the site during the 50 hours a week they’re at their computers, I don’t know, but, I thought I’d make a dedicated iPhone version of the site.
The first issue, of course, is that I still don’t have an iPhone to test the site on and I’m not going to buy one (the $200 for the phone isn’t the issue, it’s the $80/month one has to then pay for service). Fortunately Apple provides a great iPhone Simulator as part of their iOS (i.e., iPhone, iPod, and iPad) software development kit. The iPhone Simulator is a stand-alone application that allows you to use Safari on the iPhone to test real projects (aesthetically, the Safari Web browser on your computer shares many of the same properties as the iPhone’s Safari).
Then I turned to iWebKit, a framework for creating iPhone-specific sites. Really, the iWebKit is just pre-defined CSS, JavaScript, and images that make a Web page look more like an iPhone app, but it works really well and is easy to understand (the attractive user guide is only 13 pages long). To create the iPhone version of the site, I copied the key PHP scripts from the existing site and threw them in a new directory. Then I edited those scripts so that instead of creating DIVs and H1s, in keeping with the site’s main template, it creates different DIVs, ULs, and LIs, in keeping with the iWebKit system. I was able to do it all in about two hours, I figure, and I think it looks and works great.
Of course, the iPhone is capable of viewing standard Web sites, but the interface may be less than ideal and the use of JavaScript can create problems. On the other hand, there are now two versions of the Web site that I need to maintain (when I need to maintain them, that is), which is something to consider. But if you’re curious about creating an iPhone version of a Web site, be certain to check out iWebKit and Apple’s iOS SDK. If you’d rather not download the entire SDK (and I don’t think it’s available for Windows anyway), there are online iPhone emulators, too.
Book Giveaway => “Effortless E-Commerce with PHP and MySQL”
You must be subscribed to the newsletter to qualify for the book giveaway.
Larry Ullman’s Book News => “Effortless E-Commerce with PHP and MySQL”, Again!
So my news, in case you haven’t caught on, is that the “Effortless E-Commerce with PHP and MySQL” book is done, and will head off to the printer next week (October 5th, I believe). I think it’ll be in bookstores then in late October or early November. I’ll post an update once I know it’s available. I don’t currently have any information about it being published in electronic or other formats, but will also post that information once I do. I always try to support my books primarily through my forums, but also through email and, less frequently, through my blog. For the e-commerce book, there were a ton of additional ideas and alterations that I came up with that couldn’t make it into the final text. So for this book I’m going to do even more towards creating and discussing extras on my Web site.
I’m also pleased to say that I’ve already lined up my next two to four books. By the end of this year I’m going to complete the fourth edition of my “PHP for the Web: Visual QuickStart Guide”. That will come out in February, I believe. I’ll talk more about it in future newsletters. Then, in the spring of 2011, I’ll write the fourth edition of my “PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide”. So, two physical books already planned for 2011!
I’m also still hoping to self-publish a JavaScript book. In order for that to actually happen, I’m going to have to make a point to work on it over the next few months, or it could easily be a year before I write another word on the subject. Maybe Scrivener can help me in this regard! In fact, I’m going to create a new Scrivener project for the JavaScript book as soon as I send this newsletter out! I’m also thinking about self-publishing a complete guide to the Yii framework. As always, thanks for your interest in my work!