You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Robert Mark Bram <re...@optusnet.com.au> on 2004/07/19 15:26:17 UTC

Ant: pros and cons!

Hi All,

I am writing an intro for ANT and I want to justify why it is such a  
useful tool.

Some may find the statements below provocative: they are meant to be. I  
want to find out if and/or why they are untrue. This is a learning process  
for me too!

Pro:
  - Ant is a Java based build tool. Like java, it is platform independent.
  - It has a large variety of common tasks already catered for.
  - It is extensible: not that hard to create your own tasks.

Cons:
  - It is not as powerful as batch/shell scripts. If you are not regularly  
using different OS's, why bother?
  - It is not designed to offer decision or looping structures as easily as  
they are offered in batch/shell scripts? Why?


Do you have any pros/cons to add? Any thoughts on what I have listed?
Any comments would be most appreciated!

Rob
:)


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Ant: pros and cons!

Posted by Nicolas Mailhot <Ni...@laPoste.net>.
On mar, 2004-07-20 at 09:56 +0200, Johan Vromans CPWR wrote:

> The Ant design team has always stated that they wanted the Ant control language 
> to be descriptive, and not a scripting (or programming) language. And failed. If 
> you have variables (properties) and conditions (if="propname") you have a 
> programming language. So you better go for a real programming language. The 
> current situation is that we have the worst of all: it's not a programming 
> language, it's not a scripting language, it's not even XML anymore.

The way dependency lists are put inside a text array in an attribute
never was XML-ish (better use several depend children). Or the use of
flat-text property files (though pure XML is gaining ground).

Anyway, a lot of the shortfalls of ant syntax disappear when you couple
it to some xslt processing, but then you get bitten by the parts that
look like XML but aren't really (which can be workarounded without too
much effort, but is a PITA nevertheless).

Cheers,

-- 
Nicolas Mailhot

Re: Ant: pros and cons!

Posted by roger day <ro...@gmail.com>.
Maybe you should look at XSLT - that is XML and is (almost and in some
cases is) a functional language.

One of the original aims for XML was that it should be hand-craftable
as well as being used for data exchange. If only I had that link
handy...

I'm with you on the last paragraph if only for a seperation of
concerns. People who write and maintain distribution configurations
are a different set to those who write build tools. In fact, I'm in
the process of writing such a language - in XML - which I've partially
described in another email to this thread. Unfortunately it's an
internal project.

Roger.

On Tue, 20 Jul 2004 09:56:17 +0200, Johan Vromans CPWR
<jo...@nl.compuware.com> wrote:
> > Pro:
> >  - Ant is a Java based build tool. Like java, it is platform independent.
> 
> Despite popular belief (or marketing hype, just a way of looking at it) Java is
> not platform independent. There are Java implementations for selected platforms,
> and if you are fortunate enough to run a well supported platform it _seems_ like
> platform independent. But Java's level of abstraction is just too high, and many
> serious applications need to resort to native code, breaking the whole 'write
> once, run everywhere' idea.
> 
> > Cons:
> >  - It is not as powerful as batch/shell scripts. If you are not
> > regularly  using different OS's, why bother?
> >  - It is not designed to offer decision or looping structures as easily
> > as  they are offered in batch/shell scripts? Why?
> 
> The Ant design team has always stated that they wanted the Ant control language
> to be descriptive, and not a scripting (or programming) language. And failed. If
> you have variables (properties) and conditions (if="propname") you have a
> programming language. So you better go for a real programming language. The
> current situation is that we have the worst of all: it's not a programming
> language, it's not a scripting language, it's not even XML anymore.
> 
> Besides, XML is designed for computers to exchange information in a well-defined
> manner. It should not be hand-crafted.
> 
> I think Ant could be made (more) useful/succesful with a high-level build
> description language _intended for human production_, in particular when
> combined with a nice GUI tool.
> 
> -- Johan
> 
> The above statements and opinions are strictly my own, and do not necessarily
> represent the views of Compuware.
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 


-- 
http://www.badstep.net

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Ant: pros and cons!

Posted by Johan Vromans CPWR <jo...@nl.compuware.com>.
> Pro:
>  - Ant is a Java based build tool. Like java, it is platform independent.

Despite popular belief (or marketing hype, just a way of looking at it) Java is 
not platform independent. There are Java implementations for selected platforms, 
and if you are fortunate enough to run a well supported platform it _seems_ like 
platform independent. But Java's level of abstraction is just too high, and many 
serious applications need to resort to native code, breaking the whole 'write 
once, run everywhere' idea.

> Cons:
>  - It is not as powerful as batch/shell scripts. If you are not 
> regularly  using different OS's, why bother?
>  - It is not designed to offer decision or looping structures as easily 
> as  they are offered in batch/shell scripts? Why?

The Ant design team has always stated that they wanted the Ant control language 
to be descriptive, and not a scripting (or programming) language. And failed. If 
you have variables (properties) and conditions (if="propname") you have a 
programming language. So you better go for a real programming language. The 
current situation is that we have the worst of all: it's not a programming 
language, it's not a scripting language, it's not even XML anymore.

Besides, XML is designed for computers to exchange information in a well-defined 
manner. It should not be hand-crafted.

I think Ant could be made (more) useful/succesful with a high-level build 
description language _intended for human production_, in particular when 
combined with a nice GUI tool.

-- Johan

The above statements and opinions are strictly my own, and do not necessarily 
represent the views of Compuware.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Ant: pros and cons!

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
Robert Mark Bram wrote:
> Hi All,
> 
> I am writing an intro for ANT and I want to justify why it is such a  
> useful tool.
> 
> Some may find the statements below provocative: they are meant to be. I  
> want to find out if and/or why they are untrue. This is a learning 
> process  for me too!
> 
> Pro:
>  - Ant is a Java based build tool. Like java, it is platform independent.

Ant allows you to construct platform independent build files and 
provides a lot of tasks for common operations. However an Ant script is 
not guaranteed to be platform independent. You can easily exec platform 
specific commands and some task sets may only work on specific platforms.

>  - It has a large variety of common tasks already catered for.
>  - It is extensible: not that hard to create your own tasks.
> 
> Cons:
>  - It is not as powerful as batch/shell scripts. If you are not 
> regularly  using different OS's, why bother?

That is not really true. Ant gives your build process structure and 
repeatability. Setting up targets for the large scale operations and 
then linking those with the depends attribute helps to describe the 
structure of your build process. Yes, you need to compile before you 
create the jar. This is not so easy in batch files.

Ant tasks embody a lot of code. To reproduce that sort of processing in 
a batch file would require a large batch file. Batch files for a large 
build are going to be very complex and not really standardized. So new 
people coming into a team are going to have a hard time understanding 
what is going on. IMHO, Ant scripts are easier to understand and 
hopefully all of the developers on a team, old and new, can grasp what 
the build does and how it does it. Having just one overworked build guy 
understand it all isn't great when he or she decides to move on.

>  - It is not designed to offer decision or looping structures as easily 
> as  they are offered in batch/shell scripts? Why?

The idea is to move that sort of processing into tasks where it is more 
easily handled. Sort of an encouragement to do the job with the right 
tool. Coding decisions and loops in Java is easier than doing it in XML.

Ant's core does support these sort of tasks, however, if you really need 
them - check out ant-contrib or antelope for some looping style tasks. 
Part of the extensibility capabilities.

Conor

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org