On Thu, 2010-12-16 at 23:57 -0500, Mark Ramm wrote: > So, I will confess to being the one who asked for this change, and > while I'm definitely open to other options, I think resource is a good > term for items in the graph. The graph itself I'm not sure what to > call, but I think model is confusing because it is too easy to confuse > with a "domain model" or ORM model. > > The overloading problem should be taken seriously because most folks > coming to Pyramid from other python web frameworks, including > TurboGears, Pylons, Django, and most of the "newish" frameworks will > have very different ideas of how the "model" works and will > immediately get confused. And that's a terrible way to attract new > users ;) > > But it's worse than just overloading -- I think "model" is confusing, > as is "context" specifically because those terms aren't descriptive > of what's happening. > > The main reason behind me asking Chris about this is that I can > imagine writing a simple explanation of the "traversal" model which > makes sense to a variety of TG, Zope, and even Django users. > > It would go something like this: > > Pyramid dispatch is based on a two phase system. > > The first phase is called Resource Location, and in it we use the URL > (Universal Resource Locator) to find a resource. This is done by > taking items from the path, and looking them up in a set of nested > dictionaries called the ResourceTree. You can think of this as > looking up files and directories in a file system. You just walk > down the path elements until you get a file. That becomes the > "resource" that we then publish. > > Which, naturally brings us to the second phase which we call "Resource > Publication" uses additional information about the request (request > method, etc) and the resource to lookup a view callable, and call it, > passing in the resource we just found.
FTR, I dearly love the simplicity of this explanation. - C -- You received this message because you are subscribed to the Google Groups "pylons-devel" group. To post to this group, send email to pylons-de...@googlegroups.com. To unsubscribe from this group, send email to pylons-devel+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/pylons-devel?hl=en.