I prefer separate types and providers - even if there is only going to be one provider. I like the separation of model and logic and I think it makes it easier to test and debut. That is a preference though and if you think that's too tricky we can discuss.
On 20/11/2008, at 9:44 AM, Luke Kanies <[EMAIL PROTECTED]> wrote: > > On Nov 19, 2008, at 1:53 PM, Nigel Kersten wrote: >> [...] >> >> Anyway, I'm unsure whether I should be doing a provider for this. I >> can't think of a generic enough term for what this sort of thing is >> that is likely to require different providers for different >> platforms. >> >> If this is something that is always going to be Mac specific, is >> there >> a problem with doing it all as a Type and not having a Provider at >> all? >> >> Is there some benefit other than platform difference abstraction to >> having a Provider? > > > This is something I've wrestled with, too. > > What I would say is that there are good code separation reasons to > create a provider. You are essentially splitting your code into two > bits: The model and the implementation. I think it's easier to > maintain this code, but it's about 100x easier to test it when it's > split this way. > > I'm not going to say I wouldn't accept the patch (esp. since it's > James's decision), but I'd recommend a provider. I would say that > it's perfectly fine to have the provider in the same file as the type > if you never plan on having more than one provider. > > -- > Happiness is not achieved by the conscious pursuit of happiness; it is > generally the by-product of other activities. -- Aldous Huxley > --------------------------------------------------------------------- > Luke Kanies | http://reductivelabs.com | http://madstop.com > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
