[ANN] doodle-0.0.9 released

Discussion in 'Ruby' started by Sean O'Halpin, Apr 12, 2008.

  1. Doodle 0.0.9 has been released.

    Doodle simplifies the definition of Ruby classes by providing a simple
    DSL for declaring attribute validations and conversions.

    Doodle is eco-friendly =96 it does not globally modify Object, Class or
    Module (and it plays nice with yaml).

    For more info and examples, see the docs at http://doodle.rubyforge.org.

    Changes for 0.0.9:

    - new features:
    - :collect now creates array by default if no :init specified
    (thanks to James Adam :)
    - :collect can now initialize from Enumerables by default
    - raise UnknownAttributeError if initialize called with unspecified
    attribute key
    - added experimental Doodle.context and Doodle.parent (only valid
    during initialization)
    - new examples:
    - datatypes
    - mail example
    - Doodle.parent
    - new specs for singletons, Doodle.context and Doodle.parent, factory
    - updated docs
    - removed unused code and tidied up
    - bug fixes:
    - fixed memory leak
    - fixed regex for factory methods
    - fixed bug where validate! was creating instance variables with defaults
    - fixed errors collection
    - fixed yaml test for JRuby
    - now doesn't try to define factory method if one with same name
    already defined

    Regards,
    Sean
    Sean O'Halpin, Apr 12, 2008
    #1
    1. Advertising

  2. Sean O'Halpin

    Trans Guest

    Re: doodle-0.0.9 released

    On Apr 12, 5:50 pm, "Sean O'Halpin" <> wrote:
    > Doodle 0.0.9 has been released.
    >
    > Doodle simplifies the definition of Ruby classes by providing a simple
    > DSL for declaring attribute validations and conversions.
    >
    > Doodle is eco-friendly - it does not globally modify Object, Class or
    > Module (and it plays nice with yaml).
    >
    > For more info and examples, see the docs athttp://doodle.rubyforge.org.
    >
    > Changes for 0.0.9:
    >
    > - new features:
    > - :collect now creates array by default if no :init specified
    > (thanks to James Adam :)
    > - :collect can now initialize from Enumerables by default
    > - raise UnknownAttributeError if initialize called with unspecified
    > attribute key
    > - added experimental Doodle.context and Doodle.parent (only valid
    > during initialization)
    > - new examples:
    > - datatypes
    > - mail example
    > - Doodle.parent
    > - new specs for singletons, Doodle.context and Doodle.parent, factory
    > - updated docs
    > - removed unused code and tidied up
    > - bug fixes:
    > - fixed memory leak
    > - fixed regex for factory methods
    > - fixed bug where validate! was creating instance variables with defaults
    > - fixed errors collection
    > - fixed yaml test for JRuby
    > - now doesn't try to define factory method if one with same name
    > already defined
    >
    > Regards,
    > Sean


    Hi Sean,

    Doodle looks very promising. I especially like the use on annotation-
    style attribute options.

    Couple of questions:

    1. None of the examples define regular methods. Is Doodle just for
    data classes?

    2. Are you currently using this in any of your other apps?

    Thanks,
    T.
    Trans, Apr 13, 2008
    #2
    1. Advertising

  3. Re: doodle-0.0.9 released

    On Sun, Apr 13, 2008 at 12:09 AM, Trans <> wrote:
    > Hi Sean,
    >
    > Doodle looks very promising. I especially like the use on annotation-
    > style attribute options.
    >
    > Couple of questions:
    >
    > 1. None of the examples define regular methods. Is Doodle just for
    > data classes?


    Not at all. The examples focus on data definition because that's what
    Doodle is for. However, I am finding that I'm defining fewer methods
    on classes simpy because Doodle handles a lot of what those methods
    would be doing. One of the nice things about Doodle is that it makes
    it much clearer what are the properties of an object (attributes +
    constraints) and what are its behaviours (methods). But if it's
    methods you're after, the latest version has a mail.rb example
    (translated from an example in Florian Frank's dslkit) which defines a
    #send method :)

    > 2. Are you currently using this in any of your other apps?


    Yes. At work, we're using it in the development branch of what will
    shortly be a production application. It handles validation of yaml
    configuration files. While this is only using a subset of Doodle, it
    greatly simplifies the task.

    I have also been using it for my own experimental projects. For
    example, I've been toying with an interactive fiction DSL, a
    Ruby-centric ORM, code generation and a command-line option handler.
    They're all kind of related and Doodle is making it much easier to see
    and share the similarities. One of the most promising directions of
    this experimentation is shared 'rich datatypes'. For example, doing
    this:

    class Mail < Doodle::Base
    doodle do
    email :to
    email :from
    end
    ...
    end

    defines attributes that accept only RFC822-compliant email addresses.
    Look at examples/datatypes.rb for some sample datatype definitions and
    examples/mail-datatypes.rb to see how they're used. (Note that this is
    enabled in the examples, not in the lib). These are in svn on
    rubyforge, not in the gem.

    Having said that, Doodle is very much a work-in-progress (as will be
    evident to anyone reading the code!). There's a fair bit of behaviour
    that's not covered by specs and a few tortuous workarounds. In
    particular, I'm finding I keep getting tied up in knots trying to
    handle singleton classes consistently. I've had to use some dubious
    hacks in places - the most egregious being reading an object's inspect
    string to determine if it's a singleton class. (BTW, If anyone knows a
    better way to discover whether self is a singleton class without
    creating a singleton class in the process, I'd be grateful to learn
    it.)

    While I sometimes get the feeling that I shouldn't be trying to do
    this in Ruby (and I'm sure you appreciate what I mean :), I am
    committed to seeing this through - I'm finding it too useful and fun
    to stop now :)

    > Thanks,
    > T.


    Best regards,
    Sean
    Sean O'Halpin, Apr 13, 2008
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sean O'Halpin

    [ANN] doodle version 0.0.10 released

    Sean O'Halpin, Apr 13, 2008, in forum: Ruby
    Replies:
    0
    Views:
    75
    Sean O'Halpin
    Apr 13, 2008
  2. Sean O'Halpin

    Subject: [ANN] doodle 0.1.0 Released

    Sean O'Halpin, Apr 26, 2008, in forum: Ruby
    Replies:
    0
    Views:
    84
    Sean O'Halpin
    Apr 26, 2008
  3. Sean O'Halpin

    [ANN] doodle 0.1.1 Released

    Sean O'Halpin, Apr 29, 2008, in forum: Ruby
    Replies:
    0
    Views:
    84
    Sean O'Halpin
    Apr 29, 2008
  4. Sean O'Halpin

    [ANN] doodle 0.1.4 Released

    Sean O'Halpin, May 6, 2008, in forum: Ruby
    Replies:
    0
    Views:
    83
    Sean O'Halpin
    May 6, 2008
  5. Sean O'Halpin

    [ANN] doodle 0.1.9 Released

    Sean O'Halpin, Dec 15, 2008, in forum: Ruby
    Replies:
    0
    Views:
    88
    Sean O'Halpin
    Dec 15, 2008
Loading...

Share This Page