Feb 16, 2008

ENUMS in Java

Some Important points about Java Enums.
  1. Enums can be declared as their own separate class, or as a class member, however they must not be declared within a method.
  2. Enums can be declared outside the class.
  3. Enums cannot be private or protected.
  4. Enums can have only default or public modifier.
  5. Semicolon at the end of Enums declaration is optional.
  6. Enum is a special type of Class.
  7. Enum constructor are never invoked directly
  8. Enum constructor can be overloaded just like any other constructor in class.
  9. If an enum is declared as public then it should be declared in its own file.
  10. Enums declared within a class can have public, private, protected, default, static and abstract modifiers

package TechnicalTutorial;

/* Enum declared outside the class can have default access only */

enum TechEnum{
FIRST, SECOND, THIRD
}

public class Example_1 {

public enum TechEnum_2{
HUNDRED, THOUSAND
}

public static void main(String[] args) {
TechEnum num = TechEnum.FIRST;
System.out.println(num);

}
}

In above example enum can be declared as public only within a Class i.e. TechEnum_2 . If an enum need to be declared as public outside the class then it should be created in separate file.

Jan 14, 2008

Book Review : Business Process Management with Jboss JBPM

Currently I am working on a project that involves jBPM as the workflow engine and jPDL as the design language. Recently I had gone through a review copy of book Business Process Management with JBoss jBPM, written by Matt Cumberlidge and published by PACKT Publishing and here is the review on the book as per terms of review copy.

The book is good introduction into the JBPM, primarily for Business Analysts and architects. For developers it is useful guide that highlights the correct approach that should be followed before implementing a BPM solution.

Things I liked about the book:

Firstly, the book actually delivers what it says: providing a good introduction into the jBPM world. It can be followed as hands on book by business analyst and beginners can follow it as a tutorial for quick start.

All the features of jPDL designer are explained step by step with properly supporting images. Images always put information more intuitively. Initial chapter of the book talk about the environment setup which includes installation of each and every software.

Book follows one example approach, linking whole software development lifecycle and how BPM fits in it, although I personally would have liked some small examples also.

Things I didn’t like about the book:

There are more than a couple of things that I didn’t like about the book. The book doesn’t dive deep into the technical aspect of the jBPM. The book is more on theoretical side with only one example explained through out the book. Some of the technical stuff related to sub process and super states was too concise. The book was not thoroughly enough for developers.

Conclusion

I would recommend this book to newbie’s who wants to learn about JBPM and BPM. From developer’s point of view it does not provide answer to actually create an enterprise level application although it is good book for beginners.

The book can found at Packt Publishing