This post originated from an RSS feed registered with Ruby Buzz
by Antonio Cangiano.
Original Post: DB2 on Mac
Feed Title: Zen and the Art of Ruby Programming
Feed URL: http://programmingzen.com/category/ruby/feed/
Feed Description: Antonio Cangiano's blog about Ruby development.
We now have a working Python driver for DB2 which is currently undergoing internal testing. The driver is similar to the Ruby and PHP ones, which means that you get an advanced and very easy to use API. It also means that if you are confident with the Ruby driver, you will be able to use the Python one in no time.
Ruby:
require 'ibm_db'
conn = IBM_DB::connect(database, user, password)
if conn
puts "Connection succeded."
IBM_DB::close(conn)
else
puts "Connection failed."
puts IBM_DB::conn_errormsg
end
We made it so that if you know one, you already know the other. These drivers are CLI wrappers that provide you with performance and stability. Also they don’t limit you to user data and are able to retrieve a good deal of metadata about your database. We’ll also provide a thin wrapper for those of you who intend to use a PEP 249 API. The next step, working on SQLAlchemy, has already started.
DB2 on Mac (no, really!)
When I first posted about our interest in Python/Django and DB2, the comment thread got hijacked by many people who asked for a Mac client in order to develop on Mac and deploy on Linux. Ask and you shall receive. I’ve promoted the idea of Django/SQLAlchemy/Python in IBM for a while now, and we are finally close to delivering the driver (with the adapter progressing at the same time too). Well, don’t take this as an official announcement, but Python wasn’t the only thing that I’ve been promoting for months within IBM. With the ever growing community of Ruby/Python hackers adopting Mac as their development platform of choice, I strongly believe that an investment in porting the great free version of DB2 to Mac is a very valid one.
I couldn’t talk about this for weeks, and it must be viewed as a rumor until IBM makes an official announcement, but we have been working on porting DB2 to Intel Mac. Not just the client, the whole package. This makes me a happy panda, no longer will a virtual machine be required to develop with DB2 on Rails on my Mac Book Pro. It’s a joy to see DB2 Express-C run on a Mac Pro (shown in picture) next to the other black boxes in the lab. Work is still in progress, but we should have a beta out there relatively soon (before winter kicks in). DB2 Express-C on Mac is intended for development purposes rather than production, this means that we expect you to develop on your shiny Mac but deploy on Linux or Windows. DB2 on Mac will be a beta product, but again it won’t just be a client runtime, it will be the full product and there is no reason why it shouldn’t be just as stable and efficient as the Linux and Windows versions.
Time to employee some of the newly acquired Cocoa-fu. I’m starting to feel that I could even learn Wasabi and IBM would still be able to let me use that skill in my day job. Awesome.