Re: Operation options (filtering, sorting and more)



On Tue, 2011-03-15 at 16:43 +0100, Iago Toral Quiroga wrote:
> Yes, I think Juan made a good point about this in another e-mail.
> Let's
> merge flags, skip and count in the options then.
> 


One things that concerns me is about this merging of lot of things in
the same GrlOptions: seems we are adding a lot of API in there to handle
lot of unrelated stuff.

And I feel it worse if in future new options appears.

One approach to minimize this feeling could be splitting the options in
related stuff.

That is, for instance, having a GrlOptionsSort object/structure with the
api related to do sorting, and having GrlOptionsFilter with the api to
handle filtering.

Both might inherit from a parent GrlOptions, and even this GrlOptions
could be an aggregation of different options: source would get a
GrlOptions element, and it could extract from it the GrlOptionsFilter
and the GrlOptionsSort to do the job.

This means that we could extend the options in future with new choices,
keeping them separated and not having a big blob of choices.


	J.A.




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]