From the blog
Posted 2009-02-23
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.
From the blog
Posted 2009-02-20
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.
From the blog
Posted 2008-12-31
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.
From the blog
Posted 2008-12-15
I've been playing a lot with Dojo lately, and have
been very impressed by its elegant publish-subscribe system. Basically, any
object can publish an event, and any other object can subscribe to it. This
creates an incredibly flexible notification architecture that's completely
opt-in.
The system has elements of Aspect Oriented Programming (AOP), as well as the
Observer pattern. Its power, however, is in the fact that an individual object
does not need to implement any specific interface in order to act as either a
Subject or an Observer; the system is globally available.
Being a developer who recognizes good ideas when he sees them, of course I
decided to port the idea to PHP. You can see the results
on github.
From the blog
Posted 2008-12-12
I've fielded several questions about setting up an autocompleter with
Zend Framework and Dojo, and
decided it was time to create a HOWTO on the subject, particularly as there are
some nuances you need to pay attention to.
From the blog
Posted 2008-12-02
Just about every day, I have an idea for a blog post, and most days, by the end
of the day, I just don't have the time or energy to actually write anything up.
The inner writer in me screams, "no excuses!" while the aging adult in me
whispers, "time for bed, dear."
So, to keep my hand in the game, here are a few things running through my head,
or that I'm working on, or that I'll be doing soon.
From the blog
Posted 2008-09-27
I've been getting a lot of interest in my
Pastebin demo app —
partly by those wanting to play with Dojo+ZF, partly by those just interested
in the application.
I'm constantly trying to improve the application. I've done one webinar and one
UnCon session showcasing it, and will be presenting it at
Dojo Develper Day in Boston
this Monday as well as at php|works later
this fall, and want to keep the materials up-to-date and freely available. To
this end, I've created a Github repository so you can
track the latest developments, as well as pull custom tarballs:
All patches and feedback are welcome!
From the blog
Posted 2008-09-25
I'm a bit late on my ZendCon'08 wrapup; the
conference left me both exhausted and with a backlog of email and work that has
consumed me since it ended. However, this, too, is good, as it has given me
time to reflect… and to finally get my slides up on SlideShare.
ZendCon was alternately exhausting, rewarding, educational, fruitful,
infurating, and ultimately wonderful. I've been to every single ZendCon so far
— I started at Zend a scant month before the inaugural event — and have spoken
at each. My first time speaking was a fluke; David Sklar
had just started at Ning and had to back out of his
"Configuring PHP" tutorial session. Mike Naberezny
and I were drafted to take it over, and we had N+1 attendees, where N was the
number of speakers. Since that inauspicious beginning, I've gradually taken on
more sessions and stuck around to participate in the conference more. I can
honestly say that this was the biggest, busiest, and most community focussed
ZendCon I can remember.
From the blog
Posted 2008-09-09
I have a number of updates and followups, and decided to post them in a single
entry.
First off, you may now view my Dojo Webinar online
(requires login and registration at zend.com). Attendance was phenomenal, and
I've had some really good feedback. If you want to see it live, I'm giving the
talk (with revisions!) at the ZendCon UnConference,
at Dojo Developer Day Boston
later this month, and at php|works in
November. I hope to be able to show new functionality at each presentation.
Second, I've completed what I'm calling version 1.0.0 of the pastebin
application I demo'd in the webinar. The PHP code is fully unit tested (though
I haven't yet delved into using DOH! to test the JS), and incorporates a number
of best practices and tips that Pete Higgins from Dojo was kind enough to
provide to me. When using a custom build (and I provide a profile for building
one), it simply flies.
The pastebin application showcases a number of features besides Dojo:
Zend_Test_PHPUnit was used to test the application, and Zend_Wildfire's
FireBug logger and DB profiler are used to provide profiling and debug
information.
Finally, ZendCon is next week! I'll be around, but
already have a packed schedule (1 tutorial, 2 regular sessions, an UnCon
session, a meet-the-developers session… and that's just what I know about!).
I look forward to meeting ZF users and developers, though, so feel free to grab
me and introduce yourself.
From the blog
Posted 2008-09-05
During my Dojo and ZF webinar on Wednesday,
Pete Higgins of
Dojo fame noted that I could do something different
and better on one of my slides.
This particular item had to do with how I was consuming custom Dojo build
layers within my code. I contacted him afterwards to find out what he
suggested, and did a little playing of my own, and discovered some more Dojo
and javascript beauty in the process.