Decorator Design Pattern in Java

java-thumbnail

Intent of Decorator Design Pattern: Attach additional responsibilities to an object dynamically.Decorators provide a flexible alternative to subclassing for extending functionality.[GoF,p175] Client specified embellishment of a core object by recursively wrapping it. Wrapping a gift,putting it in a box and wrapping the box. also read: Design Pattern Interview Questions Factory Design Pattern State design pattern […]

Iterator Pattern

java-thumbnail

What is Iterator Pattern? Provide a way to access the elements of the aggregate object sequentially without exposing its underlying representation. Aggregate object is an object that contains other objects for the purpose of grouping those objects as a unit.It is also called a container or a collection.Examples are linkedList,Hashtable,ArrayList etc. also read: Design Pattern […]

Abstract Factory Pattern

java-thumbnail

What is Abstract Factory Pattern? Provide an interface for creating families of related or dependent objects without specifying their concrete classes. Wikipedia says: A software design pattern, the Abstract Factory Pattern provides a way to encapsulate a group of individual factories that have a common theme. also read: Design Pattern Interview Questions Factory Design Pattern […]

Template Design Pattern

java-thumbnail

What is Template Design Pattern? An abstract class defines various methods and has one non-overridden method which calls the various methods. also read: Design Pattern Interview Questions Factory Design Pattern State design pattern Wikipedia Says: A template method defines the program skeleton of an aligorithm.The aligorithm itself is made abstract,and the subclasses override the abstract […]

JAX-WS Web Services in NetBeans 6.1

webservices-thumbnail

Java API for XML Web Services(JAX-WS) is an important part of latest JEE specification (Java EE 5 platform). In this article we will see how to develop JAX-WS based web services using NetBeans 6.1 IDE. This article will not provide any of the theoretical information about JAX-WS. Software used NetBeans 6.1 Java 5.0/6.0 GlassFish V2 […]

Closures in Java 7.0

java-thumbnail

What is a closure? Wikipedia says: A closure is a function that is evaluated in an environment containing one or more bound variables.(Free variables which are to be passed to the function).In some languages closures may occur when a function is defined within another function and the inner function refers to the local variables of […]

Inner Classes in Java

java-thumbnail

As we all know what an inner class is so lets try to know few more rules about Inner Classes. Inner classes cannot have static members. only static final variables. also read: Java Tutorials Java EE Tutorials Design Patterns Tutorials Java File IO Tutorials Interfaces are never inner. Static classes are not inner classes. Inner […]

Abstract keyword In Java

java-thumbnail

What is Abstract As we all know,An abstract method declaration introduces the method as a member, providing its signature, return type, and throws clause , but does not provide an implementation. Every subclass of A that is not abstract must provide an implementation for method, or a compile-time error occurs. also read: Java Tutorials Java […]

JSF Best Practices

JSF-Thumbnail

Here I am documenting some best practices can be followed during JSF project development. Open Source Components Use myfaces . It doesn’t matter which one you use because both comes from Sun. Sun offers myfaces through open-source community. also read: Introduction to JSF JSF Interview Questions Request Processing Lifecycle phases in JSF Use richfaces to get […]

ThreadLocal in Java

java-thumbnail

ThreadLocal is one of the rarely used class in Java. I found it is one of the powerful class in Java on multi-threaded programming. In multi threaded program generally we use session object to track the current users information. also read: Java Tutorials Java EE Tutorials Design Patterns Tutorials Java File IO Tutorials These information […]