Common Mistakes in Exception Handling

Exception is disruption to a normal execution flow of a Java (in general any) program. This disruption can be because of a runtime problem e.g. data problem, initialization problem, etc. or because of a failing business condition. Java is capable of handling all such undesired scenarios elegantly. But when it comes to a developer to use these java generated exceptions to provide enough information to different stakeholders, then few mistakes occur. In this article,
Read the rest of this entry »

  • Share/Bookmark
Java

Role of Frameworks in Architecture Definition

If one wants to select an important technology trend in Java world over past few years, then it has to be the growth and wide acceptance of open source frameworks in application development. If we look back, there are examples of frameworks which got wiped out with time, also there are examples of frameworks which have changed the way applications are getting developed. These successful frameworks have contributed to give a new look to Java itself. There are many reasons behind continued success of different frameworks available in market. I am not going to list and analyze what is good with those which have succeeded, and what went wrong with those which have failed. But, the bottom line is – these days Java application development involves considerable use of proven frameworks. What benefits we reap by using these frameworks? Here is the list –
Read the rest of this entry »

  • Share/Bookmark
Java

Eclipse Features to Improve Java Productivity

Eclipse IDE provides many features to help a developer in development activities. Help to write code, integrate with servers, deployment, quality check and what not. In this article, I am consolidating those features which help us in improving productivity. Here I have used Eclipse Galileo and for unit test generation it is JUnit 4.4.


Read the rest of this entry »

  • Share/Bookmark
Java

What is Difference Between An Architect and A Designer?

Some of you might say that there is a thin line between these two designations, while some might be able to differentiate clearly saying that comparing these two is comparing apples and oranges. But it is true that these two personalities work under same roof to achieve same goal of delivering a project, more appropriately application/system. Ok, there might be someone who performs both the roles for a project.  Then the question to be asked to the person – what is difference when you are an roaming around as an architect and when you are seen as a designer?
Read the rest of this entry »

  • Share/Bookmark
Java

Long Time-stamp to Date Conversion in Java

I wanted to convert a timestamp from long value to something human understandable date. I explored multiple ways of doing it with a couple of controlling parameters. Sharing it as it might be useful to you.


Read the rest of this entry »

  • Share/Bookmark
Java

Investigating java.lang.OutOfMemoryError

Mostly we do not encounter this error in preliminary stages of application development. Sometimes functional testing reveals this error, but many times it is revealed during performance testing. It is not so annoying when it occurs before we push the application into production, but the real pain starts when we are hit by this error in production. When production server goes down or hangs itself with java.lang.OutOfMemoryError, it can even lead to a heavy monitory loss.
Read the rest of this entry »

  • Share/Bookmark
Java

When to Say NO to the Cup of Coffee?

Java, a portable, multitasking, object oriented language. It has captured a considerable share of market so far. We also have huge number of products developed using this language to provide need based features to applications using it. It has also come long way since it’s birth. We have been using this language in many applications; still there are some places where we would prefer to say No to Java. These occasions may be result of some inherent disadvantages in Java, or these can be the side effects of some of the features which we most commonly use. Let us see when would we say, “I want to avoid this cup of coffee”.
Read the rest of this entry »

  • Share/Bookmark
Java

Code Generation in Application Development

Till date there would have been hundreds of thousands of lines of code written in each programming language. Every new application getting developed adds thousands of lines of code to this code pool. But this code is not for free, it involves huge amount of money. There are many techniques to reduce the application development cost and to improve productivity. Still we have to handwrite all the code. UML design tools, IDEs like RAD and Eclipse etc. do help in automating this code writing process. Still there is a lot of room to automate it further. The main hurdle is application architecture/framework that is specific to each application, because each application is a solution to a peculiar problem. This stops us from automating the code generation. Here is a method that will allow you to save huge amount of effort by generating code in most common as well as complex application development scenarios. I am assuming that the reader already knows application development lifecycle.


Read the rest of this entry »

  • Share/Bookmark
Java

What We Mostly Use in Java

Ok, I haven’t written any tool to scan entire worlds Java code to find out these syntax elements. But definitely, all of us have gone through thousands of lines of good and bad code since we learned this language – Java. Not only me but all those who call themselves as Java developer have traveled along with this language in its journey, which started long back with a tag of platform independent object oriented language to the recent versions where everything is getting annotated. It is not just a tag but a truth that Java code is portable. This is also true that this language has got enough features to call it a rich language. If not, it would have vanished long back, and would not have created such a huge community of users. Bottom line is – which is nothing new that I am telling you – it is a good language.

Ok, let us come out of the appreciating manager mode and focus on reality. Have you ever checked what do you mostly write in your Java code? What contributes to up to 80% of your code? Open any application source code and you can see yourself. 
Read the rest of this entry »

  • Share/Bookmark
Java

Is JSF Dying?

We remember the hype that rocked java world with entry of this web tier framework. It is different as compared to those frameworks which (actually) are front runners of web application technology stack. These include Struts, Spring MVC, Tapestry and many more. These frameworks provided simple MVC based web tier, and a set of classes abstracting the non functional part. This definitely made us to leave behind the MVC implementation of Jsp – Servlet – POJO/EJB, and use these frameworks instead. These technologies varied more in richness than fundamentals. Arrival of Java Server Faces (JSF) triggered a different thinking line. Reusable components and event based programming buzzed around us.
Read the rest of this entry »

  • Share/Bookmark
JSF