On Apr 1, 12:34 am, "Mark Ramm" <[EMAIL PROTECTED]> wrote: > Here's another GSoC idea. > > Currently TG2 has no infrastructure for re-usable site components > (like django apps), I think it would be good to create something along > those lines, and build up the infrastructure around the requirements > of a common use case a user-registration component. > > This component would make use of turbomail, a capcha widget, and > perhaps some other basic TG stuff. It would be composed of a set of > controller methods, templates, and some database model information. > We would need a standard way to "mount" the component in an app, and > to configure various internal components. The Django way to do this > is to just paste the code into your project, but that has some > downsides for reusability. Ben Bangert suggested a 3 way merge > algorythm to help keep pasted-in-apps up to date with the upstream > server. But it may be possible to provide a simple extension/overide > mechanism that removes the need to paste stuff into the user's > project.
I think most of this has already been done in the 'registration' module already (albeit using Kid and TG widgets). It takes the template approach and shoves (nearly) all of the code in your app. It's nice for customization, not so nice for updates or reuse in other projects. When you say 'a simple extension/override mechanism', what do you have in mind? I've thought a bit about it, and my ideas are 1) Define the workflow (probably just documentation), and have an entrypoint that would implement each step of the workflow. 2) Plain old subclassing. 3) 'Something else'. Basically, a 'workflow unit' (I'm not sure I want to use the word package) that defines what model(s) it needs, does normal controller stuff (getting data from the database, receive form data entry, decision making), and some way to indicate that it had finished (and a status code). There would need to be a workflow supervisor where you define workflow units and their interaction, including any conditional logic. I don't know that I like any of these ideas terribly well, but I'd be interested in exploring 3 in more detail if anyone else thought it had some promise. (not as GSOC participant, just a normal developer or mentor if someone was interested). --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears Trunk" 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-trunk?hl=en -~----------~----~----~----~------~----~------~--~---
