Wednesday, 16 November 2011

IE 6 Support Dilemma

Often there is a dilemma among web developers whether they need to support Internet Explorer 6 or not.
Problem with supporting IE 6 is that, it is very complex, especially if you are building rich interactive web sites. Many functionality may not work and many other functionality will have extremely sluggish performance.
There are many campaigns running on behalf of dropping IE 6 support. Eg. , where you can register your website and declare Independence from IE 6.

Before dropping IE 6 support, we need to see whether any one uses it. Yes, many use it. If you check  browser market share statistics from various sources, you will see that around 5 to 10 percentage of the users are still using IE 6.
So question is whether you need to support (or rather, get business from) these 10 percentage of the users or not.
But why all these people are still using IE 6? My assumption is as follows. Almost 50% of the computer users are still using Windows XP. It may have shipped along with their computer and there are only a very few users who upgrade the OS. Default browser shipped with XP was IE 6. Among this XP users, there is a section who may not have enabled Windows Update and so they are not upgraded to IE 8. And there will be yet another section who may be using pirated Windows XP and so they don't have an option of windows update. But from a business perspective, can we say that we don't need business from those who are using pirated softwares?

The million dollar question is still open - "Do I need to support IE 6?".
In my opinion, if you are developing a public website whose usage will impact your revenue, you should support IE 6. Now the problem is that, if you develop a rich web screen, it will always have issues in supporting IE 6. My suggestion is to have a highly user friendly web application, targeting the newgen browsers such as firefox and chrome. And in addition to that have a fully functional but less user friendly version of the same application to support IE 6.
But if you are targeting corporate users, you may need to support only new generation browsers. Here the advantage is that corporate can instruct the users to use free newgen browsers like firefox or chrome.
You can also check the usage pattern of your website and find out the browser usage share, Using this data you may take appropriate decision.

Tuesday, 15 November 2011

Spring Roo - An excellent RAD tool

Recently, I had a look at Spring Roo, 
Roo is part of Spring family and it is an open source Rapid Application Development tool for Java developers. Spring based applications performing CRUD (Create, Read, Update, Delete) on Entities can be easily built using Spring Roo. It is not an IDE or a runtime. It is just a programming methodology combined with a code generation tool. 
To set up an application using Spring Roo, you may need to enter a few commands on the Roo shell. After that you can create your entities and add fields to it. Roo shell running in the background will create all the artifacts required. The application will be ready to run with full CRUD operations for the entity. 
Generated artifacts include 
• A listing screen which lists the entities in a table with pagination. Delete and update can be triggered from this screen 
• A create/update screen to create/update one entity. 
• A view screen to view one entity. 
• Spring MVC Controller class for performing the operations on the entity 
• Java bean setters and getters for entity. 
• Persistence logic for all CRUD operations for the entity. 

Finder Generation 
If there is a requirement to filter the listing based on a few parameters, finders can be generated. You just need to add an annotation to the entity and Roo will create the screen and corresponding logic for the same. 

Excellent Roundtrip handling 
Most of the Roo generated codes can be edited manually. Roo shell will automatically detect that and adjust the application accordingly. Even when Roo updates those files later, the manual changes will not be overwritten. 

It is nothing but Spring 
This is one of the unique features of Roo. The generated application is nothing but a normal Spring application. It gets the entire strength of the robust Spring framework. It is easy to build all the NRFs into the application. For example, authentication and authorization can be performed using Spring Security.  This makes Roo a strong candidate for developing enterprise applications, without compromising on NFRs.

Maven Dependency Management 
Dependency management in Roo is very easy as it is handled by Maven. As and when new features are added to the application, roo will automatically update the pom.xml and maven will download the dependencies. 

JSR-303 Bean Validation 
Spring Roo performs data Validation based on JSR-303 annotations. 

Integration with industry standard frameworks 
Other than spring, it has off the shelf integration with industry standard frameworks like Hibernate, Spring MVC, log4j, Google Web Toolkit, Solr search engine, EclipseLink, OpenJPA etc. 

Roo independent runtime 
The role of Roo ends in development cycle. The runtime of your application does not have a dependency with Roo. Spring Roo even provides a guideline on how to remove Roo from the application without affecting the functionality. 

Eclipse Based IDE 
Easiest way to develop in spring roo is to use STS (Spring Tool Suite) which is nothing but eclipse with a few extra plugins. 

An important advantage of Spring ROO is that it gives you maximum flexibility. Once you do the automated generation, almost entire code is at your disposal, and you can do any modification to that as you wish. The generated code is very clean and easy to understand. So even though you are working with generated code, you will not have any restrictions of generated code. 
And it is not mandatory that you following Roo based approach for all screens. You can use Roo to build your simple CRUD functionality and use a normal Spring MVC-Spring-Hibernate architecture to build complex functionality. As the technology stack is generally same, they can easily coexist. 

In any enterprise application, a large amount of functionality is simple CRUD. Spring Roo can surely improve productivity in developing such applications.