The geekery continues!

May 20, 2009 08:47

So, I've put up my latest geek piece: Fixing an omission from Django's simplejson: iterators, generators, functors and closures, which is exactly what it says it is. Django's "simplejson", which bundles up server-side structures and exports them to the browser for interpretation and display in fat client applications, is okay, but it fails in some ( Read more... )

json, django, geek

Leave a comment

Comments 4

sandhawke May 20 2009, 17:01:04 UTC
Random question: why Django?

I haven't settled on a python web platform. I see claims like "You really should have tried Pylons (http://pylonshq.com/) instead of Django. Yeah, Django has all the press; it was invented by journalists. Pylons is still better."

It's hard to know how to evaluate claims like that without first becoming an expert in all the systems... :-(

Reply

elfs May 20 2009, 18:18:03 UTC
Well, you kinda have to do just that. I evaluated Pylons briefly because it actually has a Webware compatibility layer; I'd be able to leverage most of my knowledge before diving right in. But ultimately, I decided that press and paradigm favored Django over the alternatives. For one thing, it installed on Gentoo without dragging in a huge number of outside classes, which Pylons did. (That said, Django is much more useful after dropping in several plug-ins, like treebeard, tagging, registration, and so forth; but those are plug-ins above the architecture; Pylons needed a ton of things just for its architecture.)

But underneath it all, Django is just more Python. If, with Django, you want to use SQLAlchemy instead of DjangoDB, you can!. If you want to use Cheetah instead of DjangoTemplates, you can! Nothing stops you except your own knowledge of Python's inner mysteries.

A second answer is that it's not just Django. I'm just trying to build out an online portfolio, something I never needed when I thought my job was secure. ( ... )

Reply

elfs May 20 2009, 18:27:21 UTC
Oh, and one other point: the post on ElfSternberg.com is not just about Django. Any Python application server has this problem: most of them use simplejson, and simplejson doesn't understand closures or generators. The snippet of code, ExtSimpleJson, works with any application server. We used it at Isilon for the Webware-based UI product, and it will work with aquarium, cherrypy, turbogears, quixote, or webpy just as well.

Reply


Maybe a magazine article out of this? anonymous May 27 2009, 14:54:56 UTC
You might consider making a magazine article out of this - perhaps for Dr. Dobbs Journal or another similarly technical venue. Might be good for a little bit of income.

Reply


Leave a comment

Up