ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jose Alberto Fernandez <j_a_fernan...@yahoo.com>
Subject Re: Tasks, DataTypes and Factories
Date Wed, 06 Mar 2002 17:29:38 GMT
The only problem with what you are proposing is that
data-types do not need to extend DataType and hence
they are not necessarily ProjectConponents.

This was the first thing I had to work around when
looking at the use of Roles for data-types.

Jose Alberto

 --- costinm@covalent.net wrote: > At this moment,
there are 2 major differences
> between task/datatype:
> 
> 1. Datatypes are allowed at top level. Only 3 tasks
> are allowed ( by 
> hardcoding their names in ProjectHelperImpl ).
> 2. Tasks have an execute method that is called.
> Datatypes don't.
> ( however filters do have a special method, and it
> is possible other 
> datatypes will have some other 'active' method ).
> 
> Both Task and DataTypes extend from
> ProjectComponent. Tasks have 
> a mechanism to allow regular beans ( not extending
> Task ) to be 
> used. 
> 
> Tasks and DataTypes are registered using a name and
> a Class, and 
> are created using newInstance() by some code in
> Project.
> 
> What I'm trying to do:
> 1. Create a mechanism to allow the ProjectComponent
> creation to be
> delegated to an optional factory (
> ProjectComponentHelper ).
>  The optional factory may use more advanced logic to
> locate
>  and create the tasks. This will make things like
> <antlib> implementable 
> without changes in the core.
> 
> 2. Allow the use of optional namespaces in tasks. We
> already have 
> too many tasks in the default namespace, some
> grouping would
> improve the readability and maintainability. Of
> course, all 
>  existing tasks will continue to work without
> namespaces.
> This require a new method in Project:
> createComponent() that
> will take a namespace and a tag name. 
> 
> 3. Make the 'top level tasks' more flexible. I would
> prefer
> allowing all tasks at top level, but anything better
> than
> 3 hardcoded tasks is ok.
> 
> 4. Make task/datatyle creation and behavior more
> consistent
> with each other. They should use similar code for
> creation,
> adapters ( for 'external' beans not implementing ant
> interfaces).
> 
> Votes/comments please. The initial interface for
> component
> creation is checked into
> proposals/sandbox/embed/ProjectComponentHelper.
> 
> Costin
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:ant-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:ant-dev-help@jakarta.apache.org>
>  

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message