On Aug 2, 2011, at 10:01 AM, R.I.Pienaar wrote:

> 
> 
> ----- Original Message -----
>> On Tue, Aug 2, 2011 at 07:22, Ken Barber <k...@puppetlabs.com> wrote:
>>>> I think you nailed the point of complexity there: our current
>>>> language
>>>> support doesn't do what we need, and kwalify is probably the best
>>>> choice for a validation language right now.
>>>> 
>>>> My major concern around this is that separate schema and class
>>>> make it
>>>> hard for folks to keep them in sync; I know when I was doing Win32
>>>> development and we needed to maintain a separate "export" file
>>>> next to
>>>> our code, the most common failure was to forget to update that.
>>>> 
>>>> I would ideally like to see this integrated as part of typing in
>>>> the
>>>> language, so you would express constraints when you declare the
>>>> parameters to your class or define.  That would give the assurance
>>>> that both were always consistent, and have only one place to view
>>>> the
>>>> data.
>>> 
>>> Well one workaround for keeping the file in sync is to have code
>>> that
>>> does a comparison on the top level between arguments and the schema
>>> and throw an obvious error if they are not. At least then its
>>> caught
>>> at runtime.
>>> 
>>> But I do feel your sentiments ... Java went through this same
>>> exercise
>>> with CMP. In the end I believe they moved a lot of the logic to
>>> annotations inside the Java code to avoid the double file exercise.
>> 
>> *nod*  Multi-file systems seem to be long term troublesome.
> 
> Have some experience with this problem and the mcollective DDL files.
> 
> Separate files *suck*
> 
> However I kept them separate because clients like web dashboard need
> the DDL too and you would not always want to share the logic of the 
> agents with the frontend/clients/users.  Think about secure environments
> where how the agents work is sensitive information but the API they expose
> is not.
> 
> If I had a full on DSL I'd probably have made effort to be able to 
> export the DDL file from the agents but I dont so 2 files were best I
> could do.
> 
> If you can at all avoid separate files then do that.

I agree on not having separate files, and I think the rest is pretty easy - we 
already expose type/definition metadata over an API, so we'd just need to make 
sure we add this info to what we expose.

-- 
Kai's Example Dilemma:
    A good analogy is like a diagonal frog.
---------------------------------------------------------------------
Luke Kanies | http://puppetlabs.com | http://about.me/lak
Join us in PDX for PuppetConf: http://bit.ly/puppetconfsig




-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to puppet-dev@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to