What is Larry Thinking? #19 => Adobe AIR, RIA, and Nothing About Zebras

January 29, 2009

In this edition…

About this Newsletter

Three big things in this here newsletter: a request for feedback on my forthcoming e-commerce book, potential work for a professional graphic/Web designer, and a book giveaway. I expect I’ll get plenty of replies to this newsletter! Thanks in advance for reading, for your interest in my books, and for any comments and questions you may have. (As an aside, I’m finishing this as I have a head cold, so my apologies if there’s some really wonky writing in here!)

On the Blog => Comments for My Forthcoming E-Commerce Book

As I mentioned in my previous newsletter, Peachpit Press has agreed to publish my E-Commerce with PHP and MySQL book (the actual title is still being determined). I have lots of thoughts about what I’m hoping to do with the book but wanted to reach out to you, the potential reader, for more feedback; after all, the book will be for you, so I really want to make sure I’m providing everything that people want (which isn’t possible, of course, but I want to get as close as I can). In short, the book will cover everything you need to know to create an e-commerce site using PHP and MySQL. It will not teach either techology, or their installation, as the book will have to assume basic PHP and MySQL (and HTML and CSS) knowledge. So it’s very much an application of the technologies kind of book, like the popular example chapters in my “PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide” books.

The specific topics to be covered will include: designing the database, creating an online catalog, implementing a shopping cart, taking orders, and the administrative interface. This is the basic stuff that’s comparatively easy to do, and I’ve written about it in previous books. But, as I said, I want to cover everything, so this book will also include demonstrations for using two payment gateways (probably PayPal and another), using HTTPS, handling order fulfillment, etc. In order to cover the subject as thoroughly as possible, my hope is to create two examples. One would sell physical products that need to be shipped (in which case the user can’t be charged until the thing actually ships, requiring another admin step); the other would sell virtual products, like PDFs to be downloaded or subscription services to a Web site. Again, one would use PayPal, the other would use another payment gateway (to be determined). I think I’ll write both procedurally, so as to be as inclusive as possible (my “PHP 5 Advanced” book has an object-oriented shopping cart example), unless I decide to use something like the Zend Framework for one example. I feel like I have more thoughts on this that I’m forgetting but that should be enough for now. If you have any thoughts, questions, suggestions, etc., please either reply to this email with them or post them as a comment on the associated blog thread (note: blog comments need to be approved before they become visible).

On the Blog => Speeding Up Your Web Site

I just finished three blog posts discussing my process of testing, then fixing, my Web site’s performance. I used a product called YSlow, by Yahoo!, which works as a Firefox plug-in. It generates a report of issues that may be slowing down the site. I then walk through what some of those issues mean and the fixes I instituted. For details, start the reading at: http://blog.dmcinsights.com/2009/01/06/speeding-up-web-sites-using-yahoo-yslow/

On the Web => MaxMind JavaScript Web Service

