On Dec 21, 2009, at 6:29 PM, Markus Roberts wrote: > Although I will mention a third area of frustration that I don't think > you're addressing in this pass: I feel like it's simultaneously too > coupled into the payload classes and yet needlessly shoehorns things > into a one-size fits all interaction model.
I completely agree, I just don't really know what to do about it. One thing I think is a good idea is to just make the whole thing less magical -- make it really easy to find a given repository and interact with it, rather than the current system where we try to rely entirely on default and caching routes. That's more of a mental shift than any real coding shift, but it's a start. I think the repository classes are much less coupled to the routed classes than it appears - in most cases they're stub subclasses that only exist because of our crappy repository registration system. About the only idea I have to replace this is to only allow generic repository types -- file, rest, etc. -- and then have some mechanism for declaring when a given repository type only works with a given class (e.g., the 'compiler' type with 'catalog'). I think that'll be just as hackish but a lot less rigid. > I'd rather something that was both more generic (e.g. something you > could at least in principle just drop in to another project and use) > and less constraining (so you could forward arbitrary methods, etc.). Hmm. I'm actually pretty confident that the whole thing *could* be dropped into another project and used, barring relatively simple things. That is, all of the per-class repository classes would be removed and replaced with equivalent subclasses from the new project, but that's about it. Double hmm. Maybe we just require that each routed class register which repositories work with it? E.g., class Catalog extends RouteManager routes :catalog supports_repositorys :compiler, :rest, :file ... end ? > The reason is, it would be easier to ignore such a beast in your > reasoning about the system. > > But that may just be me. > > -- Markus > > P.S. To make what I'm thinking about work, you might need to actually > have multiple composable utilities (a caching system, an PRC alike, a > repository system, etc.) > > 2009/12/21 Markus Roberts <[email protected]>: >>> Anyone have any complaints if I rename the 'indirector' class to >>> 'router'? >> >> I've been going back and forth about this, and finally figured I >> ought to reply. >> >> Yes and no. >> >> I think my main problem with the indirector isn't the name, it's >> the concept. And just as I start to type this, lo, a new message >> from Luke addressing two of the areas that I was about to whine >> about. >> >> So I'll go with "no objection." >> >> -- Markus >> >> ----------------------------------------------------------- >> Irony is the hygiene of the mind.—Elizabeth >> Bibesco >> ------------------------------------------------------------ >> >> > > > > -- > ----------------------------------------------------------- > The power of accurate observation is > commonly called cynicism by those > who have not got it. ~George Bernard Shaw > ------------------------------------------------------------ > > -- > > You received this message because you are subscribed to the Google > Groups "Puppet Developers" 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/puppet-dev?hl=en > . > > -- "They called me mad, and I called them mad, and damn them, they outvoted me." -- Nathaniel Lee, on being consigned to a mental institution, circa 17th c. --------------------------------------------------------------------- Luke Kanies -|- http://reductivelabs.com -|- +1(615)594-8199 -- You received this message because you are subscribed to the Google Groups "Puppet Developers" 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/puppet-dev?hl=en.
