Monday, April 27, 2009

Sexy Web Design: Creating Interfaces that Work

Author: Elliot Jay Stocks Format: Paperback, 172 pages Publisher: SitePoint (March 28, 2009) ISBN-10: 0980455235 ISBN-13: 978-0980455236 There are just about a ton of web design books on the market. Better make that two tons. What makes this one so different that yet another book on the topic graces the shelves of our local bookstores...I mean, besides the fact that it's "sexy"? In terms of design (and a lot of other things), the term "sexy" doesn't quite mean a scantily clad curvy woman or buff man (although I suppose it could). It means a design that is highly attractive and appealing to the eye. Erotic imagery is used to sell everything from cars to sunglasses because it attracts attention. Anything that attracts (positive) attention to your web site design can be considered "sexy". Is this book "sexy"? Does it teach "sexy" design? Let's find out. I suppose it helps that the object on the book's cover is a two-tone '57 Corvette Stingray. Classic sports cars are "sexy", and I think the classic lines of a jet black 'vette are totally hot. However, Jina Bolton uses the word "sexy" at least eight times on the first page of the Foreword. Perhaps she's just trying to define the author's terms, but overuse of this particular vocabulary word could make it, and the concept, old fast. Who should read this book? Glad you asked. According to the Preface, the field is wide open. Anyone, from the web design newbie who has just installed Dreamweaver on his or her PC for the first time, to the seasoned design veteran who is an expert at the nuts-and-bolts of web design but needs help in the "art department". That's usually the kind of book you want to write when you want your book to appeal (be sexy) to the widest possible audience (and thus sell to the widest possible audience). As I was thumbing through the book's front matter, I was still waiting to see if the hype was worth the price of the content. I saw that the book was supported by a web page on the SitePoint site. Having recently had a bad experience with a supporting (or rather non-supporting) site for a book I'd reviewed, I decided to check this one out right away. No promise of being able to download the source code for the book (you'll see why later in the review), so I didn't bother looking for that. There was the promise of an errata page which I found, but the book's only been available for a month, so I wasn't surprised that nothing had been submitted as yet. Otherwise, the site hosted "the usual suspects" including a sample chapter, the TOC, much of what I'd already read in the front matter, and so forth. Like other, similar web design books (including ones published by SitePoint), the book is written to appeal to the artist or, in the author's words, "The reason I'm a designer is a simple one: I like making stuff look pretty". This actually is a better book for the non-artist who usually needs more help in designing an attractive website, as opposed to mastering the mechanics of building a website. Even if you know HTML, CSS, and JavaScript to the best of your ability and can do web design while doing the ironing, taking out the trash, and watching American Idol (you poor thing), you may still not be able to design an attractive website. Frankly, no one is going to marvel at your technical excellence in web design if your sites look ugly or even just "ho hum". On the other hand, you will be marvelled at (and hired) if your sites are technical wonders and look fabulous. Chapter one is all about the description of the design process, beginning to end. I've seen this in a number of other books, but it is sometimes neglected when it should be required. It's not enough to know the technical aspects of the various languages involved; you also need to understand planning and intent of a site. The chapter, though small (and the whole book is less than 200 pages), is packed with examples of each of the author's points. In fact, in each page's footer is the URL to the sites used as examples, so you can view them in your web browser as you're following along in the book. While Chapter one is a summary of the entire process, Chapter two focuses more on the specifics of the research involved in web design. So far, there is no hint at even a scrap of code, so much of what goes on in the first 43 pages is conceptual. I was expecting to see some code pop out at me in Chapter 3, but such was not the case. Instead, next on the agenda was a chapter outlining site structure. Again, information was presented from a conceptual rather than "practical" point of view. So far, all the tools you really need to work with this book and to learn its lessons are a pad and a set of markers. Sketching and diagramming both the form and substance of a site are emphasized, but don't expect to see a bit of HTML and CSS at this point. In fact, will it ever appear? Actually, no. This book doesn't teach you how to produce the various design effects it describes in terms of using HTML and CSS but rather, how to plot, plan, and scheme what makes a sexy site sexy. From this perspective, the book doesn't stand alone, particularly for the design newbie who has just installed Dreamweaver on their PC but hasn't done anything else. Yes, it is important to understand every single word of what this book describes if you truly want to create more than just a standard, run-of-the-mill site, but if you don't know how to translate your planned design into an online reality by using the necessary technologies, you might as well just hang all of your drawn designs on your bedroom wall and call them "art". This actually isn't a slam against the book. As I said, the concepts it teaches are highly valuable, especially for the technically adept web designer who may have only gotten a "C" in their "Introduction to Art" class. That said, you'll still need to be technically adapt in order to make any practical use of what the book teaches, particularly since Stocks doesn't actually teach how to turn his "pretty" designs into web pages that'll display in a browser by referencing the necessary code samples. Master the craft first, then buy this book to study the art.

