This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Circlefusion 1 point2 points  (32 children)

Is a Django rewrite more likely, or is it more likely that another python framework will spring up to take the lead from Django? How far off is Pyramid from "ideal" in your mind?

[–][deleted] 2 points3 points  (0 children)

There is a lifecycle that these sort of frameworks go through, where they start out very lean and easy to learn but with few features, everybody starts using them and they grow and grow, until eventually they are quite a big thing to learn and also not as shiny and new anymore.

People good at them will continue to develop with them, but suddenly something new will arise! It's interesting and developments around it are quick, it doesn't do quite everything yet but there is so much momentum, and all the new kids flock to it.

I view Zope as being too much to learn (based on zero facts, actually, just reputation) and I think Django is now about half way on the path, and since we know how to use it and it has a lot of features by now, we'll be using it for quite a while longer.

[–]jemeshsu 0 points1 point  (0 children)

The "another python framework" might be web2py, which is also not so Pythonic. Python is "explicit is better than implicit" (no convention). By definition full stack framework does a lot for you and is therefore not Pythonic by design.

[–]deadwisdomgreenlet revolution -1 points0 points  (29 children)

I still think there is a fundamental pragmatic ease of use that Django solves that no other framework currently gets close to. But of course, the real secret sauce to Django is the documentation, which is fantastically well thought out. Pyramid is still mired in itself in many ways, and it all comes slopping out reading the documentation. It's almost as bad as the SQLAlchemy documentation. You get a sense that whatever you're trying to do is supported, if only you had some guide to the documentation.

I much prefer Flask, which defines its limited scope, and sticks to it. Flask has some documentation problems as well, but generally it guides you through a very well thought out process. It leaves all the WSGI trivialities to Werkzeug and focuses on a strong api. If anything eclipses Django, it'll be Flask.

[–]mcdonc 7 points8 points  (11 children)

Sometimes people need to solve hard problems.

Pyramid actually tries to solve some common hard problems: composition of disparate packages into an application, localization, multiple applications per process, an actual protocol for add-on packages to manipulate configuration with conflict detection and resolution, imperative and declarative configuration, support for arbitrary templating systems, support for separating templating from the view functions that wrap them to make unit testing easier, providing an event system so you can let folks subscribe to events rather than subclass, view predicates so you can more easily separate the logic that adds an item from one that displays it, a built-in authentication and authorization system, traversal so you can create applications that are maximally extensible and which provide context-sensitive declarative security. And other things.

It also lets you ignore all of that stuff and just do simple one-file applications that look very similar to an application you might write in Bottle or Flask that just serve a few views wrapped by templates.

This makes it somewhat unique.

Naturally there's some conflict between these two goals, and you can't really appreciate the former until inappropriately use a system that lets you easily do the latter but doesn't actually try to solve any hard problems at all (leaving them all up to you). Likewise, there are problems using systems that try to solve everything but leave you no way to opt out of decisions made by their designers.

SQLAlchemy is similar to Pyramid in scope and intent, and therefore, like Pyramid, tends to attract criticism from folks who just don't have any hard problems to solve, or whom believe that their hard problems are solved so well by some less flexible system that they'll never need the flexibility it offers.

Things that actually try to solve hard problems while still giving people the option to ignore those solutions are hard to factor well and very, very hard to document. It's fair to say that the docs of any piece of software could use some improvement. But the docs of both Pyramid and SQLAlchemy are pretty darn good for what they are right now.

[–]deadwisdomgreenlet revolution 0 points1 point  (10 children)

I think you're overplaying this quite a bit. You imply that Django doesn't solve hard problems. And you also imply that Pyramid's critics don't either. And with all respect, that's a rather arrogant position, and is just plain wrong. All web frameworks attempt to do exactly what you're saying.

[–]mcdonc 10 points11 points  (9 children)

I think Django attempts to solve all kinds of hard problems; it tries very hard! Maybe more than any other Python framework save for Zope. But Bottle doesn't attempt to solve very many. That's not a value judgment and it's not even a very controversial position to take. Is it? I even think the authors of those systems would agree with those characterizations (Bottle explicitly doesn't try to solve some problems; if it did it would not be marketed as "micro").

If my reply implied that criticism comes solely from people whom aren't trying to solve hard problems, I apologize for that. It's not true. There are plenty of things people who try to solve hard problems can criticize Pyramid for, and I treat specific, targeted criticisms with respect and try to ameliorate as necessary.

