Live data from Hacker News

Django 2.0 released

docs.djangoproject.com

101–110 of 177 posts

Re: Django 2.0 released

#101
post #76

Earlier quoted context omitted.

Flask is used by Pinterest and LinkedIn, which I'm guessing are a touch more than 100 lines of code. Flask is, of course, more powerful than bottle, and has less batteries included than Django. Saying Flask is good for 100 LOC sites is terrible advice, no matter which way you try to slice it. It isn't. It's widely-used and well-maintained. Don't get me wrong, I like Django as well.

I've used Flask for single file sites with 10-250 lines. It's great (ish). What's bad about it? Your saying it's only good for writing large applications? How so?

Your contention is that it's only good for small sites. I'm saying it's good for any sized site as long as you actually know how to RTFD and program in Python.

Django is no different. Django falls apart spectacularly in the hands of people who can't program.

Re: Django 2.0 released

#102
Nice! Coincidentally I had my very first Django experience two weeks ago (and blogged about it [0]). It struck me as a very solid and clean and lean framework. But I do think there is somewhat of an entry barrier: you need to understand quite a few concepts, which if you do, would open up many more options besides Django. So it's not unique in that regard. However, I had trouble finding QUICK CRUD app solution i.e. here is my database, please make some forms for me. And Django: with the builtin admin/user mgmt, did exactly that.

[0] https://j11g.com/index.php/2017/11/23/django-in-10-minutes/

Re: Django 2.0 released

#103
post #97

I wish they'd skip-jumped their version to "Django 3.0". That would have allowed a simpler message about the Python dependency: "Django 3.x requires Python 3.x".

Django 3.0 will be out soon enough (Dec 2019). There's going to be a major version bump every two years.

Re: Django 2.0 released

#104
Congrats to the team, this has been a long time coming. No Python2 support which is unfortunate, my Python3 migration strategy was to move to C# for my main language instead. No regrets, I like it a lot. I describe it as industrial strength. Good IDE and granted me a larger job market with Xamarin for iOS coverage.

For web stuff, I'll probably be using a C# framework, or Wordpress with one of the JITs. Still, a lot of hard work has gone into Django 2.0 and I'll be keeping tabs on it, rooting for the team. It's not likely but not barring the idea of using Django again.

Re: Django 2.0 released

#105
post #37

Earlier quoted context omitted.

Interesting. What would you say is the biggest reason for this >10x development speed difference?

Django forces you to declare everything. Lots of manual boilerplate. Example, you must define every bit of a model in order for it to work. Rails is the opposite. ActiveRecord will ‘just work’ with the database. You can run rails on an existing db for example if it follows what are widely used conventions such as lowercase model name is the table, foreign keys are foo_id, etc... This is where people fear the “magic”…

> you must define every bit of a model in order for it to work. Rails is the opposite. ActiveRecord will ‘just work’ with the database.

If you have an existing database, sure, Rails is preferred. If you're starting from scratch, the Django definitions can create the tables for you. If you do have existing tables though, you can use inspectDB to have Django create the models for you.

Re: Django 2.0 released

#106
post #26

Respect to the Django team that even after 12 years they have only one major version shift (which seems to only because of dropping support for Python 2) and the backwards incompatible changes are minimal.

There have been lots of breaking changes along the way. Django is pretty good at giving developers a heads up of what is deprecated and slated for removal, but there have been lots of growing pains in the 1.x release cycles.

Given the functionality Django offers, the "cost" of the growing pains has been well worth it. Especially for the 1.7 upgrade that happened a while back (when they introduced the new migrations framework). Relative to modern JS projects, where whole frameworks are switched out quarterly, maintaining a Django project is trivial.

I really like the new URL syntax they introduced. I'd been relying on 3rd party libraries like Django REST for years at this point, because the raw regex URL syntax was always annoying and verbose. The new syntax looks well executed.

I've been working with 1.11 and Python 3, so I'm looking forward to upgrading soon.

Re: Django 2.0 released

#108
post #96

Earlier quoted context omitted.

What I like most about Flask is, it provides the barebones for request/response handling, and gets out of your way. Add SqlAlchemy to the mix, and python handles the rest. I'm using Flask, but building my apps with Python. This simple/complex equation should be reversed IMHO. Want to throw together something quick? Go with Django, where everything you need is built-in. Want to build a big app? Go with Flask, and buil…

I've ever understood this argument. Any library you can pick and mix into your Flask app you could just as easily pick and mix into your Django app. It's all just Python.

not really. Did you ever tried to use SQLAlchemy with Django? Good luck with that.

Re: Django 2.0 released

#109
post #9

Earlier quoted context omitted.

Python - Django Ruby - Rails PHP - Laravel all nice choices

Scala - Play

I'm not sure about that. Compared to Django, RoR and Laravel it's not opinionated enough. No resources like RoR and Laravel, no buil-in database mapping, no built-in authorization etc.

btw: what do you use for the database access? Slick, Quill, Doobie, ScalikeJDBC, Anorm, Squeryl, jOOQ, Relate, Activate or something else? There seem to be gazillions of sql libraries for scala (although the big three and most relevant are probably Slick, Quill and Doobie).

And what do you use for Authorization? Something custom build? If I look at Laravel there are quite a few maintained authorization libs with ~1000 stars on youtube (even more if we count unmaintained), for play there is not really much (deadbolt, play4j and t2v/play2-auth, I don't count Silhouette since the lib is mainly about authentication).

Post reply on HN