Live data from Hacker News

Magic sucks, Django Rocks

christopherroach.com

21–30 of 40 posts

Re: Magic sucks, Django Rocks

#21
post #4

really not a fan of these 'rails is like a ferrari, django is like an aston martin' type of similes, they mean nothing to me. the article itself is pretty light on content; not much here except a baitish title.

I agree with you that this post does not come to much of a point. However, in my own experience, I had the same sense that Django was more straightforward, simple, and transparent than Rails - just look at the file structure of an empty project, or the baseline implementation of models.

I now work with both professionally, and Django still feels a little more straightforward. The other side of this is that I occasionally find myself wishing for some aspect of Rails "magic" in Django projects.

I also think that the way Rails is implemented (and to a lesser degree, the Ruby language) takes a little more experience and learning to understand in a meaningful way.

Re: Magic sucks, Django Rocks

#22

Earlier quoted context omitted.

But with Django, I can fake it. I can look at most of the code in a Django project and imagine a basic implementation sitting behind it. And I can work off of those generalizations. I can't do that for Rails. That's the point about DSLs and Magic -- you have no idea what could be going on behind the scenes, and it's harder to make a guess about why it might be going wrong.

At the risk of sounding harsh, it sounds like maybe you and the OP are just not interested in bucking down and learning more about the language. I tried to learn "Rails" by itself, but decided that learning Ruby (and I mean all of it, not just learning how to write an if statement) is the only way to really be able to use Rails. I can now (a) understand what's going on and (b) !!bonus!! I can write better code in Rai…

I feel the exact same with the aforementioned frameworks. I too am learning Python and decided to learn it whilst hacking away with web.py. When I found myself building yet another MVC framework with web.py as its core. I moved on to Pylons as it presents a nice middle ground between web.py and Django. Its a framework with a bit more bent on web.py's spartanism. So far its been a nice journey and loving the language more and more.

Re: Magic sucks, Django Rocks

#23
All these Ruby vs Python type posts are pointless, in my opinion, because they all overlook the same thing:

Whilst the languages are similar and fit almost the same problem domain, the philosophies behind them are almost opposite. People end up using the one that fits the way they think, because the language feels more intuitive/natural to you when it works the way your brain does.

If you like order, knowing exactly what's going on and knowing you're doing things the right way, you'll find yourself using Python. I think this is why it's gained such traction in the scientific community.

If you're happy with chaos, like to bend the rules and probably like to draw, you'll fall for Ruby.

It's not a zero sum game people. You can praise the things you like without having to deride the alternatives.

Re: Magic sucks, Django Rocks

#24
I like pylons and I cant understand why everyone is trying to scare off everyone else by calling it “glue”, “a hackers framework”, “it doesnt give you anything, allows you to choose everything”

People would almost think it is the Lisp of frameworks (which it is).

Pylons comes with “batteries included”. Its default setup with Mako, SqlAlchemy, Routes is quite good and I would say a Ruby-on-Rails for Pythoners.

And like RoR, you can fire up “paster shell” to get a nice console. But my best part - how you can set “import pdb;pdb.set_trace()” to start a debug session in a console.

I can wrap my fingers around pylons very nicely - and I like the fact that I can “hack” it if I ever wanted to.

Re: Magic sucks, Django Rocks

#25
post #6

"it never takes long before I reach a point where I feel like I’m no longer programming in Ruby." This echoes perfectly my feelings about Rails. I have tried, several times, to do something with it, but I always hit some magical wall or mythical creature that demands something from me I really don't know what it is. If I have to define the main difference between Rails and Django is that Rails is a DSL for building w…

I've never done anything more than "Hello World" with Rails, but interestingly, I am increasingly getting exactly this feeling with the framework I am using - Grails (groovy based). There are so many syntactic games played to make things look minimalist and cool that it is barely possible to understand anything it does from first principles. The problem with that is that throughout my career I have continually found that to be successful I have to understand things several layers below where I am operating at. There are always unexpected behaviors, bugs, features you don't understand properly that bite you in the process of development. Time and time again it's been the fact that I can dig right into what's going on several layers below that has saved me. I don't really believe that any of these frameworks is so wonderful that this won't be the case in the future, so it makes me very uneasy about this kind of thing.

