Posts

Showing posts from 2009

Ant Basic

Ant Basic Ant (originally an acronym for Another Neat Tool), is a build tool with special support for the Java programming language but can be used for just about everything. Ant is platform-independent; it is written purely in Java. Ant is particularly good at automating complicated repetitive tasks and thus is well suited for automating Ant Installation Configuration for Windows Environment 1. Download latest binary zip from http://jakarta.apache.org/ant/. 2. Unzip Binary in any folder, in my end it unzip on c:\ E.g. C:\apache-ant-1.7.0 3. Setting Environment variable: Right Click on My Computer ->Properties->Advanced tab->Environment variable->Create User variable Variable Value ANT_HOME C:\apache-ant-1.7.0 Path %JAVA_HOME%\bin; %ANT_HOME%\bin; %ANT_HOME%\lib; 4. on command-line type c:\ant to verify proper configuration Working with Ant For typical Java Project building By Ant script 1. To create test project here is common folder and file

Groovy On Grails setup on windows

Groo vy On Grails Configuration for Windows Environment => Download Java SE Development Kit (JDK 1.4.x or more ) installer for windows ( http://java.sun.com/javase/downloads/index.jsp ) => Download Latest Version Groovy 1.5.x( http://groovy.codehaus.org ) Binary Zip. => Download Latest Version Grails 1.1.x( http://www.grails.org ) Binary Zip. => Install JDK => Unzip Binary in any folder, in my end it unzip on c:\installation. Eg. c:\installation\groovy1.5.x c:\installation\grails1.1.x c:\ Program Files\Java \ jdk1.5.9 =>Set Environment variable for Groovy on Grails and Java Right Click on My Computer ->Properties->Advanced tab->Environment variable Create User variable Variable Value JAVA_HOME

Groovy

Image
* Scripting / Agile Dynamic Language for JVM * Features inspired from Python, Ruby. * Syntax very close to Java and Same OO model as Java * Seamless integration with all existing Java classes and libraries. * Groovy code Compiles to Java bytecode. * Can run on .Net 2.0 using IKVM * Latest version 1.6 * http://groovy.codehaus.org Groovy Basic 1. Closures 2. Dynamic Methods 3. List & Maps 4. Better XML/Swing Capabilities 5. Permits operator Overloading 6. GString: interpolated String 1. Closure : => Closures are reusable blocks of code => One or more program statements enclosed in curly brackets “{}” => Closures do not require a class or a method name => Can be passed around like variables => The statements within a closure are not executed until the call() is made => Return is using an explicit return statement or the value of the last executed statement. => E.g. square = { it * it } //“it” implicit parameter representing the passed value. square (4) // Output =