On Fri, Feb 12, 2010 at 1:49 AM, steve <[email protected]> wrote:
> i am confused about the terminology between plugins vs wsgi middleware > vs components vs extensions. the discussions and documentation varies > between tg1 and tg2, so please advise on which term i should google to > achieve what i am trying to do. > Here's what I understand, though keep in mind this is tg2.x knowledge only. I have no idea if any of what I say applies to tg1. plugins/components/extensions are, more or less, the same thing. Reusable pieces of code that do a specific job, and are meant to be a part of your application in some fashion. Depending on how they are written, they may be easily replaceable (plugins), they may be small pieces of reusable code (components, like CrudRestController), or they may be significant additions (extensions like tgext.admin). WSGI middleware, though, is a completely different beast. Middleware is used to wrap around the entire request in some fashion. When pieces of middleware are stacked together, they wind up providing various layers around the request. For instance, in TG2.x, we have the database middleware. It wraps around several other layers, and provides automatic commit/rollback (if an exception occurs in one of the wrapped layers, rollback, otherwise commit). For middleware and TG2.x, I have to *highly* recommend this page as I feel it is the single most important page of documentation we have. Reading it taught me more about the way that TG works that anything else I've read. The page is http://www.turbogears.org/2.1/docs/main/RequestFlow.html I hope this was able to provide some help, at least. -- Michael J. Pedersen My IM IDs: Jabber/[email protected], ICQ/103345809, AIM/pedermj022171 Yahoo/pedermj2002, MSN/[email protected] -- You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/turbogears?hl=en.

