Mir.aculo.us

mir.aculo.us

URL

XML feedBlogLines Subscription
http://mir.aculo.us/

Last update

1 year 43 weeks ago

November 2, 2006

02:26

Prototype needs your documentation skills—a new super-cool documentation site is in the making, and it needs your help.

Get on board already!

Categories: Planet Ruby

September 16, 2006

14:46

As promised, here are the slides on unit testing JavaScript from my talk at RailsConf Europe:

Adventures in JavaScript testing (PDF, 11.7 MB)

I also hear that audio (and video?) might be forthcoming, but I can’t promise anything on that. Anyway, as soon as I get some rest, I’ll also post some photos from the conference. :)

Categories: Planet Ruby

September 12, 2006

10:46

Tomorrow we’ll make a short trip over to London for RailsConf Europe where I’ll be talking about Adventures in JavaScript Testing.

Here’s a teaser:

I assure you, there is. Drop by my talk if you want to know more. I’ll also post the talk here on mir.aculo.us after the conference, of course.

Hope to see some of my humble readers at the conference!

Categories: Planet Ruby

August 29, 2006

09:15
09:15

Borrowing from Behaviour Driven Development techniques, especially the RSpec framework I’ve added some new features to script.aculo.us’ testing library.

It’s all about more readability, and even non-technical folk should be able to comprehend (at least some) of the tests. Let’s have a look:

Test.context("BDD-style testing",{ 'should automatically add extensions to strings': function(){ 'a'.shouldEqual('a'); 'a'.shouldNotEqual('b'); 'a'.shouldNotBeNull(); 'a'.shouldBeA(String); 'a'.shouldNotBeA(Number); } });

Basically, you’re defining a context for which one or more specifications should be asserted. Note the easy readability, and the added value by using a string to describe the test/specification, giving you the advantage of having better documentation for your JavaScript libraries.

Of course, setup and teardown is also supported, as are all normal assert* methods.

If you code in the Prototoypian way, with proper objects, an other added value, especially for higher-level behavioural specifications is:

var testObj = { isNice: function(){ return true; }, isBroken: function(){ return false; } } // in Test.context 'should add object extensions': function(){ Object.extend(testObj, Test.BDDMethods); testObj.shouldBe('nice'); testObj.shouldNotBe('broken'); },

Note that the support for this is far from complete, and JavaScript has certain limitatons that won’t allow all the elegant solutions that are possible with Ruby, but your tests can get much cleaner this way.

For now, you’ll need the script.aculo.us version from the SVN trunk. For more examples, see the repository file browser: test file, test library.

Categories: Planet Ruby

August 25, 2006

04:41

Decorator pattern in JavaScript? Sure can do. Read the article on how to augment arbitrary JavaScript objects with custom before and after events.

Basically, it boils down to this:

