The Bungee Blog

News, updates and rants around The Bungee Book (the landmark book on Prototype and script.aculo.us)

News about the book

Hi all,

Just a couple things you might like to know about:

  • The book is finally shipping in paper form!  It started yesterday, after a few delays PragProg experienced in actually getting the prints delivered to their warehouses (or so I gather). So although you may not receive it in time for Christmas (although U.S.-based readers should, I guess), it’s on its way to you!
  • The PDF got an update yesterday; since I did not trigger it, it appears to be the result of a final round of copy editing and typo hunting. Don’t be concerned about missing new information in there: it’s just, er, cleaner.

As soon as the books make it to reseller shelves everywhere (most notably online resellers, I guess, such as Amazon and Barnes & Nobles), I’ll trigger a new round of releases. If you like the book, do spread the word! Blog about it, recommend it to your friends, rate it on Amazon… in short, yell back!

And as I may not post again before then…

Merry Chrismas to you all!

No comments

Custom events, the definitive tutorial™

I just realized I hadn’t mentioned it here, but Andrew Dupont (aka My Favorite Competitor) released a while ago a kick-ass article on custom events in Prototype 1.6, complete with sweet unification of mousewheel events. It’s very well written, clear and effective.

If you haven’t read it yet, hop over the link!

No comments

Learning from the best

I’ll never say enough how much technical store I set by people such as Sam and Thomas, authors of the libraries the Bungee Book revolves around.

For those of you who wish to boost up their scripting skills and make the best of them, you should run, not walk, to Thomas’ upcoming workshop for Carson, which will be held in London on March 26, 2008. There are only 54 seats, each of which is downright precious!

This is a rare occasion to learn straight from the man who brought your script.aculo.us, did the revamp of Gucci, and is now available for hire as a rich-interface consultant, as proclaimed by his spiffy new pro page (which uses the embryo of future “Scripty2”).

No comments

The InPlaceEditor hot seat

InPlaceEditor has been going through rough waters.

It currently yields 24 tickets in the Trac; admittedly, a few of those could be closed by now, should I go over them in detail, as most of them are pre-rewrite and are now sometimes irrelevant. Having authored the rewrite, I feel indeed like I’ve become the de facto maintainer of this thing, and I’m not alone in thinking so, as recent posts on the mailing list seem to hint at…

It used to be buggy. I believe it’s less buggy now, and much more useful too, with a lot of cool new options and features. I do have in the crates a very thorough doc+demo page that I have to finish writing ASAP, to help people grab all the features quickly enough.

“Yes, but I’d like to extend IPE because I need to…[insert need here]”

The thing is, IPE was not meant for extension. It hadn’t been designed with that kind of use in mind, and I’m sorry to say, in hindsight, that the rewrite is not very well designed in that respect, either. It’s not hard to extend: it’s just that it’s not particulary easy to extend, either.

A lot of the IPE extension tutorials you’ll find online are pre-rewrite. All of them rely on overriding internals (e.g. Ye Ole onSubmit method) to achieve their goals, but this is all undoc’d, private-like, and therefore nonguaranteed stuff. We did a rewrite, the internals changed, and your extensions b0rk. Okay, time for a rewrite of your own.

Before embarking on an extension project, you should remember a few things, though:

  1. The new IPE has more customization hooks. For instance, you can now grab the form being built right after predefined controls were put into it, so you can easily augment the generated form: you don’t need to extend the class and override its createForm method anymore.
  2. A lot of the extensions you might need are actually transformations and processings of data sent to or received from the server side. IPE features plenty of callbacks for that. Support for alternative text is also there, even for the collection-based, combo-driven variant.
  3. In general, you should carefully check out all the options and callbacks before deciding you need to hack into the builtin behaviors. The book’s In-Place Editing chapter is all up-to-date on these.

OK, so you know all about the original capabilities, and still you press on. Alright, so what can you play with?

First, you need to use the new Prototype 1.6 class API syntax: you’ll have a much easier time, and write much shorter code, with the new class extension syntax, including such basic needs as specifying class extension and calling inherited methods from overriding code.

Second, you should be careful when extending internal methods: many of these are not called directly from the code, but through pre-bound wrappers defined at construction time. This is especially true of event listeners for internal controls such as form submission management, mouse response, etc. Check out the initialize code to get a better sense of what to do.

The book’s “Neuron Workout” section for the In-Place Editing chapter has a few extension suggestions. I’ll post suggested solutions to these in this blog at some point (I intend to post such stuff at regular intervals to help readers and foster best-practice debate).

In the meantime, as always: when you go extending a class that doesn’t have an extension-related specific API, read the source carefully and don’t take any internal for granted: it might just change in the future. That’s as true of script.aculo.us as it is of any piece of code. If that risk, however small, is too critical for your needs, then you might be better off forking the code for your own purposes (possibly back-porting IPE enhancements to your own codebase later on).

I hope this helps explain the status of IPE and its extension opportunities.

No comments

The codebase has been updated

