This blog describes some of the cool features of jdk5.0.
1. Formatted IO
This basically can divide into two parts .This features makes java more similar to the features available in C.
1. Formatting features for the out put.
In this feature printf() method is introduced so that just like in C the formatting can be done depending on the data types.
Eg.
System.out.printf("name count%n");
System.out.printf("%s %5d%n", user,total);
See more about formatters in java.util.Formatter
2. Formatting features for input
This is another feature which simplifies the command line arguments operations in java.In the earlier versions java is not much popular in this arena. There is a Scanner class available in jdk5.0.This Scanner class is used for accepting System.in, different files streams etc and access the values available in the stream specified in side the java programe.
Eg .
Scanner s= new Scanner(System.in);
String param= s.next();
int value=s.nextInt();
s.close();
Static Import
Using this ,no need to import the classes to access the static members.
Eg. Import java.lang.Math.PI;
Or import java.lang.Math.*;
So we can access the static members directly inside the programe.
double r =500*PI;
Enumerations
Jdk5.0 supports enumerations.This is the way to define set of constants in java program. The enum constants defined in the program of the type of the class its defined.This is basically a replacement of final members in java.
Some of the interesting features are
This can be used with switch statement.
public enum Operation
{ PLUS, MINUS, TIMES, DIVIDE; // Do arithmetic op represented by this constant
double eval(double x, double y){
switch(this) {
case PLUS: return x + y;
case MINUS: return x - y;
case TIMES: return x * y;
case DIVIDE: return x / y;
}
throw new AssertionError("Unknown op: " + this); }}
Enum is just like a class whether we can have constructors methods and member variables. But Enum cannot inherit any class.
The method values() will get array of constants defined and valueOf() used to get the constant value.
Continue....
Monday, August 13, 2007
AOP frame work for performance analyzing
This framework is used for analyzing the performance of the code. I never used any of these performance analyzer tools J .There are a lot of framework available for analyze the performance for java code.
Commercial
Compuware DevPartner Java Edition
Borland Optimizeit Suite
Quest Software JProbe
ej-technologies JProfiler
Open Source
Extensible Java Profiler
Eclipse - Hyades
Mike's Java Profiler
JPerfAnal
The AOP one seems to be simple to user for Java programmers .This framework provide set of API’s which can be inserted anywhere in the code.
Commercial
Compuware DevPartner Java Edition
Borland Optimizeit Suite
Quest Software JProbe
ej-technologies JProfiler
Open Source
Extensible Java Profiler
Eclipse - Hyades
Mike's Java Profiler
JPerfAnal
The AOP one seems to be simple to user for Java programmers .This framework provide set of API’s which can be inserted anywhere in the code.
Friday, July 27, 2007
Oracle 11g
Oracle 11g is released. There are many features available in this new release.
1. High availability
2. Advanced compression
3. More security features –encryption
4. Testing features
5. Advanced support for 3D,images,medical Imaging system related features
6. Fast JIT-compiler features for java
7. Advanced connection pooling features for PHP
8. Zero downtime upgrade
9. Improved partitioning features
And many more :) . Please have a look at www.oracle.com. There are couple of web casts by Charles Philip, President Oracle Corporation and team.
Interesting questions how this big companies continue to succeeds in the market? Even there is lot of players around. One simple answer is the Market Leadership. Market leader will buy only from market leaders. Their order value is too high may be greater than $100 millions.
1. High availability
2. Advanced compression
3. More security features –encryption
4. Testing features
5. Advanced support for 3D,images,medical Imaging system related features
6. Fast JIT-compiler features for java
7. Advanced connection pooling features for PHP
8. Zero downtime upgrade
9. Improved partitioning features
And many more :) . Please have a look at www.oracle.com. There are couple of web casts by Charles Philip, President Oracle Corporation and team.
Interesting questions how this big companies continue to succeeds in the market? Even there is lot of players around. One simple answer is the Market Leadership. Market leader will buy only from market leaders. Their order value is too high may be greater than $100 millions.
Tuesday, July 24, 2007
SOA
SOA (Service Oriented Architecture) become a buzzword in technology arena. I started to hear this from two to 3 years back but don’t know what exactly even now. I mean the implementation point of view. SOA is mostly related to integrating various systems may be working in different platforms,technology etc. SOA gives a common language or plug-in type architecture to communicate with different system. The ROI of SOA is pretty impressive. Some figures shows like if it requires $40000-$50000 to integrate system without SOA in place it requires just 3000-5000 $ to build the same if the SOA is already in place. SOA always gives long term benefits for long term big projects. You should have a long term vision to reap the benefits of SOA. Because of this it’s very difficult to convince the benefit of SOA and also the initial investment will be more compared to the projects without SOA in place. One other challenge that companies are facing is that the shortage of skilled professionals. There may be chance of performance issue also as it involves various systems and chances of network issues /performance issues are more. Another challenge is ofcourse managing interrelated systems. Challenges to ensure the security for the complete/part systems involved is also there.
http://www.javaworld.com/javaworld/jw-07-2007/jw-07-soa6.html?page=3
http://www.javaworld.com/javaworld/jw-07-2007/jw-07-soa6.html?page=3
Thursday, July 19, 2007
OpenID

OpenID is an authentication server that can be used across different websites. When you type a url and the site is OpenID enabled it will go through the OpenID server and authenticate the user against that particular url. Some of the sites like AOL uses OpenID.There are lot of OpenID providers are available. Shown below is the diagram representing different steps in authentication using OpenID.OpenID4Java is a n
http://www.theserverside.com/tt/articles/article.tss?l=OpenID
http://www.theserverside.com/tt/articles/article.tss?l=OpenID
Sunday, July 15, 2007
Sculptor
Sculptor is a code generating frame work using MDSD(Model Driven Software Development ) .This uses some of the concepts like DDD (Domain Driven Design ) and DSL (Domain Specific Lanaguge). Seems to be a complex architecture using Hibernate,Maven,Spring,EJB3 and lot of other technologies.Sculpture uses oAW(Open Architecture Ware) for parsing DSL and generating high quality Java code and configuration. This can also integrate with TDD (Test Driven Development) using jUnit and other testing frameworks. Eclipse can be used as an editor.
http://www.theserverside.com/tt/articles/article.tss?l=ProductivityWithSculptor
http://www.theserverside.com/tt/articles/article.tss?l=ProductivityWithSculptor
Life with out google for software professionals is very difficult to imagine. How many times I am going through that website any way it’s more than ten times, no doubt. Even though most of us not using any search site other than google there are many.
http://www.altavista.com/
http://www.yahoo.com/
http://www.ask.com/
http://www.live.com/
I used google to find these sites :)
http://www.altavista.com/
http://www.yahoo.com/
http://www.ask.com/
http://www.live.com/
I used google to find these sites :)
Thursday, July 12, 2007
Garbage Collection
Garbage collection is Java’s mechanism to release the unused memory. In order to make the garbage collection more efficient we should release the object as soon as possible. One good practice to do this is to reduce the scope of the variable. If possible move statically scoped variables to instance based, instance based to local scope etc. If you can eliminate the variable itself, do it.
http://www.theserverside.com/tt/knowledgecenter/knowledgecenter.tss?l=NoObjectsLeftBehind
http://www.theserverside.com/tt/knowledgecenter/knowledgecenter.tss?l=NoObjectsLeftBehind
Subscribe to:
Comments (Atom)