Posts

Showing posts from February, 2010

I like my old friend

  It is an old post based on old idea, it is not relevant anymore.   XML VS JSON. Which one is the super-power to exchange data from server-side to client-side? This is old debate. You will find thousands article about it. Why am I writing about it? When I was working with IBM Toronto Lab, someone asked me why I like XML. I said my reason and I have only one reason. Most of the people like JSON because of its hype and unfortunately, they did not get the opportunity to work with complex data.  JSON is the best approach to transfer data from server-side to the client-side because JSON is lighter than XML and easy to fetch data from JavaScript. It is true only if complexity of data and business requirement are simple. Now think about the following scenario, I am working with scheduling software where XML contains schedule of each team member. I need to send more than 1000 data from server to client side such as, RIA at a time.  The big picture of the XML is: <company>  <

How to develop Liferay portlet using Eclipse

Image
I have written this blog because the portlet development environment of LifeRay is not easy to setup. I am hoping, this blog will help beginners to develop portlet using LifeRay SDK. Step by Step process: W e have to download 5 components, they are: Ant 1.7.x Eclipse Galileo 3.5.x LifeRay with Tomcat bundles LifeRay Plugin SDK LifeRay source LifeRay with Tomcat bundles: At first, we will create a directory as LifeRayPortal. Download LifeRay with Tomcat 6.x. Unzip it inside the LifeRayPortal. In this tutorial, we will unzip all LifeRay components in the LifeRayPortal directory Go to the webapps directory of tomcat. If you see sevencogs-hook and sevencogs-theme directories, please delete those directories. ANT 1.7.x Download ANT tool. The version should be avove 1.7, otherwise it will not work with LifeRay. Put your ANT directory file path in your "Environment Variable". Add ANT_HOME as variable name and your ant directory file path (e.g: c:\ant\) as variable value. LifeRay So

Why am I getting Java.lang.NullPointer error?

Sometimes we have experienced with Java.lang.NullPointer error and sometimes it is so hard to predict which code producing the error. I have experienced about this error in 2007, and then I read NULL pointer exception documentation from SUN ( http://java.sun.com/j2se/1.4.2/docs/api/java/lang/NullPointerException.html ) which saved my debugging time. I hope it will save yours time also. There is only 4 reasons to get NULL POINTER EXCEPTION: 1 Calling the instance method of a null object 2 Accessing or modifying the field of a null object 3 Taking the length of null as if it were an array 4 Throwing null as if it were a Throwable value