The online codebase for the book had been lagging behind since the official release on November 7.

Thanks to the tireless efforts of Andy Hunt, you can now properly access both the archived versions and the individual files linked from the PDF.

No comments

It’s out!

Today, the book, Prototype 1.6 and script.aculo.us 1.8 released.

As PDF, at least. The paper form should be available anywhere within a month or so. But why wait? Just head over to the book’s page and grab either the PDF, or the PDF+paper combo, or just order the paper form now, to be shipped ASAP to your waiting mailbox.

The web is abuzz, and I see a lot of wonderful reviews and accolades already:

I’m more grateful than I can say to a lot of people. First and foremost Sam and Thomas, who agreed to sync releases of Prototype 1.6, script.aculo.us 1.8, and the book; and to the team at Pragmatic Programmers, especially my editor, Daniel Steinberg, for driving the project, and obviously Dave Thomas and Andy Hunt, for driving “Prag.”

The libs are there; they kick ass (I’m especially fond of Prototype 1.6 and its custom events). Get the book and get the most out of them. You’ll never use JavaScript the same way you did.

No comments

Very soon now

By tomorrow evening, I should be looking at the final draft of the book.

It’s been adjusted according to the final Prototype 1.6.0 API (which we did, at long last, freeze this week) , it’s been through a first pass of copy editing (the major one), I processed that, and Daniel Steinberg, my editor, put in yet another pass. The last stage of the final draft is… getting the preface. Which should happen tomorrow.

Next week, the book gets professionally indexed (you have to love the index in any Pragmatic Bookshelf title), and then it’s on to typesetting. And then the final PDF is here. The rest is just printing and distribution: those who want the final content will be able to grab it directly online, on the book’s web page.

I’m anxious to see it out, almost to the point of giddiness.

Very soon now… Stay tuned.

No comments

Leveraging the powers of Firebug

Joe Hewitt himself seems always taken aback that his dear little extension is such a big deal to Web developers. As he once put it when chatting with me back in July at TAE West, “it’s just a bunch of scripts!”

Right.

I, like tons of other web devs, strongly believe that Firebug should be a critical implement in every serious web developer’s toolkit. It’s not just a “bunch of scripts,” it’s a cohesive, effective toolset able to spare us tens of hours of debugging-in-the-dark.

Still, I feel like lots of people under-use it dramatically. It’s not just the DOM-based HTML view, or the JavaScript debugger, or the console. It’s so much more. Perhaps that endemic under-use is due to the fact that a lot of people “learned” Firebug when it was in 0.4 or something, and didn’t quite take the time to delve into the countless improvements in 1.x.

So I’m glad to see so many docs pop up online, most of them pretty good and tutorial-like, so that more and more users get a chance to really squeeze the sweet power out of one of our most beloved extensions.

  • Phil Rees, for example, as a developer of the Google Mashup Editor, uses a mashup creation demo as a story to go through many of Firebug’s critical features. I like the running-example approach, it just works well.
  • Firebug’s website itself features quite a bunch of tutorials, demos and screencasts in its documentation section, which I urge you to read through.
  • Michael Sync has been writing a series of tutorial articles on his blog, starting on September 8, 2007, which are also a good help.

There’s no good dynamic webapp development without Firebug, lads. Get on it for real.

And hats off to Joe.

No comments

Slides & demos - The Ajax Experience, West 2007

Well, I’m still here at The Ajax Experience and this has been a pretty good time so far.

Yesterday I gave my 3 talks, and today jetlag hit me hard :-) Still, it’s wonderful to finally meet and chat with such prominent figures as John Resig, Joe Hewitt, Aaron Gustafson or Dylan Schiemann, to name but a few.

TAE is supposed to put the slides online, but I couldn’t for the life of me find them on the site. So I made them available on my own site, feel free to download them:

The two Prototype sessions were too jam-packed with information, and I regret that I had to fly over parts of them, probably saturating half the audience as I went. On the other hand, the script.aculo.us session seems to go over very well, with people dropping their jaw at the demos (and more importantly, at the demos’ source code brevity) more than once :-)

I took care to attend presentations about the other frameworks, too: Dylan’s Dōjō 0.9 and Brad’s Dōjō Offline, Rich’s Ext, to name a few. Dōjō apparently changed very much for the better between 0.4 and 0.9, and I look forward to diving into it a bit more soon. Ext 2.0 apparently looks very well too, and I’m all the more interested as it just fits this sparse space for widgets that are built over Prototype, in the sense that script.aculo.us’ widgets may not cut it for desktop-feeling apps: if I ever need to do such a UI, Ext may be a cool bet.

I’m having a blast. I hope you like the slides and demos.

2 comments

Second beta (B1) released!

The book’s second beta, B1, was released today. It now features the script.aculo.us part, for a total of about 390 pages!

The book has entered tech review and its next release should be the final one, complete with the latest Prototype 1.6 updates, the intro and preface, and having gone through the usual late stages (copy editing, indexing, etc.).

2 comments

« Previous Page