Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

a.) You do need a solid block of time to devote to it, but if you have that, it's not bad. Start with the tutorial and work your way through it, and be sure to follow along. I had a decent grasp after about 2 days, and in 3 weeks I'd rewritten my whole project in Django, getting back to the functionality level I'd previously written in Pylons. This included delving into some of the more esoteric corners like template tags, custom management commands, and the authentication & user system.

b.) Don't worry about that - doing AJAX well depends a lot more on your JavaScript skills than on the server-side technology used, and for anything serious, you'll need to know real JavaScript. Pylons does have a nice shortcut in that they ported over all the Rails JavaScript helpers, so you can get simple things like pagination, reloading divs, and JavaScript buttons without actually using any JavaScript. But they implement this using Prototype, which is a library that I personally refuse to touch for the reasons in b.3)

b.2) There're actually like 5 different JSON libraries for Python, and you can mix & match them with web frameworks (they just output a string, and any decent web framework will let you send a string to the browser). I use simplejson (which comes in the standard library of Python 2.5 - no installation necessary) for flexibility and cjson for speed.

b.3) Stay away from any JavaScript library that messes with the prototypes of built-in object types or adds lots of functions to the global namespace. The bad list includes Prototype, Mootools, and 99% of random JavaScript snippets you'll find on the web. The good list includes JQuery, YUI, and any libraries built on them. The reason for this is compatibility: JavaScript has no native namespacing support, and so if you get 3rd-party libraries from two sources that don't pay attention to namespacing, they invariably end up stomping on each other's functions.

b.4) If you're serious about doing an AJAX app, take the time to really learn JavaScript well. My last employer thought they could paper over all the dark corners and browser incompatibilities with AJAX JSF components; they always ended up coming back to bite us in the end. Know what you're doing. The Rhino Book and John Resig's "Professional JavaScript" are good sources, as are the websites of Doug Crockford, John Resig, and Dean Edwards.

b.5) Start by doing non-AJAX apps with Django and only add AJAX when you absolutely need it to improve the user experience. Aside from flattening the learning curve, this also disciplines you into treating AJAX as an additional tool for the toolbox, not a buzzword. A lot of companies have gone AJAX-crazy (like my last employer) and are treating everything like a desktop app when they should start as a plain webapp and only add additional interactivity when necessary. The web succeeded for a reason; trying to recreate the desktop in a browser is a step backwards.



Thank you very much every one and Nostrademons in particular. I really appreciate your insights. Very helpful. What web-host (cheap and reliable:-)you guys use to deploy python-based apps?


Webfaction.com is good for Django, Rails, Pylons, etc.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: