Live data from Hacker News

Magic sucks, Django Rocks

christopherroach.com

31–40 of 40 posts

Re: Magic sucks, Django Rocks

#31

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 get the impression Pylons tries to be the "anti-Django" inverting the NIH attitude of Django and trying to be all things to all developers. The end result however is a huge number of dependencies and options that make installation and setup harder than it should be. Turbogears 2, which is based on Pylons, has an even greater number of dependencies - such that I needed to install virtualenv to get going with it.

For example, in order to support a large number of template engines, Pylons uses Buffet, another library which provides a common interface for these engines. Typically, however, you will only use a single template engine in your project and it only needs a few lines of code to set an engine up.

Although I do most of my web development in Django, when I do need more control or something a bit simpler I go with a Werkzeug + SQLAlchemy + Jinja stack (plus WTForms, similar to Django forms but in a standalone package). The code needed to get up and running isn't that much more than Pylons (and paster generates a whole lot of code anyway) and I can count the dependencies on one hand. That makes deployment a lot faster and easier, and it's just as easy to swap out these dependencies as with Pylons.

Re: Magic sucks, Django Rocks

#32
post #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",…

What parts of Rails are analogous to a big box labelled magic that can't be opened?

Re: Magic sucks, Django Rocks

#33
post #27

Earlier quoted context omitted.

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.

Looking back, I think I struggled with Pylons' lack of convention (or perhaps flexibility) more than anything else. There seemed to be a lack of consensus (or as I saw it, no established "best" solution) for handling common middleware tasks such as user authentication. It seemed like I was spending more time on application architecture than fleshing out a working system.

This was over a year ago, and I'm sure some things have improved, but looking back into that Pylons Cookbook still gives me the willies.

Re: Magic sucks, Django Rocks

#34

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…

nice way to push your agenda in sheep's clothing.

python = order and rightness

ruby = chaos

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

you seem to be contradicting your own argument.

Re: Magic sucks, Django Rocks

#35
post #17

Earlier quoted context omitted.

too magical

You could program something in VBA to do it for you.. I don't think I've heard anyone on HN refer to VBA as "magical". (It does definately have a deficiency of ponies)

There is no need to use VBE for Barcharts when values are in Excel rows.

Just type f12, after highlighting the content; or insert chart from contextual menu (right click)

Re: Magic sucks, Django Rocks

#36
post #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 vo…

> he doesn't even mention Twitter in the title

Nor Apple!

Re: Magic sucks, Django Rocks

#37
post #7

The idea that one must completely understand the implementation details of something they use before they use it seems silly to me. To be more specific, it seems to destroy the primary benefit of abstractions. I wonder if this person knows the implementation details of the language he uses? Or the RDBMS he uses? What about the OS he uses? Text editor?

Or all the way from Assembly level languages to Ruby and Rails.

Heck even the transistors and Micro electronics concepts,

oh then Quantum Physics and Solid State Devices...

To understand anything completely, you need to understand, everything completely.

Re: Magic sucks, Django Rocks

#38
post #34

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…

nice way to push your agenda in sheep's clothing. python = order and rightness ruby = chaos "It's not a zero sum game people. You can praise the things you like without having to deride the alternatives." you seem to be contradicting your own argument.

for the record, I'm a Ruby guy

Re: Magic sucks, Django Rocks

#39
post #34

Earlier quoted context omitted.

nice way to push your agenda in sheep's clothing. python = order and rightness ruby = chaos "It's not a zero sum game people. You can praise the things you like without having to deride the alternatives." you seem to be contradicting your own argument.

for the record, I'm a Ruby guy

Who views the word chaos in a positive light unlike the vast majority of people?

What you are doesn't change the tone of the metaphor you used.

Re: Magic sucks, Django Rocks

#40
post #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 occasion…

"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."

I think this has a lot to do with the person. Ruby and Python are almost identical technically (relative to other popular languages). I personally found ruby a lot more intuitive, and I used python for a year or two before I tried ruby. I'm sure this is a statement about me, not ruby or python.

Post reply on HN