Sunil Prakash Inteti's Blog

A technology perspective

Archive for the ‘Uncategorized’ Category

Cobertura loaded information on 0 classes, classpath issue ?

Posted by Sunil on March 16, 2010

In a grails application, we can use the code coverage plugin to generate the coverage reports. It is simple to use and generate the reports. I faced a perculiar problem while doing a grails test-app. I get an info message that cobertura loaded information on 0 classes

It took some time to figure out the problem. The code coverage plugin(present in the .grails folder) has the cobertura jars in its lib directory. By mistake the cobertura jar with a different version is checked in to the lib directory of the project. So there was a version conflict and hence cobertura was not loading the class informations. Once i removed the unnecessary cobertura jar in the projects lib directory, cobertura was generating reports normally. This could be one of the reasons for cobertura not loading the classes. Hope this helps if you are facing similar problem.

Posted in Uncategorized | Tagged: , | Leave a Comment »

Authenticating Facebook user into Grails App

Posted by Sunil on March 10, 2010

In my previous post I talked about how we can connect to Facebook from our application and get the user deatils. In this post we will discuss how we can authenticate the user based on his facebook user details. We will use acegi plugin of grails to allow uses our of web application to be authenticated by their facebook credentials . We dont need to aunthenticate them into our application like normal way. Let us see how that can be done!

Read the rest of this entry »

Posted in Uncategorized | Leave a Comment »

Connect to Facebook in Grails App

Posted by Sunil on March 5, 2010

Recently we integrated the Facebook connect plugin in our Grails project. In this post we will see how to connect to facebook and authenticate into facebook from our application. So that we can allow facebook users to use our Application.

First step would be to get the facebook connect button on to our home page. The code for this is below.

Getting the facebook connect button on our home page and its functionality

 <fb:login-button onlogin="facebook_onlogin();"></fb:login-button>

Read the rest of this entry »

Posted in Uncategorized | 1 Comment »

Open Flash Chart in a Grails Application

Posted by Sunil on December 10, 2009

In my Grails project we had a requirement that we needed to show graphs. Our client wanted to go for a opensource solution. We decided on the option OpenFlashChart. Grails comes up with its plugin for OpenFlashChart. With Open Flash Chart we can easily show barchart, line chart, piechart, Area charts etc. Let me explain very briefly how Open Flash Chart works. Basically in a web page we need to add this open flash chart which is the swf object. We should provide swf object with a data-file which contains the data it displays. This data could come from backend as well.  When the web page is rendered the swf object tries to get the data and render the graph.  Lets look at how we can use this in a Grails application.

Read the rest of this entry »

Posted in Uncategorized | Tagged: , | 1 Comment »

Practicality of MetaProgramming in Grails Project

Posted by Sunil on November 27, 2009

Grails is a powerful technology to build web applications very rapidly. Groovy provides so many enhancements to Java objects. Metaprogramming capability is one of them. Grails uses this Metaprogramming capability of Groovy heavily to accomplish things faster the way it does.

This blog discusses the the Practicality of this Metaprogramming in the Grails projects based on my experiences.

Read the rest of this entry »

Posted in Uncategorized | Leave a Comment »

 
Follow

Get every new post delivered to your Inbox.