Larry Ullman

Translating Geek Into English

Take Control of Scrivener 2

I’m a pretty big fan of Scrivener, a writing application for Macs (there is a Windows version currently in beta). For about six months now I’ve been using Scrivener to write my newsletter, and a JavaScript book I’ve been working on for some time will be the first book I’ve written using it. There’s something about Scrivener that just works for me, first and foremost, that I’m able to keep everything about a project—the writing, references, notes, etc.—in one place. As with any good piece of software, though, I’ve got a nagging feeling in the back of my mind that I’m not using Scrivener to its fullest potential. And by that I mean I’m absolutely convinced that I could be using Scrivener better.

For this reason, I was quite happy to see the release of the book " Take Control of Scrivener 2". I haven’t read it yet (ironically, I’m waiting to complete the book I’m currently working on first), but it’s high on my “to-read” list. Just scanning the 22-page sample that’s available, this looks like a good, fast resource. And at $10 (US) for the book, it’s a steal.

HTML5 for Mobile App Development

I just read an interesting article at the Chicago Tribune’s Web site (my home town paper) about using HTML5 for mobile app development. The Financial Times and ESPN just released new applications for mobile devices, but instead of creating standalone apps, they used HTML5 to make Web apps. HTML5 provides all the functionality the apps needed, such as content storage for offline reading, video support, and the ability to respond to touch and gestures. By creating a Web app, one application can reliably work on all the platforms, and the proceeds from the app do not have to be split with Apple or the Android store. The jury is still out as to whether it’s prudent to use HTML5 for a Web site, because of the ever-present issue of browser support, but mobile devices have current browsers built-in by default.

In no way am I suggesting that HTML5 is the only smart way to create mobile apps—there’s still plenty HTML5 can’t do, but this is an interesting turn of events that I, for one, didn’t see coming.

The CodeLobster PHP IDE

I’ve been contacted a couple of times now by the people behind CodeLobster, a PHP-centric IDE, in the hopes that I’d review/mention CodeLobster on this site. Now, CodeLobster only runs on Windows, which means I haven’t, and probably won’t, use it myself (I primarily use a Mac, only using Windows for testing purposes), but I have no problems mentioning products and sites here that I don’t personally use, because such things may still be of use to you (you, whoever you are, presumably are a separate entity with your own interests, needs, etc., and are statistically more likely to be running Windows). Anyway…

So, CodeLobster is an IDE for PHP that runs on Windows. It’s available in both a free and “professional” version, the professional version costing $100 (US). The free version comes with an HTML editor and inspector, a CSS editor, a JavaScript editor, a PHP editor, and a PHP debugger. This all includes the standard features such as code completion, code collapsing, browser preview, project management, FTP, and so forth. The professional version includes all of those features, plus plug-ins for specific tools and frameworks: CakePHP, CodeIgniter, Drupal, jQuery, Joomla, Smarty, Symfony, WordPress, and Yii. In other words, the professional version gives you code completion, contextual help, and so forth for these additional tools that you may also be programming in.

"PHP and MySQL for Dynamic Web Sites" (4th Edition) Update

I’m happy to say that I should (hopefully) be finishing the first draft of the fourth edition of my “PHP and MySQL for Dynamic Web Sites: Visual QuickPro Guide” this week. Today I’ll finish one of the new chapters, introducing jQuery. The chapter’s a bit longer than I had originally hoped (30+ pages), but I think it works very well.

The chapter begins with a discussion of jQuery and JavaScript, and a sidebar on the best development tools to assist in your JavaScript programming (or, more importantly, debugging). Then the chapter shows how to incorporate the jQuery library and how to do a simple test of it. Next, you’ll learn how to select page elements using jQuery, and write an HTML form for the example to follow. After that is coverage of event handling and DOM manipulation, which will round out the example.

The first specific example is a widget cost calculator (similar to one done in PHP earlier in the book), with JavaScript performing the calculations and jQuery being used to show and hide error messages, change the classes assigned to elements, and update the content of the page.

Build Seven Good Object-Oriented Habits in PHP

I just StumbledUpon a pretty good article titled " Build Seven Good Object-Oriented Habits in PHP". As the name states, the article presents seven key qualities of good OOP programming, specifically in PHP (although the principles apply to most OOP languages). The best quality of the article is that it demonstrates each point using both bad and good code, clearly making the case for each recommended habit. And the article begins with some basic and specific OOP—namely, not making properties public—and moves on to more advanced and abstract OOP theory, such as cohesion and design patterns.

All in all, well worth the read if you’re doing OOP in general and OOP in PHP more specifically.

HTML5 and Flash Video with JW Player

A couple of years ago, I started using the JW Player to provide Flash video on a couple of Web sites I was working on. I forget why, exactly, that I choose the JW Player, except that I believe it worked well with TinyMCE or CKEditor or whatever other WYSIWYG JavaScript editor I was using for content management. (Although, if I recall correctly, I had to edit the JavaScript of the WYSIWYG plug-in to get it to do what I wanted.) In any case, I was, and continue to be, pleased with what JW Player offered, and at a reasonable price (the player itself is open source, but skinning and more professional features require a license, starting at $89 US for a single site).

The people at LongTail Video, who put out the JW Player, have done an excellent job in the past couple of years of navigating the Flash video vs. HTML5 situation (check out HTML5 Video: Not Quite There Yet). The reason for this post today, though, is that latest version of the JW Player can be set to prefer HTML5, and fallback to Flash when necessary, or prefer Flash and fallback to HTML5. This means that you can reliably serve videos on your site using JW Player, knowing those videos will play reliably in Web browsers and in mobile devices (e.g., iOS devices that don’t support Flash). Getting our Web sites to work reliably for all (or almost all) users is the hardest part of being a Web developer; JW Player’s work in this regard is most welcome.