|
List Info
Thread: Is Django the framework I've been looking for?
|
|
| Is Django the framework I've been
looking for? |

|
2006-07-21 01:11:16 |
Greetings Djangoers,
I'm thinking of defecting from the Ruby on Rails camp
because I think
Django may be more in line with what I want to do. If you
have a
couple minutes, could you please tell me if I'm on the
right track?
What I want to do
===========================
Basically, I want to speed development of *websites* with
applications built into them. Emphasis on the word
"sites" as opposed
to "applications". Almost every site I build has
some element of
interactivity, whether it be a simple contact form or basic
shopping
cart or full-on web forum. I tend to prefer building in
these things
myself rather than trying to wedge some 800 pound PHP
monster into an
otherwise elegantly coded site. I'd ultimately like to
develop my own
little suite of plug-in apps -- a basic forum, blog,
shopping cart,
etc. Then building a client's unstyled but
semantically-coded working
site would be totally trivial, and 90% of the work would
happen after
that in CSS land. That's the Grail for me
Why I think Rails is the wrong tool for the job
=====================================
I was really *really* excited about Rails when I first
discovered it
about a year ago (ask my poor wife how excited I was). But
there are
two things about Rails that are problematic for me. (1)
Rails seems
more geared towards writing single monolithic applications
rather
than websites with little apps built into them. I suppose I
could
explore the "plug-in" architecture more -- but I
suspect it won't be
as elegant as I'd like for building websites with mini-apps
in them
as described above. (2) I run my own shared servers. I need
to be
able to deploy 100+ sites on a single box. This is a
nightmare with
Rails because it hasn't had a very solid deployment
platform
(although maybe Apache2/Mongrel solves this). Rails also
tends to eat
RAM the way my mom eats cheesecake.
Specifically what I'm hoping Django will do for me
=========================================
(1) Portable apps across projects architecture. From what
I've read,
it sounds like a perfect fit for what I want to do. Is it
really that
great?
(2) Stable deployment with mod_python instead of some wonky
FastCGI
jalopy. Is it *really* stable -- enough for mission critical
production environment? How about memory footprint? Can I
run 100+
Django sites on a shared server and expect smooth sailing?
(3) I still get to keep most of what I love about Rails.
Pure object-
oriented MVC (MTV) development stucture, free stuff like
form
validation, code generation, pagination, input sanitization,
etc. Is
it true? What will I miss most about Rails?
Sorry for the looong post. Any feedback at all would be very
much
appreciated!
Cheers!
Sean
--~--~---------~--~----~------------~-------~--~----~
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://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---
|
|
| Is Django the framework I've been
looking for? |

|
2006-07-21 01:22:54 |
On 7/20/06, Sean Schertell <sean datafly.net> wrote:
> (1) Portable apps across projects architecture. From
what I've read,
> it sounds like a perfect fit for what I want to do. Is
it really that
> great?
Yes. It is that great. It's
really interesting that you see that as
one of Django's main strengths, as it's something we
don't really
advertise (but we should!). The software from which Django
was
extracted -- a news package called Ellington -- was designed
to let
apps be portable across projects/servers/sites. We wanted to
be able
to say "Let's reuse this events-calendar thing on
Lawrence.com and
LJWorld.com, giving them different templates for the
different sites,
but keeping the same backend code."
It's exactly what you're looking for, in that respect. And
thanks for
indirectly encouraging us to advertise this feature more...
> (2) Stable deployment with mod_python instead of some
wonky FastCGI
> jalopy. Is it *really* stable -- enough for mission
critical
> production environment? How about memory footprint? Can
I run 100+
> Django sites on a shared server and expect smooth
sailing?
It's production-ready. I'm using it at washingtonpost.com
-- see, for
example, projects.washingtonpost.com/congress -- and various
organizations use it for "mission critical"
sites. Check out
http://code.djangoproject.com/wiki/DjangoPoweredSites
for plenty of
examples.
> (3) I still get to keep most of what I love about
Rails. Pure object-
> oriented MVC (MTV) development stucture, free stuff
like form
> validation, code generation, pagination, input
sanitization, etc. Is
> it true? What will I miss most about Rails?
Here's something Rails has that Django doesn't have: the
requirement
to write "end" statements.
But seriously... I've never used Ruby on Rails, but the
"feature" that
people say Django doesn't have, that Rails does, is
automatic Ajax
JavaScript generation. I put "feature" in quotes
because I personally
don't see much value in automatically generating
JavaScript, anyway.
Other than that, Django doesn't create any stubs for unit
tests, so if
you're accustomed to writing unit tests for your Web
applications,
you'll have to set them up by yourself rather than using
any sort of
integrated thing. (However, we're close to adding easy
testing support
-- see http://code
.djangoproject.com/ticket/2333 .) And you can use
any number of excellent Python unit-testing libraries on
your own.
Hope this helps,
Adrian
--
Adrian Holovaty
holovaty.com | djangoproject.com
--~--~---------~--~----~------------~-------~--~----~
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://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---
|
|
| Is Django the framework I've been
looking for? |

