Posts filed under 'widgets'

Elixir: Good for What Ails You

Elixir, released today (Feb. 12), is a new declarative mapper for SQLAlchemy. Written by the authors of ActiveMapper and TurboEntity (the other two declarative mappers for SA), it intends to become a full-fledged extension to SQLAlchemy a la ActiveMapper. I downloaded version 0.1.0 today, and gave it a spin. Here are my thoughts.

Holy cow. This rules.

I could not have been more wrong in my belief that Python is a difficult language in which to write domain-specific languages. This is unbelievable - it rivals ActiveRecord, the best ORM I’ve tried.
Actually, in parts it improves on ActiveRecord, eliminating my pet peeve that I have to specify has_one and belongs_to methods (and their ilk) inside the model files instead of in the database schema, where I feel they should belong.


class Link(Entity):
has_field(’title’, Unicode(255))
has_field(’url’, Unicode(1023))
has_field(’saved_on’, DateTime)
has_and_belongs_to_many(’users’, of_kind=’User’, inverse=’links’)

Notice how it follows the active record pattern, despite being a declarative mapper. Note also how we no longer have to create endless secondary tables for many-to-many relationships, as we had to in bare SQLAlchemy and ActiveMapper. No more tedious assign_mapper statements for me.

Elixir is an unexpected gem - it’s powerful, concise, supports both declarative and active-record table declarations, has truly excellent documentation, and you don’t sacrifice a bit of the power that SQLAlchemy offers you in its querying syntax. Though I am no database administrator - and indeed, Elixir does not offer all the features of bare SQLAlchemy and support for legacy databases - I can see no reason to use any other ORM.

Stay tuned for next time, when I write about Quartz Compozer. (Speaking of which, can anyone find me a really juicy synonym for “infuriating”?)


3 comments February 13, 2007

Fancy Windows, &c.

Lately, inspired by John Gruber’s recent assertions that the Apple Human Interface Guidelines are no longer relevant (a good summary can be found here), the new, fancier widgets made by various Cocoa developers have come into the spotlight. Daniel Jalkut, a Very Cool Guy, developed a bunch of very nifty widgets while revamping the interface for his unbelievably cool application FlexTime, and was so kind as to blog about his thought process while doing it. His blog entry pointed me to Matt Gemmell’s enormous stack of custom-made widgets, replete with shiny screenshots. My interest piqued, I fired up Google and found Sean Patrick O’Brien’s iLifeControls framework, a class-dumped version of Disco’s Smoke framework, Toxic Software’s Toxic Progress Indicator and TXTableView, Chad Weider’s badging and gradient code, Blake Seely’s BSRoundedBox, Andy Matuschak’s Polished Metal buttons, AMViewAnimation, and OpenHUD framework, Andreas M.’s jaw-dropping amount of custom widgets, Erling Ellingsen’s CGSWindowWarp exposé, John Pannell’s PSMTabBarControls, Uli’s freakin’ plethora of awesome doodads, Rainer Brockerhoff’s RBSplitView, and Ankur Kothari’s CoreGraphics framework.

Wow.

(more…)


1 comment November 20, 2006


About Me



I'm a college freshman, passionate about technology, programming (especially Cocoa and Python), and Apple.

By the way, 'important shock' is an anagram for 'Patrick Thomson'.

Meta

Links

Categories

Top Posts

Blog Stats