> 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.
Well, I think 2 works reasonably well for adding components to the controller tree, but it would be nice to be able to combine that with an __init__ that that registers the models needed by that class, and does whatever setup is needed for that "component" to be useful. And template overides can be handled by genshi search paths, but that's not a very intuitive model. None of that requires anything special to be added to TG2, but it's also all a little bit complicated to do -- so we would need to have some very good tutorials on making reusable site components if we decide to just go that route. I think 3 is a very interesting path -- and I think some of that has been proposed as part of the CMS GSoC proposal. I think that creating something along those lines might make creating reusable components significantly easier. Of course the paster-template approach is the easiest for end-users to understand, but it tends to fall down if there's a patch for a security hole in component reused that way. This could be mitigated by saving the "pre user modification" version of the template off somewhere -- and providing another tool which does 3 way merge. Even then we'll need some way to handle adding new model information, since we probably don't want to modify the models.py file directly.... --Mark Ramm --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
