Blog Posts

Syntax Highlighting for Technical Presentations

Being a technical presenter, I've often run up against the issue of how to present code snippets.

The easiest route is to simply cut-and-paste into your presentation software. However, such code is basically unreadable: it's hard to get indentation correct, and the lack of syntax highlighting makes them difficult to read (syntax highlighting helps users understand the purpose of the various language constructs).

Continue reading...

Speaking at PHP Quebec

I'm speaking at PHP Quebec this week. While I live a scant 1.5 hours away from the venue, this is the first I've been to the conference. The snow gods have declared their wrath already, but I plan to thwart them and drive up to Montreal this evening regardless.

I'm giving two talks and participating in a panel discussion this week. The first talk is entitled "Practical Zend Framework Jutsu with Dojo," and, while it may look like a familiar topic of mine by this point, I've spent the last several days reworking the talk entirely, and am very much looking forward to presenting it tomorrow. (My copy of "Presentation Zen" could not have come soon enough! and that's all I'll say about that.)

On Friday, PHP Quebec has introduced a "Framework Bootcamp" track, including sessions by myself, Fabien Potencier of symfony, and Derick Rethans representing eZ Components. My talk that day is entitled "Zend Framework Little Known Gems." While hardly a completely original talk (Aaron Wormus did a "Hidden Gems" series of posts for DevZone a couple years back, and Zend's own Shahar Evron did a similar talk at last fall's IPC), this will be my first time doing a Zend Framework talk on something other than the MVC stack (or how to use components with the MVC stack). Leaving my comfort zone, so to speak.

Towards the end of the day, Fabien, Derick, and myself will be corralled onstage together for a "Framework Comparison".

If you're headed up to PHP Quebec this week, I look forward to meeting you or seeing you again!

Continue reading...

Recursively Destroying Dojo ContentPanes

I ran into an issue recently with Dojo's ContentPanes. I was using them with a TabContainer, and had made them closable; however, user actions might re-open tabs that pull from the same source. This led to conflicts with dijit IDs that I had to resolve.

Most Dijits have a destroyRecursive() method which should, theoretically, destroy any dijits contained within them. However, for many Dijits, this functionality simply does not work due to how they are implemented; many do not actually have any knowledge of the dijits beneath them.

ContentPanes fall into this latter category. fortunately, it's relatively easy to accomplish, due to Dojo's heavily object oriented nature.

Continue reading...

Using JSLint

I've been doing a fair bit of programming in Dojo lately, and have on occasion run into either inconsistent interfaces, or interfaces that simply fail to load in Internet Explorer. Several people have pointed out to me some optimizations to make, but, being a lazy programmer, I often forget to do so.

Fortunately, there's a tool for lazy developers like myself: JSLint. Linters are commonly used in static development languages so that developers can verify that their programs are syntactically correct prior to compilation; they basically ensure that you're not accidentally attempting to compile something that will never compile in the first place. Many dynamic languages also have them; I've had a key bound in vim to run the current file through PHP's linter for many years now. JSLint provides linting capabilities for JavaScript, as well as some code analysis to point you towards some best practices — mainly geared for cross-browser compatability.

Continue reading...

Zend Framework 1.7.5 Released - Important Note Regarding Zend_View

Yesterday, we released Zend Framework 1.7.5. It contains a somewhat controversial security fix to Zend_View that could potentially affect some use cases of the component; I'm providing details on that security fix as well as how to work around it here.

Continue reading...

VirtualBox Networking

I use Linux on the desktop (currently Ubuntu), but occasionally need to use Windows for things like webinars, OS-specific testing, etc. I started using VirtualBox for virtualization around six months ago, and have been reasonably satisfied; Windows boots quickly, and everything "just works." That is, until yesterday.

I was given a linux VM image running a web server and some applications I needed to review. On top of that, I needed to do so over WebEx, so that I could share my screen with somebody else. This meant I needed the following to work:

  1. Internet access for my Windows VM
  2. Access to my linux VM from my Windows VM
  3. Ideally, access to both guest VMs from my linux host
  4. Ideally, internet access for my linux host

Continue reading...

Seven Things - Tagged by Keith Casey

I'm really not sure I understand these "seven things" or "tagged" memes, but I'm going to give it a shot, after Keith Casey did a drive-by tagging of me on New Year's Eve.

So, without further ado, seven things you may not know about me…

Continue reading...

2008: The year in review

That time of year again — wrap-up time. Each year, it seems like it's the busiest ever, and I often wonder if it will ever slow down. As usual, I'm restricting myself to primarily professional activities out of respect for the privacy of my family.

The short, executive summary:

  • One trip to Israel
  • One trip to The Netherlands
  • One trip to California's Bay Area
  • One trip to Atlanta, GA
  • Three minor releases of Zend Framework
  • Seven webinars, six for zend.com and one for Adobe
  • Three conferences attended as a speaker, including:
    • One six-hour workshop
    • One three-hour tutorial (as a co-presenter)
    • Four regular sessions
    • Two panel sessions (one scheduled, one for an uncon)
    • Two uncon sessions (one as a co-presenter)
    • One foul-mouthed Pecha Kucha talk
  • Ten Burlington, VT PHP User's Group meetings attended; I spoke at many
  • One Bug Hunt week organized
  • Two books reviewed as a technical editor
  • Six articles for DevZone
  • 50 blog entries (including this one)

Read on for the gruesome, month-by-month breakdown.

Continue reading...

Model Infrastructure

In the last two entries in this series on models, I covered using forms as input filters and integrating ACLs into models. In this entry, I tackle some potential infrastructure for your models.

The Model is a complex subject. However, it is often boiled down to either a single model class or a full object relational mapping (ORM). I personally have never been much of a fan of ORMs as they tie models to the underlying database structure; I don't always use a database, nor do I want to rely on an ORM solution too heavily on the off-chance that I later need to refactor to use services or another type of persistence store. On the other hand, the model as a single class is typically too simplistic.

Continue reading...

Applying ACLs to Models

In my last post, I discussed using Zend_Form as a combination input filter/value object within your models. In this post, I'll discuss using Access Control Lists (ACLs) as part of your modelling strategy.

ACLs are used to indicate who has access to do what on a given resource. In the paradigm I will put forward, your resource is your model, and the what are the various methods of the model. If you finesse a bit, you'll have "user" objects that act as your who.

Just like with forms, you want to put your ACLs as close to your domain logic as possible; in fact, ACLs are part of your domain.

Continue reading...