Scal v0.1b8 Released – More enhancements on the way

First, a big thanks to Ian Tyndall for supplying the code for the update. Here’s a snippet from Ian’s email to me:

I recently picked up scal and started putting it to use. During this, I’ve made some minor enhancements that you might be interested in.

I’ve removed the dependency on Builder and replaced it with the functionality of the new dom builder from prototype 1.6.0_rc1.

I’ve added destroy functionality to remove the observables when the calendar is closed.

Besides this, I only made minor performance/syntax enhancements.

Minor enhancements? There are 40 differences between these two versions of scal and Ian is responsible for the lot. A big thanks!

You know, it’s funny how these things happen. Just two days ago I read this post on Kangax’s website:

Refactoring with Prototype

I’m not surprised to see prototype code that sucks. Been there, done that (and I’m sure still doing it) – nobody is perfect. What surprises me though is how ridiculous some explanations (of writing crappy code) sound. “I don’t really know javascript. I do PHP professionally” is my favorite. Don’t get me wrong, I understand that experience and deep understanding of language is essential for writing smarter code. It could be a real challenge to wrap your mind around some of the dynamic concepts of such languages as javascript. That I can understand. What I don’t understand, though, is how people don’t follow some of the fundamental principles of programming. Do we really need to know javascript to prevent repetition, unnecessary constructions or poor optimization? I seriously doubt it

Kangax goes on to give a clinic on prototype/javascript. And as Kangax has gently suggested I clean up scal, I hang my head in shame that Ian had to come to the rescue before I could get to it. :)

About 50 people a day wander in here and check out scal. I know a few are using it as I’ve had comments via email, so I’m inspired to dig in and keep hacking away at this control. I hope everyone finds it useful.

Important note about scal v0.1b8:

Prototype v1.6.0_rc1 is REQUIRED. You won’t get far with the previous release of prototype (as you might expect from Ian’s comments).

Share and Enjoy:
  • Digg
  • del.icio.us
  • Reddit
  • Slashdot
  • Technorati
  • DZone
  • NewsVine
  • StumbleUpon
  • E-mail this story to a friend!
  • Sphinn

5 Comments

  1. kangax says:

    Jamie,
    I’m glad my post was useful :)

    Keep it up and happy prototyping

  2. Jon says:

    I’m curious – is there a plan to provide some sort of “year” picker as part of your upcoming features?
    If I need to choose December 2009 and the calendar is set to OCtober 2007 – that’s a lot of clicks to get where I need to go …just a suggestion, of course. Great work thus far :)

  3. jamiegrove says:

    Great question, Jon. Modifying the header for the calendar so that you can zip through months (or years) quickly is definitely on the list.

    I had a lot of fun testing the rollover between year – click, click, click. Kept saying to myself that I needed to add that in. I would also like to make a few mods so that you could easily do multiple month listings at a time (ala the mini-months in iCal).

    I just received a big batch of changes related to prototype 1.6 that have improved performance (again). I’ll be posting those later.

  4. jamiegrove says:

    Hi folks. Just a quick note abut Ian’s destroycalendar function.

    I have removed this from the closecalendar call that is made when a user shuts the calendar.

    destroycalendar blows away all the observed events (as billed) but closecalendar (the private version of closeCalendar) is suppose to hide the calendar rather that blow it away. The idea was that open and closecalendar would be used to control visibility.

    Anyway, this raises several design issues.

    1. Shouldn’t there be a hidecalendar? Perhaps.
    2. Wouldn’t it be better to have the js explicitly call destroycalendar when the programmer decides it is time to bid farewell? I’m more in favor of this, personally.