“ Pyramid is a "Pylons Project" term shall lead to confusion to many People.” “ Hello, I want to know exactly what is the relation b/w these web frameworks.” “ I've had some projects in mind for a while and I was just seeking some clarification regarding frameworks. Pylons, Pyramid, Turbogears and Web2Py in particular.”
The Pylons Project <ul><li>The aim of the project is to develop a related set of web technologies
It's an umbrella name, similar to how the Apache name is used today
Pylons 1 is a stable and maintained web framework, but no further enhancements to it will be done.
Pyramid is the current and future embodiment of Pylons-Style web development
There will be other projects under this umbrella, like TurboGears. </li></ul>
“ Pyramid Provides More Than One Way to Do It” “ Pyramid Does Traversal, And I Don’t Like that” “ Pyramid Has Too Many Dependencies” “ Pyramid Uses A Zope Component Architecture (“ZCA”) Registry”
Design decisions <ul><li>Like all software, Pyramid's developers made design decisions that you may not like.
“ Do you recommend Pyramid even to those without zope background ?” “ However I still believe the better solution would have been a complete rewrite than merging with repoze with all its Zope baggage .” “ seems to be some zope legacy , I puke every time i see the ZCML or the template language from plone or the zopedb and it's orm”
Traversal and other Zope concepts can be used or not.
Pyramid doesn't hate Zope, but Pyramid is not Zope. </li></ul>
“ The first impression was, that the whole documentation is very complete, but quite abstract ” “ Pyramid is well documented...it has a lot of coverage, but the editing and organization is still quite lacking.” “ I think the problem currently is that people start by going into the main documentation, and then get overwhelmed .”
Pyramid Documentation <ul><li>We are proud of Pyramid's extensive documentation (around 700 printed pages and counting).
Opinionated Pyramids <ul><li>Khufu, by Rocky Burt https://github.com/serverzen/khufu_opinion
Akhet, by Mike Orr https://bitbucket.org/sluggo/akhet
Stay tuned for contributions from TurboGears' team
Other opinionated packages will turn up in due time </li></ul>
“ Pyramid or Pylons” “ for someone unfamiliar with either of them, which one, Pyramid or Pylons, would be the best one to begin learning and creating projects with?” “ do you all suggest starting with Pyramids ? Or shall I wait for some more months ?”
New project: Pyramid or Pylons? <ul><li>Pyramid.
Although it's 1.0, remember it existed as repoze.bfg for some years.
If you need to migrate from a Pylons project, you can use both at the same time.
If you are very familiar with Pylons and are unsure how to use Pyramid, we are working on ways to help you </li></ul>
“ I would like to move from Pylons 1.0 to Pyramid, but I'm not going to be able manage a wholesale port any time soon. So, I'm wondering if it would be practical to start using some parts of Pyramid within an existing Pylons project.”
From webob.exc import NotFound class LegacyView(object): def __init__(self, app): self.app = app # app is the legacy Pylons app def __call__(self, request): return request.get_response(self.app) if __name__ == '__main__': pylonsapp = ... obtain pylons WSGI application object ... legacy_view = LegacyView(pylonsapp) config = Configurator() config.add_view(context=NotFound, view=legacy_view) Running a Pylons application “inside” a Pyramid application
"The Pyramid manual is overwhelming." "How to migrate from Pylons" "What's the equivalent of Pylons ``h``?" "How do I port my Pylons controllers to Pyramid?"
Akhet <ul><li>Pyramid application templates inspired by Pylons 1 style.
“ Traversal seems more powerful than URL dispatch even though I can't fully yet appreciate/comprehend using traversal” “ The traversal approach from the documentation sounded interesting...I took a look...and had no clue how the different pages were addressed” “ Why provide two ways of doing the same thing?”
What is traversal <ul><li>Think of it as serving an old (really old) style web application.
We serve files from a path, '/get/some/file.html'
Some actions may depend on extensions (.cgi, .php, etc.) </li></ul>
What is Traversal (II) <ul><li>But instead of serving files, we serve python objects (resources).
The object (resource) that traversal finds is called the context.
A resource can have several views which are looked up in a registry.
Rob Miller explained this so perfectly in a blog post that it was added to the docs: http://docs.pylonsproject.org/projects/pyramid/1.0/narr/muchadoabouttraversal.html </li></ul>
When to use traversal <ul><li>Your URL tree is deeply nested or can't be known in advance.
You want an easy way to set row level security. </li></ul>
When to not use traversal <ul><li>You are writing your first Pyramid app and you come from Pylons, Django, etc.