Live data from Hacker News

PylonsHQ - Blog - Pylons 1.0 Released

pylonshq.com

11–20 of 25 posts

Re: PylonsHQ - Blog - Pylons 1.0 Released

#11
post #2

1080 lines sounds quite sleek, but then I suspect it just sources almost everything out to other packages. Could someone who has used it comment on how it compares to Django?

I think of it this way: Django was built by a bunch of people with some specific goal in mind (make building a CMS super easy). For the most part, the same developers who built the ORM also built the templating language and the glue and the admin generator, and the auth system, etc.

Pylons was built by a bunch of people with different goals in mind. One was to make an awesome ORM. Another was to make a kickass templating language[1]. The purpose of Pylons is to make it easy to integrate your choice of optimal components into a web framework with reasonable ease.

Yes, if you're going to deviate from the defaults things may not work "out of the box" like Django, and you might not get a default auth system and an admin panel (could use something like repoze). While it'll take you longer to build the initial prototype in the first week, you wont hit that wall of "why do I have to put code in 4 places to add a template tag?" or "why am I getting weird PYTHONPATH-related side effects from using settings.py?" or "oh well, I guess I just wont use joins."

The ramp-up time/results curve of Pylons is steeper than Django's, but it stays relatively steady throughout your project, whereas a monolithic framework will get more and more in your way over time until you realize you've slowly dismantled the entire framework and reinvented Pylons.

[1] Incidentally, both SQLAlchemy and Mako Templates are founded by the same person, but historically Pylons has defaulted to whatever "the best" package was (SQLObject and Kid, a few years ago).

Re: PylonsHQ - Blog - Pylons 1.0 Released

#12
post #3

One thing going for Pylons: Great documentation. If you're using TurboGears 2.0, you'll do far better going straight to Pylons docs than most of the stuff on turbogears.org. Still though, it seems that most people tend to go for the full-stack frameworks. Anyone here using Pylons?

Yep. Pylons is fine. More flexible than many of the frameworks out there.

Re: PylonsHQ - Blog - Pylons 1.0 Released

#13
post #3

One thing going for Pylons: Great documentation. If you're using TurboGears 2.0, you'll do far better going straight to Pylons docs than most of the stuff on turbogears.org. Still though, it seems that most people tend to go for the full-stack frameworks. Anyone here using Pylons?

I have, it's a great framework, but as someone who would rather spend time working on what makes my product unique, I'd likely write it in Django instead as so much heavy lifting in terms of auth is already taken care of completely. On the other hand, you get to use SQLAlchemy in Pylons, which is pretty tasty...

Re: PylonsHQ - Blog - Pylons 1.0 Released

#14
post #3

One thing going for Pylons: Great documentation. If you're using TurboGears 2.0, you'll do far better going straight to Pylons docs than most of the stuff on turbogears.org. Still though, it seems that most people tend to go for the full-stack frameworks. Anyone here using Pylons?

I'm using Pylons as well. It's the perfect balance between using something too basic like cherrypy / web.py and something way too spoonfed like "django".

It removes the need for writing my own MVC which I would have needed anyways, and doesn't force me to use anything I don't want to. It's just Python, but neatly separates the files in logical places.

Thus far, Pylons has met every single need so far outside of async I/O, for which I've turned to node.js.

Contrary to popular belief, Pylons is not for intermediate Python users. I've taught web development in Python to beginners using Pylons and it's not hard at all to pick up for them.

Re: PylonsHQ - Blog - Pylons 1.0 Released

#15
Congrats, it has been quite a while since their last release.

A short comparison to Django:

- SQLAlchemy is badass.

- Jinja2 (or whatever templating language you like) is also badass.

- Passing data to your templates using a global 'c' object is weird and seems rather hack-ish to me.

- None of the third party form libraries are as good as Django's forms, especially when it comes to ModelForms (FormAlchemy's API is rather lacking, IMO). WTForms is the best I've seen so far, but it's lacking model integration.

- Both of the major user auth systems (AuthKit and repoze.who/repoze.what) are lacking compared to Django's contrib.auth. I found them convoluted, somewhat overengineered, and difficult to set up. Doing authentication in the middleware layer is the wrong approach, IMO. You shouldn't have to shuffle user data and login state around using redirects, query strings, and environment variables. If you search around on this topic, a lot of people end up recommending rolling your own. Blargh.

- Pylons puts a lot of cruft in your project when you create an new project. I'm not convinced how much of this stuff is actually necessary, especially at the beginning of a project.

- The docs have tended to lag behind the actual releases. For example, at one point url_for() was deprecated in favor of url(), but a lot of the docs still referenced it and it was not obvious where to find the documentation for url(). In fact, it's still not obvious. Sometimes you see TODOs in the documentation itself that make you wonder how up to date the docs actually are. Hopefully this has improved since I last used it.