|
2006-07-21 01:56:19 |
Allow me to offer a dissenting view. I recently faced the
task of
finding a Python-based framework to use at work and tried
several,
including Django. I finally settled on using CherryPy with
Kid. (Which
is what TurboGears is doing, but with a lot of extra cruft
thrown in.
And btw, the TurboGears mailing list is great for tech
support on
CherryPy and Kid.)
On 7/21/06, Sean Schertell <sean datafly.net> wrote:
> Specifically what I'm hoping Django will do for me
> =========================================
> (1) Portable apps across projects architecture. From
what I've read,
> it sounds like a perfect fit for what I want to do. Is
it really that
> great?
In CherryPy, every "directory" of the website is
mapped to a class
with its exposed methods being the "files" in
that directory. It's a
godsend as you can write any kind of functionality (shopping
cart,
blog, whatnot) into a class or two and plop it anywhere
else. Very
portable and versatile.
Django is somewhat more flexible (as you can map any
function to any
path), but CherryPy's class/method way of mapping things
suits me
better. It just seems more logical. Whereas Django allows
you to
redefine logic if needed :P
> (2) Stable deployment with mod_python instead of some
wonky FastCGI
> jalopy. Is it *really* stable -- enough for mission
critical
> production environment? How about memory footprint? Can
I run 100+
> Django sites on a shared server and expect smooth
sailing?
CherryPy provides its own server by default, which according
to the
CherryPy website is very stable, mature, and fast (with raw
speeds
comparable to Apache) but I think it can be set up using
mod_python.
Because Apache is faster for serving static files, we have
CherryPy on
a soon-to-be-in-production site sitting behind mod_rewrite
so that
certain folders are served by Apache.
> (3) I still get to keep most of what I love about
Rails. Pure object-
> oriented MVC (MTV) development stucture, free stuff
like form
> validation, code generation, pagination, input
sanitization, etc. Is
> it true? What will I miss most about Rails?
If you want OO, then from what I've seen, CherryPy might be
a much
better choice. As for free stuff, then Django certainly does
all that
(except code generation) and TurboGears does all that,
(except code
generation) but CherryPy alone does not.
You could use the form validation, input sanitizaion and
other needed
tidbits from TurboGears. If you want them. (I really didn't
need them
on our CherryPy system. I'm one of those people who likes
to reinvent
bikes for fun :P)
> Sorry for the looong post. Any feedback at all would be
very much
> appreciated!
Before anyone flames me, then I think Django is great. It's
a lot of
fun to develop with and it's certainly a very capable
framework with a
lot of interesting new features I hadn't seen before. But
it just
didn't "click" for me. CherryPy seemed more
mature, more stable, more
minimalistic, and certainly more in tune with my programming
style.
But hey, I'm no expert
Elver
--~--~---------~--~----~------------~-------~--~----~
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://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---
|
|
| Is Django the framework I've been
looking for? |

|
2006-07-21 02:12:47 |
On 7/20/06, Adrian Holovaty <holovaty gmail.com> wrote:
>
> On 7/20/06, Sean Schertell <sean datafly.net> wrote:
> > (1) Portable apps across projects architecture.
From what I've read,
> > it sounds like a perfect fit for what I want to
do. Is it really that
> > great?
>
> Yes. It is that great. It's
really interesting that you see that as
> one of Django's main strengths, as it's something we
don't really
> advertise (but we should!).
Just wanted to lend my "here,here!" that I think
this is a significant
plus and much should be made of it.
In a previous job, I worked with a Rails developer, and I
was always
put off by the clumsy way in which he had to run multiple
apps. The
single-project-with-multiple-apps or
multiple-sites-with-core-apps
model really mirrors real world development better, IMO.
And Django
facilitates this nicely.
Cheers,
deryck
--
Deryck Hodge http://www.devurandom.org/
Developer, Naples News http://www.naplesnews.com/
Samba Team http://www.samba.org/
--~--~---------~--~----~------------~-------~--~----~
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://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---
|
|
| Is Django the framework I've been
looking for? |

