I had a little bout of embarrassment driven development this evening when trying to document the config system of tg2, and the TG2 configuration system has been largely revamped.
I was trying to document the interactions between the envinronment and middleware factories, the base_config object and the .ini files and I reallized that I don't want to have to expain anything that complicated. And at the same time a couple of the people who are actually using TG2 in real projects ran up against limitations of the existing system that were not so nice to work around. There are several constraints that we have to work within: 1) We need to be compatable with pylons, so all the pylons tools like paster shell still work 2) We need to work with entry points and the standard paster wsgi system 3) We need have something that allows for one TG2 app to live inside of another I think the new system fullfils these goals, and is reasonably easy to use and understand. I'm hoping to finalize it and write a few docs this evening, but basically rather than having config stuff spread our across three modules inside of tg, everything is now encased in an AppConfig class, which stores declarative data about the configuration, sets up sane defaults where possible, and provides factories for the two key pylons functions load_environment and make_app. Both load_environment and make_app are broken into pieces which can be overridden at config object instantiation time, or subclassed (for people who are instantiating lots of similar TG apps). I'm not totally happy with it (AppConfig is a bigger class than I'd like) but I think that it's a pretty good comprimize between flexibility and ease of use, and I'm not embarased to document it any more. Anyway, feel free to take a look and let me know what you think: http://paste.turbogears.org/paste/3221 -- Mark Ramm-Christensen email: mark at compoundthinking dot com blog: www.compoundthinking.com/blog --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
