Tuesday, July 12, 2011


The top 7 reasons to love JBoss AS7:
(taken from JBoss AS7 webinar)

1) Blazing fast start-up time - up to 10X faster!

2) Java EE 6 - leading the pack. again.

3) Very lightweight - exceptionally small footprint and aggressive memory management mean you can run it practically everywhere.

4) Modular core - delivers true application isolation.

5) Elegant management - simplified console and APIs.

6) Domain management - manage servers as groups.

7) Testable by design - simplified in-container testing via the Arquillian project speeds development.

I hope some body from WAS team is also reading these data :)


Tuesday, March 15, 2011

Hacking Tool for Dummies - FireSheep


You might have already heard about FireSheep - an interesting FireFox extension.

It can be used to intercept unencrypted cookies from websites by using Packet Sniffing.
In plain english - if you are accessing sites like Facebook, Twitter in a public Wifi , a person using FireSheep extension can find out what you are doing and may be even impersonate you as the FireSheep user may get your login credentials.

It is developed by Eric Butler and currently available for Mac OS X and Windows.
More details can be found here http://codebutler.com/firesheep

Tuesday, February 1, 2011

Another tool from Google - AppInventor, I'm loving it.


Hope you guys heard about Google App Inventor.
It is tool for developing Android applications , all you need is browser (and internet connection).

To use the tool you need to register with Google.

There are mainly three parts to the App Inventor

1. Designer Part - This is the main application which will open in the browser window.
Here we can drag and drop different components (e.g.- buttons, images, media etc) to design our own application.

2. Blocks Editor - This window can be opened from the Designer window. Here we will be mentioning what are the expected functionality of the different components we added in the designer part. For example - what should happen when the button is clicked.
If the intention is to play a music file when the button is clicked , then we will be dragging and connecting different blocks like button.onClick mediaFile.play

3. Simulator - what fun it is if we can not see our world class application in action. Simulator is for that. It can be opened through the blocks editor. What ever changes we are making in the Designer and Blocks editor will be visible in the simulator.

There are couple of tutorials in Google to get started with App Inventor.
I had developed a paint program with out writing a single line of code :)

But do not get all excited, AppInventor is still in Beta state. There are many functionalities missing. I was really surprised at the long list of missing things. For example - there is no way to add menu items. How can Google miss out such basic features? (even if it is Beta version).

Important Links



Note that instead of using simulator you can also connect your mobile. But I would recommend to use the simulator and once the basic application is ready install it in the phone.

The different steps to install application (apk file) in the phone are

1. From the AppInventor, package the application in the computer.

2. In phone go to settings and enable installation from unknown source.

3. Connect the phone to computer as USB Mass storage.

4. Copy the apk file to phone.

5. Phone should have a file manager application. If you are not having one, download a file manager application from Android market (for example - Astro).

6. After this click on the copied apk file in the phone and select the option Open with TaskManager, this will install the application.




Sunday, December 20, 2009

Real Time Web Application Development Challenges and HTML 5


In the traditional web architecture the reliable message flow between the server and the browser is a problem , as the server is not only forwarding the message but also most of the other work like translating the messages. This might result in Server becoming non scalable.

There were many attempts to simulate two way communication initiated by the server towards the client. One of the most notable approach is Comet.

Comet uses a technique referred as hanging GET or pending POST. In this the completion of an HTTP response is delayed until the server has something to send. This is generally implemented in JavaScript.

But there are some problems with this approach -
-Resource consumption is high as many connections are opened and closed.
-Setup and teardown of connections will consume more resources if secure connections are used.

HTML 5 may be the answer to these issues.

This provides many enhancements to the browsers and will redefine how internet communicates. The communication section of HTML 5 specification defines WebSockets and ServerSentEvents. These features will enable two way communication a reality for browsers. This will change the way in which real time web applications are created.

The main features are

  1. Web Sockets : Usually most of what is transmitted in web will be protocol information and padding. Web Sockets establishes a true two-way connection between server and the browser. This is essentially a pure TCP socket through which any application data can flow in either direction. This is more efficient than traditional HTTP requests as the non payload information is not required.
  2. Server sent Events : Two-way real time communication pattern common in web today is not taken into account in traditional HTTP. Through Sever Sent Events, a server can initiate the transmission of data. This is a standard describing how servers can initiate transmission of data to client once the initial connection with client is established.
  3. Cross Document Messaging : This provides a system in which different documents are allowed to securely communicate across different origins. This will allow an application to communicate with server over many different channels.
  4. Cross Origin resource Sharing : This will allow browsers to do site aggregation. Result may be better performance.







Monday, December 14, 2009

Java EE 6 Features

Lets look at the new sexy Java EE6 features

EJB Lite

EJB Lite is coming from the fact that- most of the ejb applications simply use features like persistence management, declarative transaction, stateless session beans etc.

EJB Lite will allow simple , lightweight implementations. This will also reduce the learning curve required (It might be just learning a handful of annotations). Very soon there may be Java EE application servers which implement EJB Lite instead of the complete Ejb3.1 spec.

Some of the features in the EJB Lite are
  1. Stateless, State full, Singleton session beans
  2. Interceptors
  3. Declarative Security
  4. Declarative Transactions etc
EJB Lite does not have the following features
  1. Message driven beans
  2. Remote interfaces
  3. Asynchronous invocation
  4. Corba interoperability etc.

Managed Beans 1.0

This is simply a POJO which is treated as a managed component by the container.
It can make use of some of the predefined Java EE features like lifecycle management and injection.

  1. @Resource
  2. @PostConstruct
  3. @PreDestroy etc

More Later...

Sunday, December 6, 2009

Project COIN

Project coin is aiming to find out the small language changes that should be added to the JDK.
Around 70 proposals were submitted in the period of Feb-27, 2009 to Mar-30, 2009 and discussed in coin developer forum.

Out of these proposals 5 or so are selected for including in Jdk7.

Some of the accepted proposals are -

1. Using Strings in switch
- Ability to switch on string values

2. Automatic resource management
- Having try like statement to declare one or more Resources. Scope of the resource is limited by that of the statement. When the statement completes normally or abruptly , all the resources are closed automatically.

3. Improved Type Inference for Generic Instance Creation
- When the full parameterized type is obvious from the context, then the parameterized type of the constructor could be replaced with empty set of type parameters.

4. Simplified Varargs method invocation.
- Reduces the total number of warnings reported to and suppressed by programmers.

5. Language support for JSR 292

Some of the proposals which are considered but not accepted are



This project is sponsored by The Compiler Group


Wednesday, December 2, 2009

Project Lombok


How much boilerplate code we write in our Java classes? Most of the time it will be minimum 100 lines. Even if we have a simple pojo - we have to write all the getters and setters, toString, equals, hashcode method etc.
Finally with all these code it will be easy to lose any bug which is hidden in the code.

Project Lombok is the answer to this problem (if you think this is a problem :) )

Instead of writing all these boilerplate code we can just give the annotation @Data.
Lombok is completely integrated with Eclipse , so all these generated methods will be visible in the outline view.

To make Lombok work with Javac, just add lombok.jar to the classpath.
Other annotation provided by Lombok is @Getter and @Setter.

Another interesting annotation is @Cleanup - this will help by automatically generate try finally blocks to call close on resource objects.

The full list can be found here - Project Lombok Overview


Project Jigsaw

Project Jigsaw is focused on the goal of modularizing JDK. Such a thing will allow applications to be installed with only the required components of JDK.

In the upcoming Jdk7 SUN's primary goal is to modularize jdk.