|
2006-07-21 02:18:31 |
Thanks for presenting a different angle. I imagine you're
one of
these long-bearded guys who uses NetBSD and Fluxbox as his
main
desktop OS and edits code in VI through a tsch shell
For me? OS X and TextMate plus some well thought-out
framework that
allows me to get from A to Z in __as little time as
possible__. I'll
re-invent stuff if necessary, but if there's some
well-oiled machine
that I can find to do exactly what I want, I'd much rather
use that.
Polish and cohesiveness are important to me. I'm allergic
to "jalopy"
solutions with various bits all taped and stapled together
(cough -
desktop Linux - cough). So for me personally, I think a
framework
born of a single vision such as Django or Rails is a better
fit.
But I'll bet you the guy sitting next to me would jump all
over your
idea
Sean
On Jul 21, 2006, at 10:56 AM, Elver Loho wrote:
>
> Allow me to offer a dissenting view. I recently faced
the task of
> finding a Python-based framework to use at work and
tried several,
> including Django. I finally settled on using CherryPy
with Kid. (Which
> is what TurboGears is doing, but with a lot of extra
cruft thrown in.
> And btw, the TurboGears mailing list is great for tech
support on
> CherryPy and Kid.)
>
> On 7/21/06, Sean Schertell <sean datafly.net> wrote:
>> Specifically what I'm hoping Django will do for me
>> =========================================
>> (1) Portable apps across projects architecture.
From what I've read,
>> it sounds like a perfect fit for what I want to do.
Is it really that
>> great?
>
> In CherryPy, every "directory" of the
website is mapped to a class
> with its exposed methods being the "files"
in that directory. It's a
> godsend as you can write any kind of functionality
(shopping cart,
> blog, whatnot) into a class or two and plop it anywhere
else. Very
> portable and versatile.
>
> Django is somewhat more flexible (as you can map any
function to any
> path), but CherryPy's class/method way of mapping
things suits me
> better. It just seems more logical. Whereas Django
allows you to
> redefine logic if needed :P
>
>> (2) Stable deployment with mod_python instead of
some wonky FastCGI
>> jalopy. Is it *really* stable -- enough for mission
critical
>> production environment? How about memory footprint?
Can I run 100+
>> Django sites on a shared server and expect smooth
sailing?
>
> CherryPy provides its own server by default, which
according to the
> CherryPy website is very stable, mature, and fast (with
raw speeds
> comparable to Apache) but I think it can be set up
using mod_python.
> Because Apache is faster for serving static files, we
have CherryPy on
> a soon-to-be-in-production site sitting behind
mod_rewrite so that
> certain folders are served by Apache.
>
>> (3) I still get to keep most of what I love about
Rails. Pure object-
>> oriented MVC (MTV) development stucture, free stuff
like form
>> validation, code generation, pagination, input
sanitization, etc. Is
>> it true? What will I miss most about Rails?
>
> If you want OO, then from what I've seen, CherryPy
might be a much
> better choice. As for free stuff, then Django certainly
does all that
> (except code generation) and TurboGears does all that,
(except code
> generation) but CherryPy alone does not.
>
> You could use the form validation, input sanitizaion
and other needed
> tidbits from TurboGears. If you want them. (I really
didn't need them
> on our CherryPy system. I'm one of those people who
likes to reinvent
> bikes for fun :P)
>
>> Sorry for the looong post. Any feedback at all
would be very much
>> appreciated!
>
> Before anyone flames me, then I think Django is great.
It's a lot of
> fun to develop with and it's certainly a very capable
framework with a
> lot of interesting new features I hadn't seen before.
But it just
> didn't "click" for me. CherryPy seemed
more mature, more stable, more
> minimalistic, and certainly more in tune with my
programming style.
>
> But hey, I'm no expert
>
>
> Elver
>
> >
--~--~---------~--~----~------------~-------~--~----~
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://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---
|
|
| Is Django the framework I've been
looking for? |

