[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.technology.glimmer] Re: Animation in Glimmer

Andy Maleh wrote:
Option 1:

shell {
 on_shell_closed {
   fade_out {
     duration 2.seconds
     movement expo_out
   }         }
}

I like this convention for hooking into events. Any events follow a similar convention on_closed, on_open, on_minimize, etc. Option 3 is not such a good idea in this regard.


Also the parameters for the event follow the convention that seems to be used all over glimmer:

@shell = shell {
  text "SWT"
  composite {
    label {
      text "Hello World!"
    }
  }
}

Option 2:

shell {
 on_shell_closed { fade_out within(2.seconds), with(expo_out) }
}

In addition to the event naming convention this improves readability drastically, it's however not consistent with the way the rest of the API reads. I'd personally prefer this style of coding since it reads more like a DSL.


I would definitely like to see more of such API than

Option3:

shell {
 fade_out_on_shell_closed within(2.seconds), with(expo_out)
}

This is good DSL like above, but the the event naming convention is not intuitive.


Cheers,
Ketan Padegaonkar,
http://swtbot.org/ - a functional testing tool for SWT/Eclipse