4 ms·
I can't say how much I love Django. Back in the day when it was first coming out, I was coming out of the Microsoft/ASP.NET world and was being introduced to th
by themartorana 12y ago
I can't say how much I love Django. Back in the day when it was first coming out, I was coming out of the Microsoft/ASP.NET world and was being introduced to the wonder of Rails. But a small project I had contributed some mind-share to had been rebuilt in Django. When I asked which I should learn, Rails or Django, a wise developer friend advised I play with Ruby and Python. Figure out which language spoke to me, and use the best framework available.
I chose python, and despite the niceties of Rails, found Django an absolute pleasure. Add in a sprinkle of Johnny-cache, Jinja2, and South (because you could in Django) and it was a powerhouse.
I haven't written any Django code in a couple years now - my work is now mostly backend/API code for which Flask was much lighter weight (and Go is mostly replacing), but all my Django sites are still running.
Congrats to the team on continuing to push forward a brilliant framework, the best documentation in the business, finally getting DB migrations in the core, and more and more and more.
And by the way, thanks - I owe a bit (lot) of my success to everyone who contributed to Django and the larger community. I hope my meager contributions a few years back were at least a bit of repayment on a much larger bill.
- lumpypua 12y agoAny suggestions on packages you're using for your Go toolchain? I'm a django developer that's somewhat fed up with python's slowness. I love django but I'm looking to diversify. I've worked through a bunch of Go tutorials, but I don't have a good feel at all for the go ecosystem.
- aaron-lebo 12y agoI've also done a lot of Django hacking and have the same feelings about Python. You aren't going to find anything as complete as Django in Go. There just hasn't been enough consolidation on a single framework and things are too much in flux. I never found an ORM I liked, but pongo2 [1] is directly modeled after Django's templating language. There's also negroni [2] and its ecosystem. Gorilla [3] is an excellent set of packages as well. It all feels a lot like using a less mature Flask (mainly because Armin Ronacher has put years of work into it). As much as I want a speedup from Python (as well as good concurrency) I'm finding Python is still a lot more expressive and takes less code. Your mileage may vary. I suspect what Go would be really useful for is a JSON API that a Flask app (or something similar) consumes. 1. https://github.com/flosch/pongo2 https://github.com/flosch/pongo2 2. https://github.com/codegangsta/negroni https://github.com/codegangsta/negroni 3. http://www.gorillatoolkit.org/ http://www.gorillatoolkit.org/
- themartorana 12y agoThese are good, and seconded on the maturity front. I'm a fan of goji and more recently have been using Gin [0]. For databases I'm playing with sqlx [1] and modl [2] from Jason Moiron (because they're based on gorp, and because he wrote Johnny-cache for Django which is amazing and I use on every Django project I work on.) Gin is young, but has great potential and I'm already using it in production (with a keen understanding of its current shortcomings). [0] http://gin-gonic.github.io/gin/ http://gin-gonic.github.io/gin/ [1] https://github.com/jmoiron/sqlx https://github.com/jmoiron/sqlx [2] https://github.com/jmoiron/modl https://github.com/jmoiron/modl
- victorhooi 12y agoYeah, the current web frameworks on Golang seem to be quite...chaotic to an outsider. And the landscape is constantly changing. It's not like Ruby or Python, which seem to have one clear mature do-everything framework, and some more lightweight ones beneath. Is there such a thing as a Django-equivalent in Golang at this point in time? Or what's the closest analogue? None of them seem to package an ORM together, so not sure what people tend to do here, to reduce boilerplate code in their models.
- quaunaut 12y agoPart of the issue there is that Golang doesn't have any mature ORM-type packages. The one I've heard the most about is [Gorp](https://github.com/coopernurse/gorp https://github.com/coopernurse/gorp), but none of the current Golang web libraries really sanction anything- but that's part of Go's nature. Go by default doesn't encourage big frameworks. It encourages you to use the rather well-built standard libraries to get most things done, and do the rest of the augmentation yourself. However, as it's being looked at more and more as a great systems language, people are building bigger, more frameworky systems in it all the time, and as a result it's getting friendlier. It's going to be chaotic no matter what for the next year, but that's how new languages, especially popular ones, are. If you're looking for easy choices, it might be better to wait for now. If you want to get your hands dirty, I guarantee you'll find something you want if you keep looking, or you'll get good enough to run with it yourself. (Just be sure you know your web basics to do webdev on it, as no one is going to hold your hand in Goland.)
- crucialfelix 12y agoFor many years in python there were several contenders for webframeworks. Only after many years did Django eventually dominant. I've used Django a lot and personally I would prefer smaller lightweight frameworks where its easier to select packages that provide solutions to specific problems. I'm not looking for the next Django. Something the size of Express would be perfect.
- jarpineh 12y agoI love Django for its docs and sensible defaults to just about everything. I've been reading the Light Weight Django book, now nearing completion at O'Reilly, and Django can be used as lightly as Express. I'd link to source example, but I can't find the code anywhere and the ebook is not on this device... I don't know if it's lighter than regular Django in terms of speed, but by the measure of how much you need to code you can't do much better. Couple of pain points are declaring settings for middleware and template processors, even when you don't really need them, but other than that it is really basic. This is your URL pattern, this is your view function to call when a request comes for such URL. From there you can do what you want with the request, as long as you convert your response to Django's HttpResponse object (which takes a string). For something a bit different, I recommend taking a look into Morepath: http://morepath.readthedocs.org/en/latest/ http://morepath.readthedocs.org/en/latest/ It looks to have some genuine useful parts from Zope, rethought for today's more RESTful, Javascripted world. My next personal project will probably use it as a base.
- mctx 12y agoAre you using any packages with Flask for API code? I quite like Django Rest Framework for JSON APIs, I just ignore the parts of Django I don't need.
- Goopplesoft 12y agoFlask Restful by Twilio is pretty good (http://flask-restful.readthedocs.org/en/latest/ http://flask-restful.readthedocs.org/en/latest/) some wrong assumption are made by the app but customizing it is fairly easy.
- leetrout 12y agoCare to share on the assumptions that didn't work for you? I ask because I hit a few weak spots in the docs and a maintainer that wasn't really interested in understanding my pull requests last year.
- ConAntonakos 12y agoHaven't gotten into Django yet; previously worked with Rails and fell into its welcoming embrace and now playing around with PHP5+. But it's exciting to see new releases to powerhouse frameworks, and I hope to really get into to it one day! Thanks for the glowing review. :)