|
2006-07-21 02:43:47 |
Thanks so much for your reply Adrian! Can you also please
comment a
bit on how well Django works in a shared environment?
> How about memory footprint? Can I run 100+
> Django sites on a shared server and expect smooth
sailing?
Thanks!
Sean
--~--~---------~--~----~------------~-------~--~----~
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://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---
|
|
| Is Django the framework I've been
looking for? |

|
2006-07-21 02:58:29 |
On 7/21/06, Sean Schertell <sean datafly.net> wrote:
>
> Thanks for presenting a different angle. I imagine
you're one of
> these long-bearded guys who uses NetBSD and Fluxbox as
his main
> desktop OS and edits code in VI through a tsch shell
Ubuntu Dapper and Gnome. (I need Unix on commodity hardware.
I need it
with as little pain in the butt as possible.) SciTE for my
code,
though, which is pretty much just glorified Notepad with
syntax
hightlighting :P
Just because I like to reinvent a bike here or there for fun
doesn't
mean I'm not lazy :P
> For me? OS X and TextMate plus some well thought-out
framework that
> allows me to get from A to Z in __as little time as
possible__. I'll
> re-invent stuff if necessary, but if there's some
well-oiled machine
> that I can find to do exactly what I want, I'd much
rather use that.
> Polish and cohesiveness are important to me. I'm
allergic to "jalopy"
> solutions with various bits all taped and stapled
together (cough -
> desktop Linux - cough). So for me personally, I think a
framework
> born of a single vision such as Django or Rails is a
better fit.
Yes. I, too, hate stuff that's duct-taped together. Which
is why I
don't use TurboGears
Speaking of duct-tape, though. The various
"magic" bits of Django
seemed, to me at least, to be somewhat duct-tape-ish. Yeah,
it was
certainly useful being able to just set a variable and have
it do
something cool that you need, but it made me scared of what
extra
magic might be hiding under the hood that might bite me in
the butt
later.
I think the law of leaky abstractions applies here.
I'm not saying Django's bad or flawed. It's just my
preference. Plus
I'm by no means an expert on Django.
Elver
--~--~---------~--~----~------------~-------~--~----~
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://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---
|
|
| Is Django the framework I've been
looking for? |

|
2006-07-21 14:14:39 |
On Jul 20, 2006, at 9:43 PM, Sean Schertell wrote:
>> How about memory footprint? Can I run 100+
>> Django sites on a shared server and expect smooth
sailing?
Well, it certainly depends on the server, of course -- you
obviously
get what you pay for.
The memory consumption for a single mod_python Apache child
on the
servers I admin seems to average around 2M of non-shared
RAM. You'll
need a lot of those processes, of course, so I wouldn't
expect to be
able to run 100+ sites on a Dreamhost account... but that
really all
depends on the amount of traffic you'd get.
Just for a few points of comparison:
* My personal server just got Dugg and handled it without
hiccupping. The box cost me around $3k, has 8GB of RAM and
dual
Opteron processors; load peaked around 0.7.
* Our "misc" machine at work serves about 20
small sites. It's a
commodity Dell with 2 Xeons and 2GB of RAM. Load rarely
gets over 0.1.
Hope that helps,
Jacob
--~--~---------~--~----~------------~-------~--~----~
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://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---
|
|
| Duct tape |

|
2006-07-21 14:15:55 |
On Jul 20, 2006, at 9:58 PM, Elver Loho wrote:
> Speaking of duct-tape, though. The various
"magic" bits of Django
> seemed, to me at least, to be somewhat duct-tape-ish.
Yeah, it was
> certainly useful being able to just set a variable and
have it do
> something cool that you need, but it made me scared of
what extra
> magic might be hiding under the hood that might bite me
in the butt
> later.
>
> I think the law of leaky abstractions applies here.
I wonder if you could be a bit more explicit here... I
can't think of
a single place where you "just set a variable and have
it do
something cool", so I'd like to know more about what
scares you.
Thanks,
Jacob
--~--~---------~--~----~------------~-------~--~----~
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://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---
|
|
| Is Django the framework I've been
looking for? |

|
2006-07-21 16:50:57 |
On Fri, 21 Jul 2006 09:14:39 -0500
Jacob Kaplan-Moss <jacob jacobian.org> wrote:
> * My personal server just got Dugg and handled it
without
> hiccupping. The box cost me around $3k, has 8GB of RAM
and dual
> Opteron processors; load peaked around 0.7.
What's the digg link out of curiousity?
Josh
--~--~---------~--~----~------------~-------~--~----~
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://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---
|
|
|
|