In order to get our feet wet with ANT, we were assigned 8 little katas to figure out and compile. Some took more time than others, but for the most part they were all relatively straight-forward. In order to complete these katas, we had to make various build files, which were to be done in XML(ANT uses xml files to execute commands and whatnot). Although lacking in prior experience with the language, the resources provided online, including the apache ant website and tutorials pages proved to be of great assistance in helping me to get off the ground.
There are a couple of special things about ANT that I noticed while going through the katas. Why some of these things are present in ANT I do not know, but they're just things that you're going to have to get used to. For example, properties, which can be thought of as variables, are immutable in ANT, meaning that once you've declared something, you can't change the value, which was the point of one of the katas.
Another interesting feature of ANT is dependencies, which are pretty much what targets, which can be thought of as methods, need to do in order for them to run. For example, if I had a target="foo" that had a dependency on another target="bar", denoted by depends="bar", that means that in order for "foo" to run, "bar" must first be run. Even though the code for "foo" might be written before the code for "bar", when compiled, "bar" is run first, followed by "foo". It's a pretty interesting feature of ANT.
Another thing that ANT allows you to do is to run features from JAVA from within ANT. This includes compiling java files, running java files, and even generating javadocs, all of which were some of the katas assigned. In order for ANT to be able to use the features from java, however, it's important to make sure that java is properly installed on your computer, and that all your environmental variables are inputted correctly. This proved to be a minor setback for me completing all of the katas, but eventually I was able to find the errors and fix them accordingly.
Well, that just about sums up my experiences with ANT thus far, and my impressions thus far is that it's a pretty powerful development tool to use, and if done right, it can make one's job as a software developer a lot less difficult.
No comments:
Post a Comment