incubator-blur-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Williams <william...@gmail.com>
Subject Re: Blur Platform Argument Passing
Date Thu, 25 Sep 2014 13:31:41 GMT
On Thu, Sep 25, 2014 at 9:06 AM, Aaron McCurry <amccurry@gmail.com> wrote:
> Currently the Blur commands use arguments passed to them via an Object
> called Args which is really just a Map that is not typed.  Then it is on
> the command implementor to get the arguments they need out of the Args
> object and validate that they have what they need.  Currently this works
> but I think it has a few drawbacks.
>
> 1. Argument checking is done by the implementor.  I feel like the command
> architecture should handle the check.
>
> 2. The argument checks are likely performed at the shard servers and so an
> invalid argument is likely going to produce a lot of exceptions.
>
> 3. Understanding what arguments are available, what there names are, what
> the type is, etc. is currently done through annotations on the class.  So
> it is on the implementor to to keep them up to date.  This feels wrong.
>
> I prepose that we change the argument passing in the commands from the this
> Args object to bean properties.  We can annotate the optional parameters,
> use javadocs to provide documentation for the arguments, etc.

I totally agree that the Args doesn't feel quite right and it allows
for really late failures.  Unfortunately, I'm not sure what you mean
by "bean properties" as a solution?  A real bean would be too
inflexible it seems, can you give some more clues how it would work?
I'm sure I'll get it with just one more hint:)

Thanks,
--tim

Mime
View raw message