Monday, April 20, 2009

Book Review: JavaScript for Programmers

Authors: Paul J Deitel and Harvey M Deitel Format: Paperback, 448 pages Publisher: Prentice Hall PTR; 1st edition (March 26, 2009) ISBN-10: 0137001312 ISBN-13: 978-0137001316 When I saw the title, I assumed that this was a somewhat advanced book and not for the reader who was learning JavaScript for the first time. I work for a company that develops web applications, and they make extensive use of JavaScript. Each of the developers is well versed in JavaScript and other web programming languages, and I thought this was a JavaScript book for the experienced programmer. With that assumption in place, I was surprised to see a comment on the back of the book state "One of the best introductions to JavaScript" (from a pre-publication review by Raymond Wisman, Indiana University Southeast). An "introduction" to JavaScript? Even a casual scanning of the back cover reveals that the book is supposed present a vast cornucopia of JavaScript related topics. Deitel and Deitel have written quite a number of programming books, so I was interested to see if this indeed was a book where one could learn JavaScript from scratch. The Deitels have written a significant number of "How to Program" books for languages including C, C++, Java, and Visual Basic, but no "How to" book appears on their website (until this one apparently) for JavaScript. Why not "JavaScript How to Program" instead of "JavaScript for Programmers" if this is a beginner's book? Despite the title, the book is structured for the "extreme" beginner, starting with the history of the Internet, the World Wide Consortium (W3C), Web 2.0 and so on. Going through the Preface material, I found a lot of information, especially about Deitel and Deitel, as well as Deitel and Associates, Inc. (apparently, they like to promote themselves a lot, but after all, business is business), but nothing that specifically stated the identity of the target audience. Since the book is structured to present XHTML and CSS first, I could only imagine that the book would be suitable for someone who didn't know those technologies. The majority of the book (eight chapters) is devoted to JavaScript (as it should), while the two ending chapters contain content on XML, RSS, and Ajax. That's quite an ambitious mouthful to teach the newcomer to web development. Anxious to try out the book, I dutifully followed the Before You Begin instructions and attempted to download the source code from the listed link: That's when I got a big disappointment in the form of a "The page cannot be found" error. I rechecked the URL and I had typed it as printed in the book. I went to the Deitel site to see if I could just navigate to the source code, but not only was the code not present, there was no mention of the book at all. I went to the publisher's site to see if perhaps the source code was there. I did find it and I could download the source code for chapters 2 through 13, I'd need to download the files for each chapter as individual zip files. I looked for an errata page at InformIT to see if a change had been made regarding the stated location of the source code, but there was none. The errata page at the Deitel site didn't mention the book at all. I don't mind doing my research when I'm learning something, but I wouldn't expect the reader to have to work this hard when they're not even in Chapter 1 yet. I skipped the Chapter 1 history lesson and opened the book to Chapter 2, since I'd downloaded the sample code for the chapter. The zip file contained a number of rather simple HTML files. Nothing to write home about, but I guess you'd expect that if you were starting from the beginning. Actually, Chapter 2 is a crash course on HTML, including how to create lists, tables, forms, and links. The information was compressed, but entire books are written on basic HTML, and I wondered if the complete beginner was supposed to "get it" in one brief chapter. The very last entry in the chapter though, was a link to a page on the site containing all kinds of external links to information and tutorials on HTML. Apparently, the Deitel site is supposed to provide serious support to this book (lack of code samples or even a mention that the book exists aside). Chapter 3 was the other bookend to Chapter 2 and offered up a quick and intense course in CSS to the reader, with another link at the end to a web page packed with external links to all things CSS, including books on CSS by other publishers such as O'Reilly. I was beginning to see that, depending on the reader's level of experience and how quickly they learned, it might take awhile to work through this book. If I knew nothing about HTML and CSS and I only had 2 chapters in a book to teach me those languages, I might end up spending some time on the recommended links pages on the Deitel site, doing a bit of self study before tackling the JavaScript section. I rather expected the JavaScript chapters to be more self contained than the others, since its the main focus of the book. While that's true, I did find that the end of each JavaScript chapter did include a link to a JavaScript resources page on the Deitel site, so the book is written with the general philosophy of the web containing everything the book can't. As I continued to move through the book, I was taken on a path using more "baby steps" as bit by bit, the JavaScript tutorial began to unfold (if you'll pardon the mixed metaphor). I will admit, I didn't download each of the chapter's code examples (I may later and, if what I find is significant, I'll publish an update to this review), but what I saw did seem to work. That's important, since one of the common complaints I hear from programmers, is that sample code often doesn't work as advertised, as if the code were never tested and debugged prior to the book being published. The good side of this book is that it is written to take the very beginner from basic XHTML and CSS and gently help them through the process of learning how to program in JavaScript. The bad side is that the reader has to work up front to even find the sample code, and it's as if Deitel and Deitel didn't think enough of their latest work to even mention it on their site. For a company that creates training material for a living, that's not a very good way to back up their book. Good thing the support pages were accessible with all of their external links to a wider collection of tutorial material. They say a first impression is a lasting impression. If that's so, no matter how good the later parts of this book are written, getting past the first bits didn't help my first time experience with a Deitel book.

Monday, April 13, 2009

The Manga Guide to Electricity

When I reviewed The Manga Guide to Databases over two months ago, I wasn't sure I was going to review any of the other Manga books. I knew that No Starch was going to publish others, but the only ones I was aware of at the time dealt with statistics and calculus; not two of my favorite subjects. When the notice for The Manga Guide to Electricity hit my inbox though, I thought it looked like fun. I was right. While I wasn't originally sure what audience the Databases book was written for, this Electricity book is securely written for the high school audience, though I suppose even younger students would benefit. The heroine of our story is an average high school student named Rereko who lives in the city of Electopia; a city totally run by electricity. Apparently, it's a big deal if you fail your electricity final and you live in a city where electricity is the main product. That's just what happened to Rereko. Sentenced to that most dreaded of fates for most students, summer school, Rereko has just one more shot at passing the exam and graduating. Enter her tutor Hikaru, who uses innovative and imaginative methods (such as manga) to help our young student "get it". That's just the point of this book as well; to help students who might not otherwise be particularly interested in learning electricity (or at least not interested in the usual teaching texts) "get it" in a fun and playful manner. The book is formatted in the way I imagine the entire series is set up. The main "learning" text is presented as a typical manga comic book, and a summary section at the end of each chapter that is just plain text and diagrams. Let's imagine that you're taught a topic by a cartoon and then you're presented the same material in a more standard format to see if you really understand. This is just how I pictured the Databases book; as a text that teaches you the basics in manga format and prepares you to learn more on the topic from "non-manga" materials. The No Starch Manga series aside, you can't expect to learn everything in manga, can you? Actually, the book superficially reminded me of my own first experience "learning" about electricity. In my case it was from a Reddy Kilowatt comic book in the fourth grade (back in the days when dinosaurs ruled the Earth). I vaguely recall a school field trip to my local electric plant and getting a Reddy Kilowatt lapel pin (which has probably long been relegated to the bottom of a landfill somewhere). Our typical exposure to manga or anime in America, usually leads us to expect scantily clad, buxom women, spaceships, super powers, and explosions. When I published the Databases review on this blog, one of the comments I got was about the lack of "boobs" (the main characters seemed to be in elementary school in that book). Sorry. The older age group represented by the main character hasn't changed the presentation of material. No explosions, no super powers, no space ships, and no (apparent) breasts. In other words, nothing that would tremendously distract the audience from the topic at hand. Japanese manga is sometimes used as a way to educate, not only on factual topics, but on morality and ethics, particularly the value of cooperation and respecting others. You have to keep that sort of philosophy in mind when reading this book (since it was originally published for a Japanese audience). The book won't teach you to be an electrician or an electrical engineer, but it will ground you solidly in how electricity works, including it's creation, how it's influenced, and manipulated. Concepts of current, capacitance, potential, voltage, and so on, are all well taught, including the primary methods used to generate electricity in the world today. The result of this book may be enough to help the reader pass an exam similar to what Rereko faces, and possibly for a few, it might spawn enough curiosity to explore the topic further. Lest we forget, there's an actual storyline involved. OK, it's not an amazingly compelling storyline (no super powers or explosions, remember?), but Rereko still has to pass her final so she can graduate. During the process, she and "Sensei Hikaru" develop a friendship (and she discovers he's a lousy housekeeper). By the last page, we see the happy ending, and as Bogart says at the conclusion of Casablanca, "I think this is the beginning of a beautiful friendship"...and a pretty good book.