Re: Magic sucks, Django Rocks

#26
post #5

Whether I'm driving a Ferrari or an Aston Martin, I still have no idea what goes on under the hood. If you have to understand every aspect of every library you use to code you will never get anything done. Instead, learn enough to attack your core competencies and trust that the rest of it works as expected, since someone else has chosen that as their core competency. Libraries and frameworks are all about not knowin…

> Whether I'm driving a Ferrari or an Aston Martin, I still have no idea what goes on under the hood

Maybe if you're just a casual driver that's fine. What if you happen to be a race driver? What if you need to drive in snow, on ice, on sand, at high altitude? It's suddenly a good idea if you have some idea how the car actually works. What if your boss says to you, "We need you to drive 15% faster with 10% less gas", and you open the hood and there's just a big box there labelled "magic" that can't be opened?

Re: Magic sucks, Django Rocks

#27

I like pylons and I cant understand why everyone is trying to scare off everyone else by calling it “glue”, “a hackers framework”, “it doesnt give you anything, allows you to choose everything” People would almost think it is the Lisp of frameworks (which it is). Pylons comes with “batteries included”. Its default setup with Mako, SqlAlchemy, Routes is quite good and I would say a Ruby-on-Rails for Pythoners. And lik…

I love the idea of Pylons, if for nothing other than its inclusion of SqlAlchemy, which I respect hugely.

However, after working on a medium-sized Pylons project for a few months, I found that there was quite a bit of "glue" that I had to implement myself, the type of thing that's typically handled under the hood by other frameworks like Django.

Perhaps it was my own ignorance or drive for simplicity/elegance, but I wound up getting nervous about the lack of these standards, and I got pretty frustrated about constantly rolling my own architectural solutions with little more guidance than comments in bug reports and scattered blog posts.

That's not to bash on Pylons - I think it's incredibly powerful, and in comparison Django (or Rails) feels a little like moving from power tools to a Fisher Price toy. Regardless I think it's the established standards that make these more mainstream frameworks better choices (in a business sense) for banging out working products.

Re: Magic sucks, Django Rocks

#28
post #15
post #11

Earlier quoted context omitted.

Rails is a DSL for building websites on RDBMSs. Django is a web framework for building web sites with RDBMSs. Interesting. I would consider this an argument in favor of Rails.

It's only being suggested that Rails ties your website structure to your internal database model more than Django does, and that might be less ideal for your users.

Only by convention and common practice though. You can easily mix and match any part of the MVC as you see fit. This is where the "magic" comes in. Rails gives you a set of very sane, most-common-scenario conventions that are the basis for it's huge upfront productivity. Obviously once you step out of this convention zone you're going to hit a wall, because you'll actually have to write code. It just feels like a wall because everything that led up to it was so damn quick.

Re: Magic sucks, Django Rocks

#29
post #27

I like pylons and I cant understand why everyone is trying to scare off everyone else by calling it “glue”, “a hackers framework”, “it doesnt give you anything, allows you to choose everything” People would almost think it is the Lisp of frameworks (which it is). Pylons comes with “batteries included”. Its default setup with Mako, SqlAlchemy, Routes is quite good and I would say a Ruby-on-Rails for Pythoners. And lik…

I love the idea of Pylons, if for nothing other than its inclusion of SqlAlchemy, which I respect hugely. However, after working on a medium-sized Pylons project for a few months, I found that there was quite a bit of "glue" that I had to implement myself, the type of thing that's typically handled under the hood by other frameworks like Django. Perhaps it was my own ignorance or drive for simplicity/elegance, but I…

it would be interesting to know what problems you faced. If you could elaborate on the roadblocks you hit - and how other frameworks solved it for you, that would be great.

Re: Magic sucks, Django Rocks

#30
A lot of what people call "magic" in Rails are just conventions (as in "convention over configuration"). Rails expects to find certain things in certain places named in a certain way and works with them automatically, which might seem like magic if you're new to it.

Seems to me the article can be summed up as "So, I tried Rails for a while but found I prefer Django's approach". Cool, and totally legitimate, but 39 votes? I mean, he doesn't even mention Twitter in the title! ;)

Post reply on HN