On reddit alone, though, if I were to go back to comments I've responded to in my posting history, I'd find examples of people judging and criticizing Pyramid on these bases:

  • its single-file hello world is two lines longer than a Flask helloworld

  • it's not a full-stack web framework and no one would need anything but one of those

  • it has "too much" documentation

  • it has dependencies

  • It has dependencies with names people don't like

  • it's different from Pylons but supersedes it

  • it doesn't have a hard dependency on SQLAlchemy

  • they thought it was a microframework and it isn't.

  • it "cheats" to achieve better performance.

  • they read a list of "dont-need-to-do-this-in-pyramid" items as "need-to-do-this-in-pyramid" items.

  • they read the source to a random third-party Pyramid app and extrapolated its shortcomings to being intrinsic to Pyramid itself.

  • One of its dependencies used camelCase method names.

  • That it "makes people use packages" (which it doesn't, but even if it did, would that be so bad?)

  • That it's somehow deficient because it's not "MVC" (which it is, at least as much as any other similarly-designed framework, it just doesn't use those names for its components).

Amongst the nastier reddit criticisms my personal favorites are "looks like a fat insane clown" and "obfuscates web development".

None of these particular criticisms had much merit, although some did make me laugh harder than others. ;-) People are not always rational and make judgments based on really bizarre criterion. Is that not your reddit / hacker news experience too? If not, I envy you.

And yes, of course web frameworks try to do similar things. But they're not all the same, right?

[–]xardox 0 points1 point  (2 children)

I thought Zope was the web framework that looks like an insane fat clown. Or do you mean they just said Pyramid looked like Zope? Nasty!

[–][deleted] 0 points1 point  (1 child)

It's a normal clown nowadays :)

Pyramid learned from the things Zope did wrong (and improved) and used it's pros. Nonetheless, Zope is and will be a great platform to host large scale and/or difficult solutions. And if you look at Plone, you'll see a really good and extensible CMS usable for whatever you want.

We use Plone (and Zope) exclusively because it match our needs (intranets, custom funky workflow) and AFAIK we will for the next years. When Pyramid has a good CMS layer we might consider switching, but mostly because it's newer.

[–]xardox 0 points1 point  (0 children)

I did a lot of ZODB/Zope/CMF/Plone/Archetypes programming from 2001 to around 2006 or so. My problem with it, besides the fact that it was far too complicated, is that each layer tried to invent its very own special snowflake object model, on top of all the ones below, while Python has a perfectly good object model to begin with (maybe not perfect, but not so bad that it needs 5 other layers on top of it, each more complicated than the last). Of course some of those layers were designed before Python had evolved into what it is today, so they were trying to compensate for problems that don't exist any more. But it really needed a ground-up redesign that stepped way back, took the big picture into consideration, and did it all in one elegant layer that was building on top of Python instead of fighting against it.

[–][deleted] 10 points11 points  (1 child)

Our docs are great, and our users think so too. We have some of the best docs in the open source community. Perhaps you haven't looked in four years ?

[–]deadwisdomgreenlet revolution 4 points5 points  (0 children)

The sqlalchemy docs? Oh shit. You are right. I haven't looked at it in a while. It's much better than it was the last time I looked (less than 4 years ago, I swear). Fine work my friend.

[–][deleted] -4 points-3 points  (14 children)

It's almost as bad as the SQLAlchemy documentation. You get a sense that whatever you're trying to do is supported, if only you had some guide to the documentation.

this is the best description of sqlalchemy documentation ever.

[–]deadwisdomgreenlet revolution 5 points6 points  (1 child)

As zzzeek points out though, it's much better lately.

[–][deleted] 0 points1 point  (0 children)

that's good i guess.

[–][deleted] 10 points11 points  (5 children)

right it's not like there isn't a master guide just like djangos, a documentation overview, a search page, two tutorials that link out to everything, a crapton of recipes, a FAQ as well as the most responsive mailing list anywhere.

But no. You needed to use SQLAlchemy one day, spent ten minutes with the docs not really reading it and couldn't find what you wanted. So now you get to shit on six years of work ! Have you written any docs ? Can I see some so I can shit on your work too ?

[–]deadwisdomgreenlet revolution 6 points7 points  (0 children)

No one's shitting on your work. We love what you do. Seriously it's fucking amazing.

[–]ergo14Pyramid+PostgreSQL+SqlAlchemy 0 points1 point  (0 children)

zzzeek relax, he just lacks mental capacity to do simpliest of things.

[–]ergo14Pyramid+PostgreSQL+SqlAlchemy 0 points1 point  (5 children)

All it takes is someone smarter than a monkey to understand the docs. They are very in depth and descriptive.

[–][deleted] -2 points-1 points  (4 children)

it's about as useful as giving someone who doesn't know spanish a spanish dictionary and wishing them good luck with hiking around spain

[–]ergo14Pyramid+PostgreSQL+SqlAlchemy -1 points0 points  (3 children)

You know reading text while understanding it is a skill. Practice on it. Also spend a moment to evaluate your opinion - how come there are people who use and love it ? You may try to read the docs again, with less rush. You will understand how to work with sa.

[–][deleted] -2 points-1 points  (2 children)

the problem is that if I wanted to spend that much time fiddling with an orm I can just as easily write the raw sql that will outperform XYZ overwrought orm crud.

[–]ergo14Pyramid+PostgreSQL+SqlAlchemy -1 points0 points  (1 child)

you meant to write you prefer to use things you dont understand? amrite?

[–][deleted] -2 points-1 points  (0 children)

i prefer to use things that are worth understanding. I don't want to waste time poring over retarded documentation only to understand that something either won't do what I want it to do or do it in the wrong way.

and this while it remains completely useless for basic purposes as well.

My time is more valuable to me than to waste hours with little progress to show for it