Saturday, January 31, 2009

Why Java on Demands...

As Java gains ground in the development of enterprise applications, programming skills are becoming more important.

The study found a significant shortage of IT workers skilled in Java. Among the 79.7 percent of respondents who say their Java skills are highly important, only 42.1 percent rank their skill level as high. Java can run on multiple operating systems, it's the primary development platform for client applications at Spirent Communications plc. "Java is definitely one skill we look for in interface development," says Mike Burk, senior manager of systems integration and interface development at the company's Rockville, Md., office. But Spirent, which makes testing software for the telecommunications industry, places equally high value on C++, the primary platform for its server software.

Discovery with java...

James Gosling initiated the Java language project in June 1991 for use in one of his many set-top box projects. The language, initially called Oak after an oak tree that stood outside Gosling's office, also went by the name Green and ended up later renamed as Java, from a list of random words.


Sun released the first public implementation as Java 1.0 in 1995. It promised "Write Once, Run Anywhere" (WORA), providing no-cost run-times on popular platforms. Fairly secure and featuring configurable security, it allowed network- and file-access restrictions. Major web browsers soon incorporated the ability to run secure Java applets within web pages, and Java quickly became popular. With the advent of Java 2 (released initially as J2SE 1.2 in December 1998), new versions had multiple configurations built for different types of platforms. For example, J2EE targeted enterprise applications and the greatly stripped-down version J2ME for mobile applications. J2SE designated the Standard Edition. In 2006, for marketing purposes, Sun renamed new J2 versions as Java EE, Java ME, and Java SE, respectively.

Core Concept.

Following are core thinking :
1. OOPS.
2. Binding.
3.Serialization.
4. Code optimization.
5.File System.
6.Volatile.

For more clarification let me know...

Dream Coding.

1.Rich Text Editor.
2.Zoom of Table.
3.Zoom of Images.
4.Read XML File.

Architecture & Design pattern.


Following are design pattern :
1. MVC Architecture.
2 Factory Architecture.
3. Singleton Architecture.

1.Focus on MVC.
  • MVC : used for Stand alone application means of Desktop base application.
  • M : Model : Displaying the data.
  • V : View : Rendering the content of Model.
  • C : Controller : Inereacting with user interface with view in to action that will perform update on Model.
MVC Diagram on Top :

2.Focus on Factory :
  • Factory Method is a creational pattern.
  • The Factory Pattern is all about "Define an interface for creating an object, but let the subclasses decide which class to instantiate. The Factory method lets a class defer instantiation to subclasses".
  • factory is not needed to make an object. A simple call to new will do it for you.
  • We having super class and n number of subclass ,based on data ,we need to return one of subclass object.
  • In Factory Pattern an interface is responsible for creating the object but the sub classes decides which class to instantiate. It is like the interface instantiate the appropriate sub-class depending upon the data passed.

Run Time Example :
  1. public class MammalsFactory {
    public static Mammals getMammalObject(String name) {
    if (name.equalsIgnoreCase("Cat")){
    return new Cat();
    } else {
    return new Dog();
    }
    }
    } Now if you see this class, here we will be passing an argument to
    the getMammalObject function based on the argument passed we return the
    Mammals object of the class.
  2.     public abstract class Mammals {
    public abstract String doWalking();
    } Here we have created an abstract class Mammals. This class will be used by the Dog and Cat class.
  3. public class Cat extends Mammals {
    public String doWalking() {
    return "Cats has been Informed to perform Walk Operation";
    }
    }Here we have created Cat class, this class extends from Mammals
    class so it is understandable that Cat needs to have the implementation
    for doWalking() method.
  4. public class Dog extends Mammals {
    public String doWalking() {
    return "Dogs has been Informed to perform Walk Operation";
    }
    }Here we have created Dog class, this class extends from Mammals class
    so it is understandable that Dog needs to have the implementation for
    doWalking() method.
  5. public class FactoryClient {
    public static void main(String args[]) {
    MammalsFactory mf = new MammalsFactory();
    System.out.println(mf.getMammalObject("Dog").doWalking());
    }
    }Here if you see i want to create an object for Dog class and for
    that we are not directly loading the Dog class. Instead we are
    instantiated the object for MammalsFactory class.
Factory Diagram on Top :


For more clarification let me know...

Question With Answer...

Question :Why Wait and notify are kept in Object class although they are used only with
Thread Class...?
Answer : locking mechanism happens at the Object level so
they are in Object Class.
Question : Difference between Swing and AWT...?
Question : Difference between Abstract class and Interface....?
Question :real example of Encapsulation , Inheritance, polymorpisum....?
Question :real example of Deadlock condition...?
Question :Meaning of volatile modifier...?
Question :How to implement serialization...?
Question :what's perfect meaning of Static keyword....?
Question :perfect meaning of final keyword...?

For more clarification let me know...