Friday, October 21, 2005

Technologies to Watch: A Look at Four That May Challenge Java's Development Dominance

Technologies to Watch:A Look at Four That May Challenge Java's Development Dominance by Bruce A. Tate. The author has a knack for identifying successful technologies. He was one of the early developers who identified the emergence of the Spring framework; he predicted the demise of EJB 2 technologies a full year before the EJB 3 expert group abandoned the older approaches. In his new book, Beyond Java, Bruce looks at four languages and technologies that may challenge Java's dominance in some development niches. This set of technologies can help make you much more productive - Ruby and Spring Webflow. The author makes the case that Java's not dead yet, but for the first time in nearly a decade, we're seeing compelling innovation happen beyond the borders of Java.
Technorati Tags: , ,
Blogs linking to this article

Sunday, October 16, 2005

Signs of the the cost of development start to appear

India is doing great on all the frontiers today, whether it is business or sports. However, like any developing country, who is developing so to say, signs of the cost we are paying for this development are starting to appear. See article: India's poor tackle toxic e-waste on BBC.

We need to be careful and not repeat the mistakes that the west made on their way up.
Technorati Tags: , ,
Blogs linking to this article

What's a Singleton?

What's a Singleton? A commonly asked question. A Singleton is a class for which only one instance can exist within a program ie. only one single object of that particular class can be created in a program.

Write a class in a way which prevents a casual programmer from creating more than one instance. Have a constructor, but make it private so that no other classes may call it. Now that we have no constructor, we need to make a way for people to create a single instance of the class. Typically this is done by provding a static method which creates an instance, but will create only one. If it is called again, it just returns the same instance that it created the first time.

The last thing to remember is that Java is a multi-threaded language in which many things can be happening "at once". If two threads were to call getInstance at the same time, then our class might occasionally create two instances, which would be wrong and very hard to test. So we make use of Java's built-in synchronization mechanism to make sure that only one thread can call getInstance at any one time.

Here's the code:
public class SimpleSingleton
{
private static SimpleSingleton instance = null;

private SimpleSingleton() {}

public synchronized static SimpleSingleton getInstance()
{
if (instance == null)
{
instance = new SimpleSingleton();
}
return instance;
}

public void callMethod()
{
System.out.println("Calling it's method");
}

public static void main(String[] args)
{
SimpleSingleton.getInstance().callMethod();
}
}
Thanks to JavaRanch for the tip.

Technorati Tags: ,
Blogs linking to this article

Friday, October 14, 2005

What is Spring

ONJava has published another article by Justin Gehtland and Bruce A. Tate titled, 'What is Spring - Part 2.' In this article, the authors show you how to use Spring to help you develop a simple, clean, web-based user interface. Spring is a lightweight container, with wrappers that make it easy to use many different services and frameworks. In part one of this two part series "What is Spring" the authors show you how to automate a simple application and enable it for Spring. With new books on Spring being published at a rapid pace, do you think Spring will continue gaining as much popularity in the coming year?"
Technorati Tags: ,
Blogs linking to this article

Saturday, October 01, 2005

J2EE Programming (with Passion!) Online Course

If you have been waiting for an opportunity to learn J2EE in a structured way without shelling out a lot of money on books and classes, this might be just what you were looking for. Sun Microsystems employee Sang Shin in his spare time, offers this advanced J2EE class, for free.
Technorati Tags:
Blogs linking to this article