Some changes in Spry 1.5

Good morning, spry:fans,

I wanted to talk about one of the changes we are making for Spry 1.5. This is just some information so that you will be better prepared for Spry 1.5. In my previous post, I mentioned the March preview- May release timetable. We are still on track for that. JSON support is now working and we also have some samples on form submission and session handling ready to go.

I wanted to give a brief overview of the changes we made for Spry Effects. For those that upgrade to 1.5, this change will impact existing pages with effects. The changes that will need to be made are simple and straightforward, and we will have a document specifically outlining the changes that will need to be made.

The main idea is that we changed from using functions to using classes to enable the effects. This mirrors how widgets work today.

For instance, in Spry 1.5, a basic effect will now look like:

<a href="#" onclick="theEffect.start();">Start Effect</a>
<div id="effectMe">The content to effect</div>
var theEffect = new Spry.Effect.Fade("effectMe",{duration:500, from:’100%’, to:"0%’});

We have also changed some Effect names to be more straightforward. For instance, “AppearFade” is now “Fade”.

We are also including some wrapper functions that will still run the old versions, but these will take a small change to the code to enable, but less so than moving the functions to objects.

An example:
<a href="#" onclick="Spry.Effect.Shake("theElement");">Start Effect</a>
would be:
<a href="#" onclick="Spry.Effect.DoShake("theElement");">Start Effect</a>

where we added ‘Do’ to the effect name. Then they will work as normal.

This was done for consistency reasons. Now all effects, single and cluster, work the same way. It also was done so that clustering was easier to control, with stopping and toggling being smoother.

And now it fully supports the observer notification model we use for Spry Data.

We think that this change will make using Effects easier in the future. We are always reticent to force changes to existing pages, but in this case, we think it’s worth it.

And of course, if your page is working properly and you don’t want to upgrade, then no changes need to be made!

So that is it for this time. Just some Spry foreshadowing.
We should have the preview up in a few weeks.


One Response to Some changes in Spry 1.5

  1. yassine says:

    1.5 looks juicy :Di’m waiting …