[Freeipa-devel] validating return values in XML-RPC

John Dennis jdennis at redhat.com
Thu Oct 22 15:32:41 UTC 2009


On 10/22/2009 10:45 AM, Jason Gerard DeRose wrote:
> So I've been thinking about this as I've been doing the UI
> "tuning" (extending meta-data and making the engine smarter).  I agree
> with John that we need to describe the return values programatically.
> We can also kill two birds with one stone here because the description
> of the return values is a great way to provide some of the meta-data the
> UI needs (and the CLI... there is something in place now, but it's not
> easily plugable).
>
> I personally feel the design of the Param system has held up pretty well
> (Rob and Pavel, speak now or forever hold your peace), so I think we
> should use the Param classes to describe the return values.  This will
> really help us reduce code duplication and allow for good plugability
> because, as usual, most of our commands are CRUD operations, so we can
> generally use some auto-magic to deduce the return values from the
> corresponding Object params.
>
> Thoughts?

If you're asking if the description of the return values should be 
expressed using the same Param classes as the input values then yes I 
agree. I had pretty much expected we would reuse the Param declarations 
for the return values.

However if you're asking should the description of the return values be 
magically deduced from the input parameters then no I don't agree, I 
think both the input and output parameters should be explicitly declared 
so a programmer can look at the code and see what they are just like in 
any typed language.

-- 
John Dennis <jdennis at redhat.com>

Looking to carve out IT costs?
www.redhat.com/carveoutcosts/




More information about the Freeipa-devel mailing list