Django - starting from ground zero - any advice?
My current comprehension level:- Damaged by Java, love at first sight with python. Hungry for more django.
My current comprehension level:- Damaged by Java, love at first sight with python. Hungry for more django.
and
http://www.b-list.org/weblog/2006/nov/16/django-tips-get-mos...
http://www.b-list.org/weblog/2007/sep/04/django-accelerated/
http://www.slideshare.net/simon/advanced-django/
Those are some sites I've come across when I was, and still am, learning Django. Good luck.
Also, because no one has mentioned it before: http://djangobook.com/
Get the code here using svn:
svn checkout http://7days7apps.googlecode.com/svn/trunk/ 7days7apps-read-only
I also like the APress book Definitive Guide to Django by Adrian & Jacob.
I would also recommend "Python Pocket Reference" (3rd Edition) by O'Reilly. It really helped me get up to speed with Python in a short amount of time.
Good Luck.
But what on earth is "Damaged by Java" supposed to convey? I guess you find Python with Django to suit your particular needs better than Java, no reason to play down the latter though.
Java is good, but I always felt so constrained when writing code. It just felt like I had to write so much extra junk code like getters and setters that it made rapid prototyping which I do a lot a hassle.
Python was a breath of fresh air, and is a great language for hacking around in. Java is very useful and I still use it quite a bit.
I think Python is a slick language and tool and its Benevolent Dictator for Life is a knowledgeable and nice person. I ran into him while interning at Google (worked on the same team and almost did a project related to one of his).
I guess what I don't like is that devs of all kinds of backgrounds have been downplaying Java ever since its inception and in my view not always rightfully so.
My (admittedly subjective) impression is that this has been happening beyond the usual "religious programming language wars".
Developers writing native code are still complaining about Java's (supposedly) terrible performance, admin-focused scripters for lack of immediacy and web-focused coders for being bloated and not supportive of "agile procedure". I'd just like to point out that this language has become the "working man's language" and with it spans a wide variety of domains and features an incredibly large community. Perf-wise, I doubt that there is currently another language VM that has been better studied, optimized and supported than the JVM (Azul, anyone?).
Of course, the truth is that Java is a tool like every other language and has its proper uses and domains where I'd also pick a different weapon of choice.
I definitely agree the majority of Java complaints are from people choosing the wrong tool for the job.
Read more about it in Michael Triers blog at http://blog.michaeltrier.com/
I found poking around inside Satchmo incredibly helpful for finding quality code examples. (http://www.satchmoproject.com/).
Other than that, just do the tutorial on the djangoproject site, and subscribe to the django-users group on google groups.
have fun!
Rich
edit: Also there's a feed called the django aggregator. A little noisy at times, but worth scanning through couple of days: http://www.djangoproject.com/community/
Oh... and when he's done he'll be on "cloud nine".
English is weird.
It's not that great, but it covers the basics. Also, it includes a no-installation-required django environment for Windows, which you can even run from a USB flash drive.
I will be uploading an update sometime in the next few days now that qsrf has been merged with trunk, but it's still quite usable as is.
Don't worry when you start about doing them the best way. Its often better to make the mistakes (while still exploring) and your next app will just be that much better.
Good luck and great choice :)!
Then start coding. It's not too difficult. Some of the things with template engine are a bit funny, so try and not write any big code here, move it to the view/model. But otherwise remember that google is your friend.
My app is a geo based app, but I couldn't get geodjango to play nice. So I just installed the libs and went with that.
It's only when you want to change something that it's possible that you might just be restricted to one layer.
I think the idea of the template is that you have one template and many views, and possibly that a template can be created of many different smaller templates, e.g. header, footer, sidebar.
Here is an example of something that I wanted to do with a very specific template that wouldn't be used on any other page.
My model gives distance in meters, for each of the objects and I wanted to display it in miles. So I had to add a new method to the model dist_miles. Instead of just saying round(cinema.dist / 1600, 2) in the template.
I've only been using django for a week now so its quite possible that I'm going about it all wrong.
The easy way to look at them is you could write your own 'filter' or 'count' or any of the tags you see.
However, most of your needs can be met by the built in filters.
Are you talking javascript <-> flex, flex <-> HttpService in django and/or django with ajax?
Frankly I find ajax/flex/flash with django to be easier than asp.net webforms since you just setup a route (REST-like if you want) and then "post" to it and return some data and use it in javascript.
In ASP.NET it's not all that hard, but I just have to remove any master pages and remember to clear out the .aspx page contents if I'm not returning HTML.
I really don't see how it's any different than any other ajax + some server technology, so if you're used to ajax <-> php, then ajax <-> django is no problem.
Kidding.