Python论坛  - 讨论区

标题:[python-chinese] An Honest Look at Django

2007年07月29日 星期日 18:21

黄毅 yi.codeplayer在gmail.com
星期日 七月 29 18:21:44 HKT 2007

http://symple.wordpress.com/2007/07/28/an-honest-look-at-django/


I've written a few posts on Django and those were mostly a response to
Django's admin interface. However, when I switched to building a web
application in Django instead of Ruby on Rails, I saw the benefits
immediately. Faster, easier and more productive. Period.

In Rails there are different ways to do anything. The approaches can become
easily unlimited depending on your skill level. For a developer like myself
who is primarily a designer, it seemed less appealing that I had to spend
60% of my time learning how to do it right. Don't get me wrong, I want to do
it right. Nevertheless Rails documentation and the elitist community didn't
shine light on anything. I realized then and there, Rails is not for
newbies.

I'm almost positive there are plenty who disagree, but the fact of the
matter is your disagreement is irrelevant cause you're not me. Moving on.
I've bought all the "important" books for Ruby and Rails and have come to
the conclusion that Rails isn't as productive as it claims to be. Surely its
more productive than what we've had over the years in the shadow of Java,
PHP and others. But I'm speaking mainly about building production ready web
applications and web sites.

This is where I came back to Django. Previously, Rails gave me good fuzzy
feelings and the only reason I took to it was because it had a larger
influence and everybody else was doing it. Now that reality has set in, I
needed something that was less hassle. So I've switched to Django.

*Why Django over Rails?*

   - *Deployability - *Rails is not easy to deploy on shared host
   environments. When I say easy, I mean I should have the proper control to
   start and stop my application layers whether they be servers or just
   applications. Rails needed at least Mongrel to work smoothly. And if you
   really wanted your projects to sing, you'd had to incorporate more stacks.
   Django leaves this to be optional. Django runs well no matter how many
   stacks you have.
   - *Portability - *Django was built to run on any hardware anywhere. It
   runs well with older versions of MySQL and Apache, so on and so forth. So
   moving my projects from one server to another was simple. Rails on the other
   hand leaves all the heavy lifting to the developer. Quietly, Rails in a
   nutshell is a luxury framework.
   - *CRUD and the Admin - *Often I like to test and validate my model
   structures before adding end-user centric functionality on top. To do this
   in rails I have to build "non-scaffoldish" admin intefaces and relate my
   data manually. Django doesn't make me do this. It does it all for me and it
   looks hot at that. It makes CRUD and the admin UI enjoyable.
   - *Views and Templates - *They just make sense. I hate recreating the
   same layouts over and over again, luckily both Rails and Django create paths
   of least resistance in this area, however Django does a better job.

Those are just a few things Django has proved itself in and as time moves
on, I will post more about how Django does documentation. Stay tuned.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://python.cn/pipermail/python-chinese/attachments/20070729/a450175b/attachment.htm 

[导入自Mailman归档:http://www.zeuux.org/pipermail/zeuux-python]

如下红色区域有误,请重新填写。

    你的回复:

    请 登录 后回复。还没有在Zeuux哲思注册吗?现在 注册 !

    Zeuux © 2025

    京ICP备05028076号