ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jose Alberto Fernandez <JFernan...@viquity.com>
Subject RE: From attributes to elements and other concerns
Date Mon, 27 Nov 2000 20:33:13 GMT
> From: Peter Donald [mailto:donaldp@apache.org]
> 
> At 07:10  22/11/00 -0800, you wrote:
> >Interesting info. In all seriousness (I'm not being smug), 
> why do you think
> >"they" think that 
> >
> >      More Elements -> Harder
> >but
> >      More Attributes -> Easier
> >
> >? Is is a visual layout issue (clumping related information close
> >together), or is it the difficulty of understanding 
> hierarchical data? As a
> >non-non-technical person, I actually find the nested 
> elements approach much
> >easier to read. But as has been pointed out here, there has 
> been a goal
> >stated at some point that Ant should be accessible to 
> non-techies as well
> >as techies.
> 
> I think it is the level of abstraction. The more 
> abstract/generic the tasks
> become the more they tend to have sub-elements. The more 
> abstract the task
> is then the more difficult it is to understand.
> 
> The main thing they complained about was directory copying. ie Compare
> 
> <copydir src"foo" dest="bar" />
> 
> and
> 
> <copy todir="bar">
>   <fileset dir="foo" />
> </copy>
> 
> 
> The 1st one is much more readable but less "extendable". With 
> second you
> can do all sorts of fancy fileset operations and maybe do 
> file mapping in
> future (or now ???). In this case I actually prefer the first 
> case but in
> most cases I prefer the deeper elements approach. Anyways something to
> think about ;)
> 

Maybe the problem is that we have been too militant about having only one
way
to do anything. Militant to the point of user unfriendlyness.

We could provide some common shortcuts for easy use. Ideally I would like
them to be defined just with a composite <taskdef> declaration, but if not
possible then allow for some extra java code.

 <taskdef name="copydir" attributes="src,dest" >
   <copy todir="${copydir.dest}" >
     <fileset dir="${copydir.src} />
   </copy>
 </taskdef>
 ...
 <copydir src="foo" dest="bar" />

Maybe we should call this an <aliasdef> instead of a real <taskdef>.
Oh, I keep on dreaming....

Jose Alberto
 

Mime
View raw message