Monday, April 6, 2009

Review: Head First PHP & MySQL

Authors: Lynn Beighley and Michael Morrison Format: Paperback, 812 pages Publisher: O'Reilly Media, Inc. (December 30, 2008) ISBN-10: 0596006306 ISBN-13: 978-0596006303 The good news is all you need to use this book is some prior experience building static web pages using HTML/XHTML...sort of. That's what the Who is this book for? section says. However, the Who should probably back away from this book part says that anyone who isn't familiar with basic programming concepts like variables and loops should steer clear. On the other hand, the same section declares that those basic concepts can be learned from this book. OK, just a tad confused here. Actually, the one piece that would bind all this together would be the mention of JavaScript (and there's a Head First book for that, too). Not sure why JavaScript wasn't mentioned, but it would have been a good bridge linking the rank web design beginner to this book, since JavaScript also makes static HTML pages dynamic. Also, folks familiar with JavaScript would certainly be familiar with basic programming concepts. Be that as it may, let's move on. This book contains certain predictable bits that you'd expect in any Head First book. It's loaded with diagrams, graphics, and "retro" photos from what looks like old 1950s sitcoms. It's written for someone who forgot to take his or her Ritalin today and is in desperate need of said medication. The book teaches technology using scenarios that at least the book series and O'Reilly considers interesting if not important to the late high school and early college reader. Of course, there's a bit more to learning and using PHP and MySQL then learning to write code in a text editor. Will this book successfully teach the beginning web designer how to use server-side scripting and relational databases? The Read Me section in the front matter didn't look like the usual Head First boilerplate and it is necessary to read, because it holds the keys to using this book. The authors stress that repetition is absolutely necessary, so don't skip around the book. If you know enough PHP and MySQL to do that, you probably don't need Beighley and Morrison's tome anyway. You start learning the easy parts first, then move on to the more complex (nothing revolutionary there), but keep in mind, this book isn't one stop shopping. There's just too much going on with these technologies to teach you everything. The book is here just to teach you enough to get you going. You will absolutely, positively need a web server that supports PHP and MySQL. Before you do anything, blast to the back of the book and see the Appendix section for how to install all that on your local machine. Seems like you'll need just a bit more knowledge (or at least a lot of confidence) than just playing around with HTML tags for this one. Actually, the very beginning of the book doesn't really require that you have your web server set up, since you need to learn the basics of PHP first, but it couldn't hurt. At least once you get to the point where you'll need a web server, you won't have to halt the learning process and install everything. Personally, I'd just set up LAMP on a Debian box and call it good, but the instructions for installing PHP and MySQL on your local computer provided by the authors covers Windows 2000, Windows XP, Vista, and Windows Server 2003/2008. If you're a Mac user, OS X 10.3x or newer is supported. What? No Linux? These *are* open source technologies, folks and it's not like O'Reilly is a "Microsoft-only" publisher. OK, so they're playing the odds, figuring that most people run Windows and a significant minority run Mac, but I was still disappointed that they didn't give Linux a nod. Actually, do yourself a favor and just install XAMPP which does run on Linux (tested on SuSE, RedHat, Mandrake and Debian) and, if you really must use Windows, XAMPP for Windows is just as easy. You'll be able to do perform all the book's exercises fine and you don't have to break your brain pan setting up your web server in the process. JMHO. Once you get past the server set up, you can concentrate on learning the actual coding involved. True to the other books in this series, Head First PHP & MySQL teaches by taking the reader through actually building working features using the technologies involved. In this case, you'll actually learn how to build apps that let visitors to your site fill out forms (though I thought doggie alien abductions was an "interesting" first topic, compared to the expected gaming and rock concert examples) and other client-server interactive tasks. The book is so big (812 pages), not just because it contains a great deal of useful information, but because it presents that information in a bunch of different ways, which is typical for the series. As far as PHP and MySQL is concerned, for the newbie, repetition is absolutely required to "get it". It's one thing to kloogie together code so that it sort of works and quite another to be competent by the last page of the book. Is the book juvenile? Is the series juvenile? Well...yes, but that's the point. If you're a very "serious" person or being highly distractable has never been your problem, there are other books out there for you. Try Web Database Applications with PHP & MySQL or better yet, for beginners, take a look at Learning PHP 5 and Learning MySQL. They're both great books and very good teaching resources. If however, you've looked at those books and felt the grim spectre of boredom settling down on your shoulder, ready to paralyze your will to live, then perhaps Beighley and Morrison's Head First PHP & MySQL is the book for you. It's got what it takes to teach the topic and in a way that will keep you engaged. Make it so.