Sunil Prakash Inteti's Blog

A technology perspective

Archive for the ‘Java’ Category

Persisting relationship entities in Neo4j

Posted by Sunil on March 30, 2012

Neo4j is a high-performance, NOSQL graph database with all the features of a mature and robust database. In Neo4j data gets stored in nodes connected to each other by relationship entities that carry its own properties. These relationships are very important in graphs and helps to traverse the graph and make decisions. This blog discusses the two ways to persist a relationship between nodes and also the scenario’s which suits their respective usage. Spring-data-neo4j by springsource gives us the flexibility of using the spring programming model when working with neo4j database. The code examples in this blog will be using spring-data-neo4j.
Read the rest of this entry »

Posted in Java, NoSQL, Spring | Leave a Comment »

Implementing Generic functionality in Grails

Posted by Sunil on September 7, 2010

In web applications we have functionalities like auto suggestions , rating objects, adding to favourites etc which repeat themselves in an application and across applications. So it demands to think about implementing a generic way of rating and adding to user favourites etc and follow DRY principle. Recently in one of my Grails projects we implemented these functionalities in a generic way so that they are reusable and easy to use. Here in this blog, specifically lets look at how we can implement generic auto suggest functionality in Grails. This idea can be extended for other functionalities as well.

Jquery already provides auto suggest functionality. The question here is making functionality generic so that next time we have to use that its a breeze to use. Lets create a tag which can add the necessary jquery code for a text field to have auto suggest capability. Read the rest of this entry »

Posted in Grails, Groovy, Java, Jquery | Leave a Comment »