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!

JavaScript Drag-and-Drop extension for Prototype hitting beta

June 9th, 2005

My JavaScript Drag-and-Drop extension for Prototype is finally declared beta!

Features:

  • Any element can be declared draggable and/or a drop target
  • Callbacks (onDrop, onHover)
  • Integrated CSS class change to add class drophover if hovering over an possible droptarget
  • Constraints (drag only vertically or horizontally)
  • Sortable lists (UL, OL)
  • Sortable float containers (DIV containing any sort of floating elements)
  • Easy to do sortable lists that also can drag-and-drop to another list
  • Sort order can be serialized to use with Prototype’s Ajax functions
  • Uses the Effect2 library for transparency and snap-back visual effects

There are some minor issues left, but feel free to start using this—please report any bugs or annoyances you hit!

Why I think Apple’s switch to Intel is great

June 7th, 2005

On Monday, Steve Jobs announced Apple will start using Intel microprocessors beginning in 2006.

Some Mac fans have criticised this move and already there are huge amounts of FUD on the net.

What those guys don’t realize is:

  • Your Mac will still look and feel the same. It’s just the processor that gets changed. Not the OS. Not the Hardware/Software integration that Apple is famous for.
  • Wine for Mac/Intel: run any Windows app under Mac OS X/Intel in its own window at native speed. Wine already works fine with x86 FreeBSD. I can’t emphasize this enough.
  • Free to exploit FreeBSD’s ability to run Linux apps ‘out-of-the-box’, including those who include x86 assembly.
  • Most old PowerPC apps will continue to work. All new programs will come as a univseral binary, optimized for both architectures (it’s two binaries in one package actually).

Also, one of the things that very much appeal to me is that Ruby will probably get a VM/just-in-time compiler for 2.0 and from looking at the source I gather it will be optimized towards x86 (first).

JavaScript drag-and-drop for Prototype, early alpha playground

June 3rd, 2005

I’ve put up a working demo and JavaScript code for drag-and-drop with nice usage of the Effects2 package.

To make an element draggable, just use:


  new Draggable('id_of_element');

To mark it as a drop target:


  Droppables.add('id_of_element');

Of course it’s early alpha and lacks refactoring and a polished API, but it works. Tested in Safari in Firefox.

UPDATE: I’ve updated the demo page above, and also added a second demo page on sortable floats and lists

Have fun!

Visual effects website, final beta stages

June 2nd, 2005

I’m proud to annouce that the website for the Visual Effects V2 for Prototype is now available. Check out the demo on the start page!

Mostly, I’ve added a (still not complete) reference and documentation page which also demos the usage of the effects on various HTML elements (they’re not bound to DIVs only, so try to experiment a bit…).

The .js file is now a seperate download, so you can easily integrate it into your apps. It’s side-by-side compatible with the old Effects. Of course you need the Prototype JavaScript library too, to use the new effects package (Ruby on Rails already has this built-in for free!).

Enjoy!

JavaScript visual effects V2, beta version

May 30th, 2005

So, after some refactoring, renaming and general cleaning-up the Effects V2 stuff I finally declare it beta.

The effects require the Prototype JavaScript library (which is included with Ruby on Rails, but can be used in any web application framework).

UPDATE June 2: This page has demonstrations on the compatibility with various HTML elements

Features:

  • Time-based animation
    All animation is now time-based, not frame based. So, if you tell an effect to last exactly one second, it will do so, regardless of the rendering speed of the browser.
  • FPS settings
    Target frames-per-second option (will fall back to just not-so-many fps on slower computers)
  • Transition modifiers
    • linear
    • sinoidal (eases in/out) [default transition]
    • reverse
    • flicker (randomizes)
    • wobble (well, wobbles)
  • Set of combinable core effects
    • Scale()
    • Opacity()
    • MoveBy()
    • Parallel()
  • Callbacks
    Add your own javascripts with the four callbacks beforeStart, beforeUpdate, afterUpdate and afterFinish
  • Customization
    Lots of customization options with the core effects (namely .Scale)
  • Basic engine options
    • from/to: allows partial runs, (e.g. change an elements opactiy from 75% to 25%)
    • duration
    • fps
    • transition
    • sync (allows to call on rendering manually, used for .Parallel())
  • Powerful ‘prepackaged’ effects
    All these are thought of as examples you can tweak or use as templates for your own
    combinations of the core effects:

    • Fade() and Appear()
    • BlindUp() and BlindDown()
    • SlideUp() and SlideDown()
    • Puff()
    • Shake()
    • SwitchOff()
    • DropOut()

You can have a look at all this on the Effects V2 demo page!

Still missing is a new Version of Effect.Highlight and the “memory” ability of Effect.Scale; these two should be in shortly.

I really hope you’ll be able to add your own effect combinations and come up with cool stuff. Be sure to give to the community and share them!

Have fun.

Effects V2, new Slide effects

May 29th, 2005

Quick update on a pair of effects that were requested: .SlideDown() and .SlideUp() now added to the demo page

Upload progress making progress

May 28th, 2005

Sean Treadway has made some updates to the Upload Progress patch for Ruby on Rails that we co-developed.

If you don’t know what this is about, head straight to the Upload progress demo page!

So, give it a try—the more people are testing it, the sooner it will be in Rails!

Effects V2, new BlindDown effect

May 27th, 2005

This functionality has been requested by some of you, so here it is:

Effect.BlindDown()—smoothly reveals an element by changing its height from 0 to whetever the full element measures. The element is NOT required to have a fixed height defined. It also works somewhat with tbody elements on tables (at least it does in Firefox).

But have a look at the Effects V2 demo page to see what this all amounts to.

Note that the name will probably change when it’s finished—if you have suggestions for new names for .Blind() and .BlindDown(), feel free to post a comment…

Agile Web Development with Rails, the beta version

May 26th, 2005

The beta version of the upcoming book Agile Web Development with Rails is out. It’s the bible of Rails, and the Web 2.0 chapter was written be me (yeah!).

Take the train, don’t walk.

Yeah, I just said beta version of the book. Order now, and you get the beta PDF, and have the finished thing delivered when it’s ready.

Effects V2 – nearly finished

May 23rd, 2005

Most of the old effects are now reimplemented using my new Effects engine. Feel free to post your comments and wishes!

A new effect, Effect.MoveBy allows you to move elements around.

Also new: .Blind() and .SwitchOff()—two combination effects showing off what you can do with the new engine.

Head to the Effects V2 demo page

Update 2005/05/25: Done a bit of refactoring to allow standard from: and to: parameters. Added new core effect .Opacity(). Changed .Fade() and .Appear() to be prepackaged effects. Added .DropOut().