3 ms·
I've mostly been using django which is wonderful (even more so if you do things their way). The thing I love most about django is their orm, it makes cakephp's
by wizard_2 16y ago
I've mostly been using django which is wonderful (even more so if you do things their way). The thing I love most about django is their orm, it makes cakephp's orm feel like a toy. I haven't yet used pylons, but I'm thinking that it would be good for me to learn another orm and it offers full support for a few.
The reason I picked Django was the "apps". App's are python modules that tie into your project and provide functionality of some sort. The two ones off the top of my head are the "admin" app, which is frankly amazing, and the comments app which is a good example of what most apps are. An app that handles posting of comments and attaching them to any other kind of model.
Django's history is in publishing and it shows. One app I'm making is for a real estate firm, I'm using Sorl Thumbnail, django-googleappsauth, and the admin app to take care of posting photos, having a single login with their mail (google apps) and a nice featured interface for the agents. Django's a great fit.
The other app is an internal order tracking system that has to check against edi files and all sorts of other gotchas. It's got to do operations on millions of rows and lookups from multiple databases. Python has no trouble with most of this, but django's apps and orm doesn't exactly fit with the bulk of the operations. I do however use the django user system and fairly easily tied it into an active directory auth backend. The Admin app isn't useful at all for most of the interfaces, but the form classes and view layer (usually called the controler in most mvc's) let me do what I need to.
- jacquesm 16y agoI've tried (hard, three fair sized projects) to get in to django but I keep running in to limitations in the ORM that I could easily solve if I was writing sql direct. I'm impressed with your ability to get the app boundaries so clean, re-use has been another problem.
- wizard_2 16y agoDjango's orm seems to aware of some of it's weaknesses, you can actually write your own queries and return the data as a queryset (with your models) instead of just a dictionary or list of data. I use that to filter some records on a many to many join that was based on a shared field instead of a 3rd table and was happy with the results. Before trying that out I actually built the 3rd table which while it only has 3 columns (id, fk1, fk2) is probably the largest tables I've ever had to use with around 10 million rows. The django orm spent many hours building those relations, my custom sql spent about 5 minutes. Sometimes when you have hammer.... I can't take credit for the clean app boundaries, it's either python or django that lends itself to it. The apps I've written have to have clean boundaries if I want to use the community apps. But thank you anyway, it's been a lot of fun learning all of this and the community has been very helpful.