actsAsDecorator(Ajax.InPlaceEditor.prototype); Ajax.InPlaceEditor.prototype.after( 'enterEditMode', function() { // do something } );

Nicely done, and very useful to add your own tweaks to existing JavaScript controls and components.

Categories: Planet Ruby

August 22, 2006

08:02

I’m very proud that I’m part of the wollzelle team. Read more on the wollzelle blog, typestorming.

Categories: Planet Ruby

August 21, 2006

05:17

The script.aculo.us site just got relaunched—it’s now easier to get a grasp of what it does, plus you’ll get the stuff that you need faster.

And, it’s much spiffier now.

Note the wiki is not affected by this, so everything there should be in the same place for you to find. At this occasion I want to thank the myriads of authors that keep adding documentation, tricks and real-world experience for all those new (or-not-so-new) to the wonderful world of script.aculo.us. Thanks a bunch!

Also, there’s been a bunch of updates since 1.6.2, so we’re steadily proceeding towards a 1.7 release in the not-so-distant future.

It’s about the user interface, baby!

Categories: Planet Ruby

August 17, 2006

09:35

The rails-spinoffs mailing list (and the other rails lists too) have been moved to Google Groups because over permenant server overload. So, give a warm welcome to the new group at: http://groups.google.com/group/rubyonrails-spinoffs

All old subscriptions have been moved along, so nothing much should change for those of you already subscribed. For those of you that want to subscribe, you can do it either at web page (if you have a google account), or by sending a subscription mail.

Next to making sure that the Trac has room to breathe, you can enjoy some nice new features, like the web interface, RSS feeds and of course powerful searching.

Read more on this on Riding Rails, the official Rails blog.

Categories: Planet Ruby

August 12, 2006

11:17

After four long months of waiting (due to my being busy with sekrit work), script.aculo.us 1.6.2 is now out!

It’s a mostly-bug-fix-only release, so don’t expect any major oohs! and aahs! here, but sure get it. It’s recommended for all users, and addresses various more-or-less cosmetically issues, besides a memory leak bug with Draggables and an endless loop in the Slider code.

Anyway, big, big thanks to all contributors who continue to do patches and bug reports! Hopefully the trac will be up to speed soon (new server is coming!). If you should have any issues, please report it to the rails-spinoffs mailing list.

Updates and fixes:

  • Fix a problem in the drag and drop logic if an reverting/drag ending draggable was initialized for a new drag (for example by clicking repeatedly) for all cases where the default start/revert/end-effects are used, fixes #4706 [thx tecM0]
  • Fix possible memory leaks with Draggables, fixes #3436 [thx aal]
  • Throw nicer errors when requires script.aculo.us libraries are not loaded, fixes #5339
  • Make slider handles work when not displayed initially by using CSS width/height, fixes #4011 [thx foysavas]
  • Update sortable functional test with onUpdate counter
  • Make more Element extensions unit tests work on Safari
  • Add the assertMatch unit test assertion for asserts with RegExps [thx Ian Tyndall]
  • Fix a problem with Effect.Move causing “jumping” elements because of very low float numbers in some situations
  • Fix a missing semicolon in dragdrop.js, fixes #5569 [thx mackalicious]
  • Fix a slight inaccuracy with Effect.Scale that could lead the scaling to be one pixel off
  • Be more prototypish with Effect.Transitions.linear
  • Make Effect.Scale recognize font sizes that use the pt unit, fixes #4136 [thx aljoscha]
  • Fix IE hack in Effect.Opacity, fixes #5444 [thx nicholas]
  • Fix IFRAME layout fix for IE and Autocompleter, fixes #5192 [thx tommy skaue]
  • Fix only option in onEmptyHover, fiex #5348 [thx glenn nilsson]
  • Fix Effect.BlindDown and SwitchOff handling of supplied callbacks, fixes #5089 [thx martinstrom]
  • Fix a problem with field focus on Ajax.InPlaceEditor and loading external text, fixes #4988, #5244 [thx rob]
  • Do not attempt to scroll if scrollspeed is 0/0, fixes #5035 [thx tomg]
  • Fix a problem with Sortable Tree serialization, fixes #4939, #4688, #4767 [thx Sammi Williams]
  • Fix an endless loop with sliders, fixes #3226, #4051, #4765 [thx jeff]
  • Make autocompleter work with update DIVs that have scrollbars, fixes #4782 [thx Tommy Skaue]
  • Corrected options parsing on switchoff effect, fixes #4710 [thx haldini]

There are also some updated functional and unit tests (use these links to get to live online versions of these).

Also, this version of script.aculo.us is now included with Edge Rails (as of changeset 4765), and should be part of the upcoming (as in “when it’s ready”) Rails 1.2 release.

Next up: Planning the script.aculo.us 2 release… ;)

Categories: Planet Ruby

August 4, 2006

02:31

The next release of Apple’s operating system Mac OS X 10.5 will ship with Ruby on Rails installed (read more on this at Riding Rails).

Cool stuff indeed.

Categories: Planet Ruby

August 2, 2006

06:21

We at wollzelle launched our new blog today: typestorming—so, if you want to have a look at our projects and other stuff we do, be sure to check it out.

It also lists some stuff we’ve not announced elsewhere, like the Chang restaurants Ajax site, among other things.

Like the fluxiom blog, it’s based on Mephisto, a great Rails blog app.

So, see you over at typestorming

Categories: Planet Ruby

July 27, 2006

09:07