11/11/2005

Hibernate with Portlets

I find the use of hibernate as a boon to Portal projects. Well there will be a few who wont agree with me. I guess the fundamental thing that makes portlets a step ahead of Servlets is that they can completely be developed as separate components that are easily deployable to the Portals.

Portlets are presentation specific and does not provide any specification for how the backend database. Its up to the developers to decide how they are connecting to the database. I find the Hibernate as the most appropriate answer for the portlets projects.

  • It makes the portlets project easily configurable for any relational database.
  • Provides the POJO classes to use.
  • Lightweight then EJBs no Entity beans etc.
  • Good transaction and rollback functionality.

The only reason why Hibernate might not be used is because of extra complexities it adds and many of the Open Source Portals are now using the Hibernate. Thus it might need some extra work to resolve any issues of jar files and classes being clashed. It might not of much to use the Hibernate for smaller portlets based products, but for the bigger projects these complexities can be dealt with.

11/04/2005

Ajax in Portlets

Currently two major hyped technologies in web application development are Ajax and Portal/Portlets. I feel developers need to re-format their coding strategies to fully exploit Ajax, servlet and portlet technologies.

I feel these technologies can go hand in hand very well. One of the problems with portlets is that, each page contains output from several portlets. Each time the page is rendered all the Render methods are called. Thus a lot of content is transferred at a time. Of course one of the method is through Cache. It solves this problem to some extend. By using caching the Render method for that portlet is not called for a prescribed period of time. Though at times it might not be the viable solution. But in either case the content to be transferred from server to client machine remains quite huge.

This can be answered by using AJAX. At situations where the whole page is not required to be rendered again, we can use Ajax very effectively. Currently to communicate Ajax in Portals we need the use of servlets. A small amount of data is transferred through the Ajax to the corresponding servlet. The response also have lesser content plus only a small processing is required at the server side. Thus it improves the interaction of users with web-applications.

Its time to think ahead of available framework, techniques, and invent new ways to capitalize these techniques.

Your comments are appreciated.