Someone was kind enough to send along this link to the MaxMind JavaScript Web Service (http://www.maxmind.com/app/javascript/). This is a JavaScript-based geo-location service (i.e., it estimates where in the world the user is based upon their IP address). I haven’t personally used it but get asked about such things and thought I’d pass it along. Thanks, Jimpat!

Q&A => About Adobe AIR

In response to a previous newsletter, I was asked these two questions about Adobe AIR (of which I’m a very big fan): What will be the biggest advantage to AIR over something like Python or Java? Will you be able to load an AIR application onto a box, without having to load any other software?

The answer to the second question is “No”. Every Adobe AIR application requires that the AIR runtime be installed, although it only needs to be installed once. This is just like a Java application, which requires the Java runtime.

As for the biggest advantage, AIR allows you to create cross-platform, graphical applications, using the technologies you already know. So if you know HTML and JavaScript or Flex or Flash, you only need to learn how to apply these technologies differently, so the learning curve is really nice. But you can also create graphical applications, just as you would a Web page or Flash interface, which is much easier than creating graphical applications in a programming language like PHP, Ruby, Python, Perl, C, C++, or Java. And, finally, the abilty to create true, reliable cross-platform applications is fanatastic. AIR’s cross-platform capabilities are well beyond what I’ve witnessed using other technologies.

Again, I’m a big fan and think it’s well worth everyone’s consideration. In fact, I’ll be doing some Web sites this year and instead of creating a Web-based administrative interface for the clients to manage content, I’m going to start delivering desktop AIR applications they can use instead (in particular, this will be a much better way for the clients to transfer large video files to the server).

What is Larry Thinking? => Finding a Graphic Designer

I’ve been asked before how I go about finding graphic/Web designers for the projects I work on (because I’m clearly not qualified to design visual things myself). The answer is that I search online, contact people whose sites I like, use job sites, etc. Well, for a change of pace, I’ve decided to send out this feeler for potential graphic designers. I have a couple of Web projects coming up that require professional design skills. If you are a professional graphic/Web designer and are looking for work, please let me know. Be sure to include links to your portofolio and/or Web site, a sense of your rates, and whatever else I might need to make this decision. Please, experienced, professional designers only.

What is Larry Thinking? => Rich Internet Applications

As much as I don’t care for buzzwords and catchphrases (don’t get me started on “Web 2.0”), I thought I’d write a bit about Rich Internet Applications (RIA). I don’t know that there is a great definition of what exactly a Rich Internet Application is, but it’s sorts of one of those “you know it when you see it” kinds of things. I guess I would say that RIA’s behave differently in the Web browser than standard Web pages in as much as they respond to the user’s actions without overt server requests. For example, with a standard Web page, a form is displayed and, when submitted, the browser clearly reloads with the server’s response. RIA’s handle such responses and update the page accordingly, without redrawing the entire page. This experience is better for the end user because it’s more like what they’re used to with standard desktop applications and because it can also perform better than the old style Web pages. Although the concept of RIA’s has been around for a while now, I’ve only started doing them myself in the past couple of years. My background is in server-side technologies, so I never did much on the client previously. But Rich Internet Application’s are, in part, server-side interactions within the client, so it’s only logical that I started creating them (although my graphical skills are still very limiting).

Rich Internet Application’s can be created using a number of technologies, the two most popular being JavaScript and Flash. JavaScript, on its own or as part of an Ajax process, is really quite capable, and supported by most Web browsers. What used to be thought of as a toy programming language, can now provide real features and functionality to end users. In my Ajax book I talk about writing JavaScript from scratch, which is fine and a logical place to start, but if you really get into RIA’s, you’ll likely want to use a framework. I used to use script.aculo.us and YUI but am starting to get into extJS and jQuery. I’ll probably write more about JavaScript frameworks in a future newsletter.

Flash is also very capable, but requires that the user have the Flash plug-in installed. But the numbers I’ve seen put support for Flash at near 100%. Flash is geared towards graphic designers, and uses ActionScript (which is a lot like JavaScript) for the programming. Flex is a more programmer-oriented alternative to Flash, but it also generates a SWF file that’s run using the Flash plug-in. Flex also uses ActionScript but the primary Flex document is in XML format. I’ve just started using Flex myself, and have been really impressed. I’ll probably write more on it in future newsletters as well. For an introduction to Flash and Flex, check out Adobe’s site or the articles at Sitepoint.

An alternative to Flash/Flex is OpenLaszlo. I haven’t personally used it, but think it may be worth considering. One apparent benefit of OpenLaszlo over Flash/Flex, is that the code you write in OpenLaszlo can be outputted as either Flash or Dynamic HTML (DHTML). In other words, in one step you can make a version of a RIA that runs using Flash or, if the user’s browser doesn’t support Flash, it’ll run using HTML and JavaScript.

Right now, I’m using JavaScript with jQuery or extJS to make any Rich Internet Applicaiton that I need. This is because I’m comfortable with JavaScript and have already been using it. I’m likely to start using Flex as well, though, as it’s pretty impressive and helps cover my lack of graphical skills. And since it uses ActionScript, I’ve been surprised how easily I’ve picked it up (although a lot of credit goes to using the $300 FlexBuilder IDE, which isn’t required).

Book Giveaway

You must be subscribed to the newsletter to qualify for the book giveaway.

My Book News => My E-Commerce Book!

The big news is the e-commerce book, discussed earlier, although there may be more announcements in future newsletters (that’s what we call a “tease”)!

For those of you interested, I am continuing to work on my free online JavaScript reference. Unfortunately I’m getting about a page done each week, while coming up with ideas for several other pages each week. Not good math…