Apple IDE for developing widgets (unfortunately not for the iPhone as it seems):
Dashcode is a new application for developing Dashboard widgets coming in Mac OS X 10.5 (Leopard). Dashcode is everything you need to create great Dashboard widgets.
Nice software to free your widgets from the dashboard:
Amnesty Widget Browser is a full featured widget manager for Mac OS X Tiger and Panther (10.3.9) that allows Dashboard widgets to have expanded capabilities as they run directly on your desktop via a convenient icon in your system menu bar.
Maybe a good starting point for having a look at ruby: