Actually, I'm not sure that logic does follow.  Obviously the
Component suffix is (sanely) not used, but plenty of others are.

The 'TaskGroupTask' does actually capture something extra and the
'Task' suffix is certainly not without precedent.  In fact, as far as
I can see, TaskGroup and TaskSequence are actually the only named
subclasses of Task that *do not* have the 'Task' suffix.

(IOTask, LoadTask, LoadDataTask, RefreshFileListTask, SampleTask &
SleepTask x 2)
(DeleteQuery, GetQuery, PostQuery & PutQuery are all subclasses of
org.apache.pivot.web.Query so understandably have the 'Query' suffix
instead.)


TaskGroup implements a Group<Task> and extends Task, but its name
doesn't reflect that it is a Task, perhaps just because the word
'Task' would be included twice.

ButtonGroup is a Group<Button> so by the same logic, TaskGroup is fine
for Group<Task>, but it just seems to (choose to) forget about the
Task part.

What if TaskGroup had a companion class that also extended Task and
implemented Group<Runnable>?  It might wrap each Runnable in a Task
and delegate to TaskGroup for execution.  (Kind of a parallel Runnable
-> Task adapter).

Should that be named RunnableGroup or RunnableGroupTask?


This is not a big deal, but the more I think about it, the more I
think it might have saved me a lot of time (and maybe even the thread)
if these classes did have the 'Task' suffix,


On 28 July 2011 00:20, Greg Brown <gk_br...@verizon.net> wrote:
> By that logic, we'd need to qualify every class in the frame work. E.g. we 
> wouldn't just have a "Button", we'd have a "ButtonComponent". That is 
> obviously overkill, and I think it would be overkill here as well.
>
> On Jul 27, 2011, at 1:11 PM, Chris Bartlett wrote:
>
>> On 27 July 2011 23:43, Greg Brown <gk_br...@verizon.net> wrote:
>>>> I suppose I saw it as a ParallelTaskExecutor or TaskGroupExecutor, and
>>>> not a ParallelTask or TaskGroupTask.  This is probably where the
>>>> initial confusion came from.
>>>
>>> I can understand that. OTOH, TaskGroupTask (or ParallelTaskGroupTask) is 
>>> sort of verbose and arguably redundant, and as you noted, once you 
>>> recognize that TaskGroup and TaskSequence extend Task, the existing 
>>> behavior makes more sense.
>>>
>>
>> (I was/am not pushing to change the names - just explaining how I came
>> to the conclusions I did)
>>
>> Long, but I wouldn't say verbose.  Especially in the world of (pre
>> 1.7) java generics!
>>
>> The name 'TaskGroupTask' captures something that is lost when the last
>> 'Task' is removed.  That information is obviously available in the
>> javadocs themselves, source code or your IDE of choice, but it clearly
>> passed me by.  Arguably, a total lack of javadocs might have helped me
>> pick up on the fact that it is just a Task.
>>
>> While TaskGroupTask initially looks redundant, I think it is easily
>> justifiable simply because it is a Task that does something with a
>> Group of Tasks (which in Pivot would be called a TaskGroup)
>>
>> GroupedTask is shorter and makes it clear that it is a Task but loses
>> something along the way.  What is it that is grouped?
>> GroupedTasksTask is just hideous ;)
>
>

Reply via email to