

Ask YC Hackers: Which Python ORM/Framework works best with Rails-conformant DB schema? - old-gregg

We have a successful mid-sized Rails project (about 10K lines) and have some time/resources to clean things up before starting a big and important "Version 2".&#60;p&#62;One of the things we wanted to do was to investigate a possible switch away from Rails, possibly to a Python-based stack, due to a number of reasons, all of them non-technical.&#60;p&#62;I'll be looking closely at Django, Pylons and even Merb, but decided to drop this question here to get a community advice:&#60;p&#62;Which Python/Ruby ORM works best on an existing DB schema created specifically for ActiveRecord? One thing we certainly don't want to do is a significant schema change and a resulting DB conversion.
======
mdasen
Well, if Merb is in the mix, you can continue using ActiveRecord. Merb would
be the easiest to port to. It's Ruby. It has ActiveRecord. You could use your
current templates.

I'm really trying hard to figure out what kind of non-technical reason would
dictate a ton of work for no technical value. DHH insult your boss? It just
seems weird to make a technical decision for non-technical reasons.

Django can probably handle it, but you'd have to override things for every
table. You wouldn't be able to reuse your templates and, well, it's different
enough that you'll be finding gotchas everywhere. Rails has gotchas too, but
you've already dealt with the Rails ones. It just seems like a lot of work for
a non-technical reason.

~~~
old-gregg
I hope I won't get killed here for saying this, but hiring Rails programmers
is close to impossible. There are only two flavors and neither is desirable:

#1 Bad ones: know-nothings who have RoR on their resume "just in case", along
with 20 other languages.

#2 Good ones: snobby assholes who read 37's "Fuck You" slide literally,
usually very good ex-Java developers who don't really need a full time job
because of a plethora of Rails contracting gigs on the market.

We even tried the outsourcing route but even that didn't work: offshore devs
are all about PHP/Java/C#.

~~~
mdasen
Ahhhh!

Ok, that can be fair although I'd probably consider that a technical
requirement. Really, you'll find the same problem with Merb and Django. There
are a bunch of people who have done small things (say, a todo list) in them
that don't really know the framework. While the Django community doesn't tend
to have the same attitude that some of the Rails community has, it's a really
small community. Finding good Django programmers is hard. While some in the
Django community would argue that it's just Python (vs. Rails' more DSL take
on Ruby), it's more than simply Python.

It's hard to hire programmers in general. Django and Merb are much smaller
than Rails in terms of exposure and number of programmers. While you might not
get as many pretenders or as many bad attitude people, there are simply less
people.

I wish I had something more helpful to say here. If you're looking to hire
Django people, djangogigs.com and djangopeople.net are good places to
post/look. I really think Merb would be the better choice as a lot of the code
can be reused - you could completely reuse the models and templates which
would probably save you a huge amount of development not to mention require no
alteration to your database.

------
jjguy
import MySQLdb

db = MySQLdb.connect(blah)

cur = db.cursor()

cur.execute("SELECT foo from bar where baz")

Spend your time customizing a data access layer to fit your needs, not
shoehorning an existing framework into a situation where it'll never quite
fit.

~~~
seunosewa
Thanks. I don't know why people are so scared of SQL.

------
ropiku
By using DataMapper for instance I don't see why you need to change the
schema, one major difference is that you need to specify the fields in the
models.

