Posts

Showing posts from October, 2012

Measuring Code Quality using IBM RAD's Software Analyzer

Image
In case you are using IBM RAD for your development. There is very good built in tool, which helps you to measure the quality of the code. It does a good analysis of the code and gives suggestions to improve it. It is a kind of static profiling, It can profile your code in lot many ways, however, one of the most important is or which I liked is Performance. You can profile your code for memory usage and speed, Interesting na...... It will let you know, as to what should be avoided in the code and how it should be coded properly. The good thing is that you can use it to profile a single java file, or a java package, or an entire project. I'm attaching a document specifying how to use it for Performance. There are plugins like PMD and Find Bug etc, which performs similar analysis. However, they are plugins not build in fuctionalities, and you are free to choose these plugins into your RAD. This document will help you to use Software Analyzer plug-in available in RAD

JSP - The memory consumption

I'm not going to reiterate what most of the people already know about the difference between jsp include directive <%@ include... /> and jsp include action . One difference which struck to me and which, I want to share with you all is that action is good in terms of memory consumption . Before going into the details of what I've just mentioned, do remember that the jsp directive includes all the files at compile time, and when a request comes, the jsp (servlet) get's instantiated and is loaded into the heap memory. Similarly, for jsp action, the process happens at run time. Now let’s take an example where, you have a member.jsp file. And you want to include another file permanentAddress.jsp , when permanentAddress flag is set to true . Similarly include memberDetails.jsp , when details flag is set to true , and planDetails.jsp , when plan flag is set to true . In case of jsp directive, all the content of permanentAddress.jsp, memberDetails.jsp, and pl