How To Use Ant

Ant is a build tool written in Java, intended to be used for Java build processes. Ant is used for building small and large projects as well. You can use ant not only for automation of building Java projects, but for automating any complicated and repetitive tasks. Ant is using xml files to define tasks [...]

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

There is a pretty common situation to use a java classes generator and to create classes based on a defined pattern. Hibernate, Castor, Jaxb are a few examples. I prefer to have those classes packed in a separate jar file. Since they are generated files it’s not a good practice to modify them, so there [...]

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Java or .NET languages does not allow multiple inheritance and usually we don’t need multiple inheritance in our projects. However there are cases when inheriting from multiple classes is a necessity. There are a few tricks we can apply in order to be able to get what multiple inheritance gives us in the languages where [...]

1 Star2 Stars3 Stars4 Stars5 Stars (4 votes, average: 4.75 out of 5)
Loading ... Loading ...

A marker interface is a design pattern consisting in an interface with no methods declared. All the classes implementing this interface don’t have to implement a method for the interface(since it doesn’t have an interface), but we can say that the classes implementing the interfaces are marked. For example in Java we have the Serializable [...]

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

How to Create Jar Files from Ant

Lets take this time in consideration a real life project. Most of the time Ant is used to compile and build java projects. This means generating, compiling and building jar files. For this we are going to define severals tasks. Lets consider the we create a buid.xml file in the directory where sources are located. [...]

1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 5 out of 5)
Loading ... Loading ...

XPath Tutorials

There are plenty of resources regarding XPath Expressions. I’m using the following links when I need to use XPath: http://www.stylusstudio.com/xsllist/200404/post90920.html http://www.tizag.com/xmlTutorial/xpathbar.php http://www.stylusstudio.com/docs/v60/d_xpath34.html

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

This is the ant task I’m using to generate POJO and mapping files from a DB Schema (mysql).

1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 5 out of 5)
Loading ... Loading ...

JAXB Castor Comparison

I was looking recently for some java framework to save some objects in xml files. Until now I’ve tested from a noob perspective 2 frameworks: JAXB and Castor. Don’t get misleaded by my judgment because I didn’t use any of them very deep. I was playing with JAXB some time ago and at that time [...]

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

What is Factory Pattern? Factory Pattern is a creational design pattern. It is responsible for creating instances of objects without using directly the object constructor. For this reason Factory Pattern is widely used in frameworks, to encapsulate the logic of creating the objects and to make the framework independent of the objects it needs to [...]

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...