Live data from Hacker News

Happy 20th Birthday, Django

djangoproject.com

51–60 of 191 posts

Re: Happy 20th Birthday, Django

#51
post #45
post #25

As someone today who is an unrelenting critic of python. I have to say thank you to Simon and the Django community as a whole. Its a wonderful "batteries included" framework that has launched many successful projects, companies, and careers. Mine included. And I'd be lying if I didnt say I still use pgadmin as my benchmark for evaluating admin panels in other ecosystems. What you all created with Django is amazing. W…

How can you be an unrelenting critic of Python but love Django?

I don't think you can honestly and objectively criticise something you don't truly know.

There's still no framework in e.g. Go that comes anywhere close to matching Django. It's pragmatic, doesn't do too much meta-magic (I still don't "get" Rails), lets you strip away any layers you don't need, etc.

Re: Happy 20th Birthday, Django

#52
post #45
post #25

As someone today who is an unrelenting critic of python. I have to say thank you to Simon and the Django community as a whole. Its a wonderful "batteries included" framework that has launched many successful projects, companies, and careers. Mine included. And I'd be lying if I didnt say I still use pgadmin as my benchmark for evaluating admin panels in other ecosystems. What you all created with Django is amazing. W…

How can you be an unrelenting critic of Python but love Django?

Software is multilayered and you can prefer some layers over others.

I am huge fan of Python and Django. I despise PHP with the force of a thousand suns but I give enormous credit to Laravel as a well-designed framework that makes life bearable when working with PHP.

Re: Happy 20th Birthday, Django

#55

Earlier quoted context omitted.

Wikipedia says Jacob was hired shortly before Simon's internship ended though. Not sure why you are trying to imply that Simon wasn't a co-creator. https://www.quora.com/What-is-the-history-of-the-Django-web-...

In general when an intern works on something before you get there, and then you do all the real work, the intern doesn't get co-creator status.

You have silly rules.

simonw co-created Django. It's a fact. You don't have to like it.

Re: Happy 20th Birthday, Django

#56

Out of curiosity, for people who have do projects in both Django and Ruby on Rails, which one would you prefer and why? I learned Python more than 10 years ago, but later chose Rails to be my first web framework to learn, as I also wanted to learn more about Ruby, hence the question.

I've preferred Django for a few reasons:

* I've always preferred Python over Ruby. Explicit imports, namespaces and the "only one way to do something" philosophy have felt more scalable. In general the language does not promote as much implicit magic

* Django reflects the same philosophy: more explicit definitions, a slight bit more configuration and ceremony but easier debuggability.

* The Django docs are, to me, some of the best there is in documenting the framework extensively but also teaching good practices. I've always felt the Ruby docs to be lacking in the latter department so you see more drift in Ruby projects on how to approach the same problems

* Django has felt much stable over the years. Migration between major versions is a breeze.

* The Python library ecosystem is much larger

* The Django admin and Rest Framework are some of the biggest timesavers I've seen. Rails has similar projects but they don't quite make it

Unless you're doing a GIS or project with scientific computing I would not let these factors go above personal preference, as Rails is still an excellent framework.

Re: Happy 20th Birthday, Django

#57
post #45

Earlier quoted context omitted.

How can you be an unrelenting critic of Python but love Django?

Software is multilayered and you can prefer some layers over others. I am huge fan of Python and Django. I despise PHP with the force of a thousand suns but I give enormous credit to Laravel as a well-designed framework that makes life bearable when working with PHP.

Same here: I started with PHP (and Zencart and the like) and moved on to Python and Django. When I had to step back to PHP for a while, Laravel was an island of sanity, just because it was clearly "let's do Django/Rails in PHP".

Re: Happy 20th Birthday, Django

#58
post #39
post #18

In a very real sense, I have Django to thank for my entire career. As an undergraduate, my first academic job in a research lab had me building websites to promote the research in a lab. Django was brand new, and I was uninterested in petty concerns like stability and security, so I did everything in Django. Years later (2009), I got to do interesting work in a cutting edge machine learning lab due to the expertise I…

Does/did Django have a reputation for instability or insecurity? Also, how on Earth did the ML PhDs decide physically segregated databases for each user were a requirement?

It's not that Django has/had any reputation for those things -- it's that Django had no reputation at all since it was a nascent project with no track record. That means it had no proof points for being stable or secure. At the time I adopted it (~Nov 2005), the public release of the Django project was only a few months old, and indeed breaking changes followed soon after (the so-called "magic removal branch"). As I recall, there were also various template escaping security issues at that time.

> Also, how on Earth did the ML PhDs decide physically segregated databases for each user were a requirement?

I worked at several labs at top academic institutions, on everything from supercomputer MPI work for multi-agent sims to image pipelines for large weather simulations, and one thing I learned is that being a good coder is orthogonal to being a good researcher. In that particular case, the person who wrote the code made the assumption that the "customers" would not allow their sensor data to be stored alongside the data from other customers, and separate databases with separate passwords was the solution they came up with. Somehow they did not notice that the terrible ergonomics of this solution meant there was probably a better way. Once I ripped out MySQL in favor of Postgres (since it had proper security) and removed the cumbersome middleware layer performance improved by over 100x.

Re: Happy 20th Birthday, Django

#59

Out of curiosity, for people who have do projects in both Django and Ruby on Rails, which one would you prefer and why? I learned Python more than 10 years ago, but later chose Rails to be my first web framework to learn, as I also wanted to learn more about Ruby, hence the question.

Having done Rails and Django professionally for some time now I’d honestly recommend Django. While I love the meta aspects of Rails unlike other people I just think the Python library ecosystem is just so massive that you can quite literally do anything with Django without having to resort to multiple programming languages, etc.

Lot of the places I see that use Rails now has a separate codebase for their Python work that has to be accessed via separate querying versus just using the Django ORM.

For most cases I would recommend Django to be the main framework for startups. But if you don’t intend to do any ML/AI and only need a defined set of libraries and you are a one man shop then Rails dev speed is so fast.

Re: Happy 20th Birthday, Django

#60
post #12

Fastapi has completely replaced django for me. I do not miss orm at all.

I’ve also switched away from Django (to Litestar), but the ORM is the mean thing I keep missing from Django. SQLAlchemy feels really clunky by comparison

I think the ORM is fine. There's always some friction coming from mapping rows to classes and objects, but you can always drop down a layer and just pull raw tuples.

What I'm not a fan of, is the query DSL. Normally, the developer works to figure out how to express their problem with SQL; then the DB engine works to figure out how to map that SQL to the data it has on disk. Now Django adds another layer, which is completely unlike SQL, has its own unique pitfalls, etc; sometimes I find myself just dumping the raw SQL, working on that to get the result I wanted, then working that back to the DSL.

I think SQLAlchemy gets it right. The query language is a thin veil over SQL, and mapping to objects is an explicit and clear operation. What does feel clunky to me, is setup: SQLAlchemy expects you to bring your own glue; Django is vertically integrated.

Post reply on HN