HN user

newaroundhere

8 karma
Posts0
Comments7
View on HN
No posts found.

I think there are two valid approaches here, depending on the project. One project I'm currently involved with has a team of content/design people who work on Django templates - giving them more power with a template engine like Jinja2 or Mako would introduce nightmares.

On the other hand, when I'm building my own applications the Django template engine seems ridiculously bureaucratic, when I just want to drop in a Python function without reams of template tag boilerplate. That's one of the main reasons why I prefer Flask/Jinja2 for my side-projects (well that, and SQLAlchemy).

I think what he might be referring to is when you run an in-memory SQLite database in your unit tests (which is common practice, for speed and convenience). If the test server runs in a separate thread to the unit test, then they use two separate in-memory databases and you cannot populate the server database from your unit test setUp.

This however does work in Django - presumably by somehow passing the same DB connection to the test server.

I don't know what your experience is with #pocoo, but in general I have found the members courteous and helpful.

If anything you seem a bit ignorant for rejecting a framework you otherwise seem to like because of an IRC channel.

If you are going to call a whole lot of people - some of whom are among the best coders in the Python community -ignorant, I'd suggest coming up with some examples.

I think for a web framework to be successful (all other things, like features, being equal) it needs a few essential ingredients:

- plugin ecosystem. Not necessarily at the beginning, but tha architecture should make it easy enough to add plugins (or apps, or extensions or whatever they are called by the framework) that developers feel encouraged to do so.

- high profile sites or projects, or at least a high volume of sites, so developers can answer manager's question, "Well, who uses it ?". Again, no framework will have this at the beginning but it will need this to get big (bit of a chicken and egg situation).

- good documentation, preferably but not exclusively online. Good == well written, up to date, well organized and consistent.

- good marketing: maintainers who can blow their own trumpet in the blogosphere, conferences, books, Twitter etc etc.

Now the code may be crap, and it may not have this feature or that feature, or it may or may not be easy to extend or customize. But the above points are required if it is to stand a chance.

Django, despite the flaws you mention (and I agree with some of them, and could add a few of my own) meets these criteria. It has the sites, the documentation, a healthy ecosystem of apps (though of varying quality), and is marketed by people who work, or used to work, in the newspaper business.

Flask, as an up-and-coming framework, is just a couple months old, so obviously doesn't have the ecosystem or the high profile/high volume yet. But it is well-positioned to take off : the documentation is excellent, and it has a good plugin architecture, with about a dozen or so "official" extensions already. Whether or not it does take off depends on many other factors, but I'd say it's future looks quite promising. It may need some aggressive marketing, or at least one or two high profile sites.

Pylons, OTOH, doesn't look so healthy. Documentation, last I looked, was out of date, poorly organized, and contradictory (AuthKit is recommended in the docs, newbies use AuthKit, get confused by its crapiness, go on IRC, and get told "don't use Authkit" - why is it still in the docs at all ?).

It's not so easy to add plugins, except at the WSGI level, which is often the wrong level of abstraction, plus there is the confusion of "entry points" and how to make it all work with Paster. As a result (and also because of the pisspoor docs) despite being around almost as long as Django, Pylons doesn't have a good plugin ecosystem. It has one high profile site - Reddit - but otherwise for the time it's been around I can't think of many others.

I'd also recommend a look at Flask: http://flask.pocoo.org/. It's quite new but more polished and easier to learn than Pylons, and comes with excellent documentation and handy extensions.

As you say, however, Django is a good place to start for a beginner - it has a larger community and ecosystem of apps for doing just about anything web-related (although the apps are of variable quality). It's also quite mature (5 years now) and has more job opportunities.

Django Hidden Hires 16 years ago

Agreed; why not have a site like this at least for Python ? Any half-decent Python programmer should be able to pick up Django quite quickly, and I'd rather hire a good Python programmer with broad experience than someone who has just used Python through Django.

I'm thinking of learning Rails (currently on Python/Django). However I don't want to put all the effort into learning Rails 2 if there are going to be a lot of changes. Is it worth waiting until Rails 3 comes along, or should I just dive in now ?