My biggest issue with Pylons is when you run into needing a third party library like forms or user auth, you have to spend time researching 2342 different libraries, only to discover that many of them have fallen into disuse, or are poorly documented. On the other hand, it's great when it lets you choose well written components like SQLAlchemy and Jinja2.

Django and Pylons both have their pluses and minuses, but I think there is still a lot of room for improvement in the Python web world. Armin Ronacher seems to be making lots of progress with Flask, maybe we'll see that grow into a bigger project.

Re: PylonsHQ - Blog - Pylons 1.0 Released

#16
post #3

One thing going for Pylons: Great documentation. If you're using TurboGears 2.0, you'll do far better going straight to Pylons docs than most of the stuff on turbogears.org. Still though, it seems that most people tend to go for the full-stack frameworks. Anyone here using Pylons?

Yes, i do. I'm still not quite sure why most people choose Django over Pylons. Maybe it's the complexity (Might not be complex for the experienced Pythonista, but i feel that it's definitely more complex than Django) that steers potential users away from Pylons?

I've dabbled a bit in both Django and Pylons, and I've found working with Pylons is much easier than working with Django. Django has more "magic", which freaks me out. Pylons, on the other hand, mostly consists of glue code to tie different modules together and the Pylons book goes to great lengths to explain how this glue code works.

Setting any one of them for development is easy: just install them in a virtualenv using pip. Can't say how they fare in production setups. I'm not there yet :p

Re: PylonsHQ - Blog - Pylons 1.0 Released

#17
post #3

One thing going for Pylons: Great documentation. If you're using TurboGears 2.0, you'll do far better going straight to Pylons docs than most of the stuff on turbogears.org. Still though, it seems that most people tend to go for the full-stack frameworks. Anyone here using Pylons?

Yes, i do. I'm still not quite sure why most people choose Django over Pylons. Maybe it's the complexity (Might not be complex for the experienced Pythonista, but i feel that it's definitely more complex than Django) that steers potential users away from Pylons?

Seems to be a matter of personal preference. Some people prefer the Pylons style, some prefer the Django style. Nothing wrong with that, and it's why we have both (as well as other frameworks for the people who don't prefer either of Pylons/Django).

Re: PylonsHQ - Blog - Pylons 1.0 Released

#18
post #8
post #3

One thing going for Pylons: Great documentation. If you're using TurboGears 2.0, you'll do far better going straight to Pylons docs than most of the stuff on turbogears.org. Still though, it seems that most people tend to go for the full-stack frameworks. Anyone here using Pylons?

I've used Pylons for reporting, here are my takeaways: 1. It's a little tougher to get working "out-of-the-box" 2. It's documentation is not as "centralized" - meaning because you can use whatever template engine you want (jinja, mako, etc) and whatever db backend you want (sqlalchemy, elixir - a nice overlay on top of sqlalchemy, django ORM, etc) the docs for a particular module may or may not be in pylons docs 3. I…

> 3. It's waaayyyy more flexible - I can't praise SQLAlchemy enough, it's freaking amazing!

I used SQLAlchemy breifly, but found myself drawn back to the Django ORM (even for non-web based projects) - can someone explain to me why they think SA is better than the Django ORM - I find the latter to be much better.

Re: PylonsHQ - Blog - Pylons 1.0 Released

#19
post #11
post #2

1080 lines sounds quite sleek, but then I suspect it just sources almost everything out to other packages. Could someone who has used it comment on how it compares to Django?

I think of it this way: Django was built by a bunch of people with some specific goal in mind (make building a CMS super easy). For the most part, the same developers who built the ORM also built the templating language and the glue and the admin generator, and the auth system, etc. Pylons was built by a bunch of people with different goals in mind. One was to make an awesome ORM. Another was to make a kickass templa…

That's a good point about the Django honeymoon period before you hit all those little things like a proper multi environment settings.py schema. Once you're over those and start reading the Django code it becomes even more productive.

Re: PylonsHQ - Blog - Pylons 1.0 Released

#20

Congrats, it has been quite a while since their last release. A short comparison to Django: - SQLAlchemy is badass. - Jinja2 (or whatever templating language you like) is also badass. - Passing data to your templates using a global 'c' object is weird and seems rather hack-ish to me. - None of the third party form libraries are as good as Django's forms, especially when it comes to ModelForms (FormAlchemy's API is ra…

I agree with that assessment with the exception of the repoze.who comment. Repoze.who is bad ass. It takes a while to get your head around it, but at the end, it is far and away the best engineered and extensible auth system for python apps. I would encourage you to take a closer look.
Post reply on HN