Loading...

ThyncRecord Updates, New Developers Comments

So there’ve been some pretty quick lightning rounds of additions to ThyncRecord over the last few days. Partially I attribute this to my hitting a groove, but a lot of it comes from adding a couple new developers to the fold: David and Jesse.

Both David and Jesse are fairly new to JavaScript, new to MooTools, and have had no previous part in working with this project. David has had some learning experience with Rails/ActiveRecord and that helps in understanding usage of TR tremendously. Jesse has been studying programming in his spare time for the past year or so, and has caught on very quickly.

David is working on rounding out our Migration capabilities, filling in the holes sqlite leaves us with in terms of modifying columns and adding some additional functionality after that. He also improved the find() method on Model so it can accept arrays as in ActiveRecord.

Jesse has so far contributed to adding support for a few new storage datatypes and is in the process of wiring up validations for said types. He has also worked on some of the automigration code.

Tonight and last night I added a lot of code myself:

  1. Fixtures are now fully supported, including mapping tables. Automigrations will now create tables (also including mapping tables for N:N relationships) and load all data presented in fixtures.
  2. Added AssociationLoader class. This is useful for loading data post-preloading. More on this below.
  3. Added event-handling to Record objects. This can be configured in Model declarations or added after instantiation of a Record object.
  4. Wired up Jesse’s main validation methods to Record.save and added user-configurable validate function to Model constructor.
  5. Wired up Jesse’s new datatypes to Record save/initialize methods.

Code samples will be presented over the next few days so you can see how fixtures and models are defined. Manual migrations aren’t well-defined yet and so we’ll leave that to a later date when they are. I’d rather talk at length about each of these topics as a separate post.

Preloading happens when a Record object is first created after a call to Model.find or similar method. ThyncRecord only loads associated data to a configurable depth, which can also be overridden in the find call itself. If deeper data is needed, simply calling recordObject.load(“associationName”) will fill the target association with the correct data. I basically implemented this as a replacement for dynamic loading of properties in ActiveRecord, since JavaScript has no accessor methods which act like properties. (though ActionScript does, and I just came across similar syntax in Mozilla’s JS 1.5 documentation…)

I’m really excited by how much progress we’re making, and looking forward to releasing it all shortly. I can see it as being a boon to AIR developers and Gears-heads alike.

Quick question: Is the name ThyncRecord ridiculous? If so, what are some kick-ass names the good folks of the Interwebs would like to bestow on this project?

[EDIT: ThyncRecord is now JazzRecord and will be available for download from www.jazzrecord.org starting 10/21/08]

3 Comments

  1. Posted October 13, 2008 at 3:53 am | Permalink

    Forgot to add that I added Gears support some time ago, which makes testing easier since Firebug is so much better than AIR Introspector. As a consequence I’ve been mostly testing things in Firefox and so there may be one or two discrepancies in AIR when I get back around to it. We shall see. Just wanted to tack that on since it’s a huge thing for me

  2. Posted October 21, 2008 at 4:33 am | Permalink

    Yeah, how about the name JAZZrecord?? I just thought of it all by myself!

  3. Posted October 21, 2008 at 4:34 am | Permalink

    I bet you did

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*