What do you like about Django?

I started learning Django a few days ago, and when I immerse myself in it, it seems to me that I like it more. Trying to switch from another language. I will not say which one, since the purpose of this question is not bash anything.

So, I would like to know your opinion about Django.

What do you like?
What made you switch / use it?
What features would you like to have so that they are not?
What would you switch to this?
How fast does this happen in production?
How hard is it to handle this?

+7
python django
source share
6 answers

What I like about this:

  • Very simple ORM
  • clear pattern / controller separation
  • Django Administrator
  • plug-in applications: it seems to me that the Django community really nailed it!

What made me switch:

  • mostly curiosity
  • I heard a lot of good things about this from a colleague.
  • I wanted something easier than Java, which I do for a living.
  • I had a third-party project with a lot of work, for which the Django-Admin interface is very useful.

What features would I like:

  • better / simpler control over transactions (setting up various types of transactions (read / read / edit only here and there) is not as simple as I'm used to. Having a view model in view mode where the transaction is still open in the view does not make me so comfortable, I would prefer that transactions do not leave the service level, but then again, the Django model really does not have a service level.
  • the best model for business logic (maybe it's just me, but I skipped the service-oriented approach of business java, I never know if I should put business logic in a view, in a form or in a model. the solution makes me feel warm and fuzzy ... at the same time, I don’t have heavy business logic in the application that I am developing at the moment, and I would probably still use Java for them)
  • stability (in the sense does not change, but not in the sense of not failure). Again, starting with Java, where I am still working on Java 1.4 for many projects, having the project that just released 1.0, and all the refactoring that went with it, is not very encouraging. This required some work to keep an eye on the trunk, and the use of 0.96 was not particularly convincing. I do not think that I would be comfortable using it in a critical corporate project.

I understand that there are many improvements that I would like. Don't get me wrong, I love Django and I will stick with this for many projects. I just won’t become him everywhere ...

+8
source share

What do you like?

Sending URLs: I have never been a big fan of "/foo.php", this is the file "foo.php" on my server, and if I need more convenient URLs, I need to get around mod_rewrite and maintain this according to what awaits my logic in foo.

ORM: because 90% + of your queries, in my experience, do not need to be written manually. In general, smart caching is much more important for performance. You can always abandon raw SQL as needed.

Middleware and Signals: It's easy to distribute most of the parts of the request / response / view / render cycle without touching the Django code itself.

What made you switch / use it?

This happened when I was disappointed with the suggestions of the Python web framework. Easy to sell for me.

How fast does this happen in production?

Hmm, to be honest, I never cared too much. Part of the web server of your application (in my opinion) is always the easiest to scale. As long as you use the “best practices” and don’t share anything, all you have to do is add a software load balancer, and you can add new web servers until the cow returns home. The first bottleneck that users typically encounter is loading the database, but Django provides you with excellent caching APIs to help you ease this.

However, I was only looking through this, but it seems faster than Rails and the well-known PHP frameworks: http://wiki.rubyonrails.org/rails/pages/Framework+Performance

How hard is it to handle this?

I think it depends on how you define "master." The documentation is excellent, for the decent size of the site / application, I think you will use a bit of everything, which is a great start.

+8
source share

Like

Great documentation. With stackoverflow, I learned a lot in just a few days. This is writing in Python. It has a wonderful contrib.admin that is even modular and extensible to embed it in the web application itself.

I do not like

Not yet. I'm still fascinated

Switch

Its first web structure, so there is no switch. After using Python for several years, Django seemed like a natural choice for me, mainly for its clean design.

+4
source share

What do you like?

  • templates, especially the inheritance function, were awesome after working with jsps
  • no need to write sql anymore

What made you switch / use it?

A friend watched his progress before he was published publicly, and I have used it for personal projects since then.

What features would you like to have so that they are not?

I understand that this is not a trivial problem, and I think that Google summer of codes was spent on this, but I would like to see better ways to develop db (which, apparently, do a pretty good job).

What would you switch to it?

I already use it at home, and I do not make these decisions at work.

How fast does it work?

I've never run into problems, although by and large, django doesn't seem to work, so performance is more dependent on python or db.

How hard is it to handle this?

The documentation is pretty amazing, and enough people use it that answers are often available when it doesn't help. In addition, when I had to go to the source code, it was clean and documented, so I would say that it is easier to learn than most frameworks based on the Internet or otherwise.

+4
source share

I did not have the opportunity to use it a lot. However, my absolute favorite part of django is the built-in administration console.

+3
source share

Loves:

  • Pythonic (I can easily understand the language) and thus easily expand any part
  • Documentation
  • community (I belong to French and they are very nice).
  • full loading of projects around him
  • fully integrated test engine. You can almost experience the whole application without starting a web browser, just by writing tests.
  • user commands just swing. It makes it easy and simple to perform custom tasks. I often use it to run batch tasks (for example, to clean up a database or check integrity on a production server - tests use their own database, not the actual data in your application).

Why switch?

  • PHP got bored from scratch.
  • had an RSI in the back of my arm, very painful. after switching to a language without a comma, he disappeared (he is TRUE!)
  • much more robust development (TDD) and faster (you can create a CMS in minutes) - like so many other web frameworks.

Does not love:

  • no smooth migration of the data model. You often have to change your model due to an unexpected feature. It is painful, and you have to build it manually, and sometimes it can be dangerous.

How hard is it to handle?

  • If you already have Python skills, you can create things in a few hours.
  • If you don't, plunge into Python (heh) first - it will take several days.
  • Mastering may take some time ... And you often find gems in the Django documentation that will make you scream, "I love Django!" (well, this works for me).
+3
source share

All Articles