Monday, May 30, 2011

Re: Learning Django: Approach / Advice / Resources

Robin

Don't worry - your mother is probably right.

Here are my "rules" ...

1. Dive into Python 3 rocks

2. Read "Practical Django Projects"(*) or if you decide against that get
yourself a small-ish concrete target and avoid extraneous functionality
like the plague. Then when it is working look for other people's open
source django apps to plug in and widen the scope with more functionality.

This is the core of my suggestion. If you keep your own portion of your
next website really tiny and as simple as necessary it will be much
easier to refactor for more elegance and better performance in future.
Adopting this approach forces you to learn how everyone else does it.

I think your problem is that you want to achieve too much at once. The
more experience you get the narrower the focus your apps have. The less
each does the better. That takes courage and practice and makes unit
testing much easier.

I also believe the django core team are arguing a false benefit for
django - flexibility. Sure you can do it any way you like but that is no
help for beginners. It only scores points off rails people and they
aren't coming to django in numbers which could ever match beginners
choosing between rails and django.

Flexibility is a later benefit absolutely essential when you run into a
brick wall and is one of the main reasons experienced developers choose
django.

The real genius of django is a system which lets heaps of applications
collaborate in a single website.

* James Bennett - but don't even think of downloading his example code.
Write your own as you read along.

My 2 cents

Mike

On 31/05/2011 5:30am, Robin wrote:
> A little while ago, I was approached about building a basic web site
> for a small store. The requirements were pretty typical and read like
> a menu of web development tutorials. This was to be a data driven
> site that any decent web developer could build. I, however, am not a
> web developer, decent or otherwise. So, I turned the assignment down
> and decided it's time I looked into learning something about web
> development.
>
> I looked at everything from ASP to Java to PHP and even the likes of
> Drupal and Joomla. I liked the ideas and patterns behind Django as a
> framework ( MVC = :) ) and Python as a language. The combination
> seemed like perfect middle ground to me. Things were going well as I
> worked through the tutorial and explored the documentation to dig
> deeper into core Django topics. Where am I today?
>
> I'm struggling a bit with Django, to be honest. Or maybe I'm
> struggling with Python, I'm not completely certain which. Maybe it's
> because I'm trying to learn web development and Python at the same
> time. I'm certainly no genius, but I'm not a bonehead either...at
> least my mother doesn't think so. ;)
>
> The individual technical ideas are presented well and I can always
> find enough information to learn more. But Django as a whole feels
> less cohesive. Or maybe it's that Django sometimes feels...TOO
> flexible? There are certainly a lot of choices in terms of how much
> Django to use and how much to roll yourself. Guidance seems to be
> offered on a per-module basis. Maybe that's just how it is and I'm
> looking for structure where there is none available.
>
> I'm not sure what to override...when to call the super classes
> corresponding method. Do I have to concern myself with the test
> cookie idea? Should I name my URLs? Is mixing positional and keyword
> arguments OK? Are generic views the best way, or just the quickest
> way?
>
> I guess it boils down to a concern over making poor choices and
> learning bad habits. If I'm going to spend any amount of time with
> this web development hing, I want to do it right. I'm also fighting
> my urge to build everything myself. Sure it would be plenty flexible,
> but it would also take longer and wouldn't leverage the great work
> done by all of Django's contributors.
>
> So, what am I rattling on about then?
>
> Judging by some of the posts I've read since joining the group, I'm
> sure there are a bunch of folks who would appreciate some guidance
> and / or best practices from the more experienced Django developers.
> I understand everyone learns and progresses differently, but I would
> really appreciate your take on things.
>
> How much do you use built in Django functionality? Are there
> components you tend to avoid? Do you use Django only for certain
> types of projects? Do you struggle with Python or Django? Is the
> source code a good place to spend some time? Is your authentication
> system home-grown? Have you been bitten in the behind by using too
> much Django? Not enough?
>
> I realize this is a lot to ask, but I think it's a good thing that we
> help newer developers do things the right way. I certainyl want to
> become a contributing member of this group, but not until I won't give
> bad advice and flat out wrong answers. ;)
>
> I've gone through a good chunk of the Django Book online. Is this a
> good resource or do you have other recommendations? There aren't all
> that many books on Django, but there are a few. Do any do a better
> job than the others of guiding you to the best way to build web
> sites / apps? I sure wish there was a book that kept pace with the
> changes and the miost recent version. Is the fact that there isn't
> much available a bad sign?
>
> Just jump in and adjust as I learn my lessons?
>
> Regards,
>
> Robin
>

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment