Thomas Fuchs
Hi, I'm Thomas Fuchs. I'm the author of Zepto.js, of script.aculo.us, and I'm a Ruby on Rails core alumnus. With Amy Hoy I'm building cheerful software, like Noko Time Tracking and Every Time Zone and write books like Retinafy.me.
   Want me to speak at your conference? Contact me!

Photos from my Ajax seminar in Vienna

March 21st, 2006

Ajax Seminar

That’s the other Thomas here presenting the secrets of fluxiom. ๐Ÿ™‚

More photos over at the wollzelle site.

event:Selectors for Prototype

March 21st, 2006

Justin Palmer has released event:Selectors, a method to cleanly use CSS pseudo selectors to assign DOM events to elements on the page.

It’s inspired by behaviour.js, but builds on all the latest Prototype goodness and adds some nice new features.

Here’s a snippet of what you can do (notice how nicely it works together with script.aculo.us!):


var Rules = {
  '#icons a:mouseover': function(element) {
     var app = element.id;
     new Effect.BlindDown(app + '-content',
       {queue: 'end', duration: 0.2});
   },

   '#icons a:mouseout': function(element) {
     var app = element.id;
     new Effect.BlindUp(app + '-content',
       {queue: 'end', duration: 0.2});
  }
}

Examples for multiple assignments and event passing:


'#feature, #otherstuff': function(element) {
  Sortable.create(element);
}

'.links a:click': function(element, event) {
  $('item').toggle();
  Event.stop(event);
}

Update: Here’s the official announcement from Justin – and shame on me for leaking ๐Ÿ™‚

Easier Ajax accessbility with Rails 1.1

March 10th, 2006

David writes about the new HTTP accept header handling capability coming in Rails 1.1:


class CommentController < ActionController::Base
  def create
    @comment = Comment.create(params[:comment])

    respond_to do |type|
      type.html { redirect_to :action => "index" }
      type.js
      type.xml  do
        headers["Location"] =
          url_for(:action => "show", :id => @comment.id)
        render(:nothing, :status => "201 Created")
      end
    end
  end
end


This is a sample controller for adding comments to a weblog. It’s able to serve old browsers, Ajaxified browsers, and API access for the blog. Three clients, same controller logic.

Next to allow for totally easy creation of API functionalities in your application, this is also great news for all accessiblilty buffs—easily reusable controller actions for ajax and non-ajax calls are an beta gem away.

JotForm – online forms powered by Prototype and script.aculo.us

February 22nd, 2006

Aytekin Tank has released JotForm, a web-based tool to create form.

From the announcement:

I am very excited to announce that the first web based WYSIWYG form builder JotForm BETA is now released.

Although implementing the first real web WYSIWYG form editor was a very interesting task by itself, it is not that useful. All form building tools on the web provide data collection and access. So does JotForm. It is really easy to see results on the my forms section and you can even export them as Excel, CVS or some other delimited format. You can also receive notification emails.

JotForm is built on top of two super cool JavaScript libraries Prototype and Script.aculo.us.

An other really, really cool example of how Prototype and script.aculo.us can be put to use to provide great web user interfaces.

Great work, Aytekin!

script.aculo.us V1.5.3 comes with new InPlaceCollectionEditor

February 22nd, 2006

V1.5.3 of script.aculo.us is now available!

  • Added Ajax.InPlaceCollectionEditor which uses a SELECT element instead of a text field (see test/functional/ajax_inplacecollectioneditor_test.html for usage), #3491 [thx anna]
  • Added Sortable.setSequence to programmatically reorder a Sortable, #3711 [thx Mike A. Owens]
  • Enable in place editor to use RJS (implements a new evalScripts option for the in place editor), #3490 [thx Richard Livsey]

Also, various fixes made it in (especially important the fix for the broken Sortable.serialize name option in V1.5.2):

  • Make name option on Sortable.serialize work again, fixes #3873
  • Make dragging cancel only on ESC key, not on any key, fixes #3817
  • Fix span positioning for sliders with ranges not starting at 0, fixes #3731 [thx michal]
  • Remove unneeded height restoring in Effect.BlindDown as that is handled internally by the restoreAfterFinish option to Effect.Scale, fixes #3667 [thx Ross Lawley]
  • Added unit test for #3732 (currently fails due to Prototype #3877) [thx michal]

The Rails trunk has been updated to V1.5.3, too.

This will be the last version of script.aculo.us using Prototype 1.4.0 – switching to Prototype 1.5.0 for the next release (note that script.aculo.us V1.5.3 is fully compatible with both versions).

As always, big thanks to all the contributors! ๐Ÿ™‚

Prototype cheat sheet

February 20th, 2006

Jonathan Snook has posted some nice cheat sheets/desktop backgrounds on Prototype 1.5.0_pre0.

Prototype Dissected by Jonathan Snook

Various resolutions available. Nice work!

“King of eye candy”

February 17th, 2006

Kevin Yank has written an article about important JavaScript frameworks out there, and has some nice words on Prototype and script.aculo.us:

Because Prototype is so good at making low-level scripting less painful, a number of higher-level libraries have been built with Prototype as a basis.

script.aculo.us is the king of eye candy, offering easy-to-apply animated โ€œcinematic effectsโ€ that can be used to enhance most web applications.

While it’s called JavaScript Libraries and Patterns: Yahoo! Does AJAX, the article really provides a short overview on Dojo, Prototype, AjaxTK and obviously the new Yahoo UIL stuff, plus has some advice on design patterns.

If you’re new to JavaScript frameworks, it’s a good introduction. For my part, I’d advise to choose Prototype, of course. ๐Ÿ™‚

Flash without Flash

February 16th, 2006

With the new portfolio page of Christof Wagner, wollzelle demonstrates the potentials of their JavaScript library script.aculo.us in combination with an elegant portfolio design.

Flash without Flash – the script.aculo.us effect(s) ๐Ÿ˜‰

See www.christofwagner.com.

Update: the site got digged with more than 1,500 diggs. Interesting to see it creating so much controversy about accessibility, the role of JavaScript and Flash, and so on and so forth.

script.aculo.us V1.5.2 featuring auto-scrolling draggables

February 14th, 2006

Here are the new features:

  • Added auto-scroll option to Draggables and Sortables, activate with scroll: ‘id_of_scroll_container_element’. See test/functional/dragdrop3_test.html for usage/demo
  • Add limit option to effect queues to limit the maximum number of effects in a queue, new unit tests for scoped effect queues, fixes #3498 [thx Abdur-Rahman Advany]
  • Add Sortable.sequence method to extract the current sequence of a Sortable as an array, fixes #3675 [thx sphivo]
  • Added activate method to Autocompleter that allows you to trigger the suggestions through other means than user input [DHH]
  • Add assertEnumEqual for unit testing (from Prototype SVN trunk) [Sam Stephenson]

Additionally, various bugs where fixed (see the CHANGELOG for details).

Get it at the script.aculo.us downloads page.

(So I’m back from exploring London now, hope to get some more updates to script.aculo.us done over the next few weeks!)

Off to the Summit

February 6th, 2006

Early tomorrow morning all wollzelle will be off to London for the Summit, a conference on the future of web apps.

Lots of interesting speakers there, including Joshua Schachter, Cal Henderson and Ruby on Rails mastermind David, plus various other Web 2.0 guys.

Hope to see some of mir.aculo.us’ readers there! We’ll be around for some days, so if anyone wants to have a meetup, just drop me a line.