[dev] Re: whups: Batch changes on tickets
Auke Bruinsma
air2 at dds.nl
Thu Apr 14 05:37:48 PDT 2005
Jan Schneider wrote:
>>>Ah, no, I don't think this is necessary. We should stick to either concept.
>>>
>>>
>>Well that disables the use like this:
>>Batch::Move ($newlocation, $tickets);
>>and this use:
>>$obj = new Batch ($tickets);
>>$obj->Move ($newlocation);
>>$obj->State ($newstate);
>>
>>Or is it not right to use this Batch class in both ways.
>>
>>
>
>I would consider this bad design. In PHP 5 this wouldn't even be
>possible because a method can only be static *or* non-static.
>
>Jan.
>
Well if thats true, and I absolutely don't doubt about that. its bad to
implement it that way. I should be PHP5 prepared. So than the method to
give the ticket array at construction time is preferable. Also an
set/get should be implemented.
Maybe.. (an other thought...) the query / quick search should not
generate an array of tickets, but just the Batch object. The batch
object should be ecquiped (ehm how to write that word :S) with
functionality to add and remove tickets from it. So that Batch object
actually is a batch of tickets and you can preform actions on it... Some
kind of array wrapper. I personaly think that that makes more sense. But
that means a little bigger change (not huge) to the horde system.
Despite the little bigger changes to the horde system it provides easier
implementation of supporting both quick search and queries. Because its
now the result is the same (a Batch).
Than a new tab /link should be made: Edit Batch. this opens just the
Batch page (generated by the Batch_Gui) and this page provides different
operations... indepentently of the page where they are called from. So
even new kind of things that generate batch results can easily support
batch opperations.
The change to the horde system would be that where now arrays of tickets
are accesed the Batch object must be accessed. I think this approach is
much more transparent... altough that depends on the current design
dessions made for whups. I am thinking of filtering done in the Batch
class (could be easily implemented later on) so filtering can be done at
any (batch) list of tickets...
Auke
More information about the dev
mailing list