Netvibes - technology for portals

I have been using Netvibes when I first heard about it more than an year back , well untill recently when I can't use it in office anymore as it has been blocked by office firewall . With popularity of AJAX and Web 2.0, there has been a revolution in widget technology on internet and traditional HTML based interfaces found on web have undergone radical changes with web GUIs becoming richer and modular with passing time. I have known many developers who considered HTML and Front end programming like CSS, JS as demeaning as compared to more attractive and sexy middleware programming and this is the reason that most of web based applications written for enterprises typically have poorer UIs which do not meet any standards whatsoever. With AJAX and widgetry being used now, it has become important for one to have specialised skills in XHTML, CSS and Javascript.

While doing an internal project for my orgnanisation few months back, we had a requirement for creating a prototype for a employee intranet portal and we had little time of a week to demonstrate that how such a portal could be built with simpler technologies. We borrowed from Netvibes idea of creating a user driven portal with RSS as the main channel for content onto the portal. Having worked on some of portal server's personalisation mechanisms during course of my previous projects, I was surprised how easy it was in reality to create a portal and such a mechanism with simple JSP, AJAX and some open source web servers. As a prototype we could easily build a RSS driven portal like Netvibes where various content sources like wikis or knowledge sites acted as rss producers for portal to be consumed.
A real test of a technology is when end users like it and start using it. Netvibes has now acquired around 15 million registered users and it was identified as a disruptor and innovator by CNN Money . Internet is so powerful because it adopts useful technologies faster unlike enterprises behind firewalls who mull over things forever and almost stifle any adoption of useful and newer technologies which would have benefitted them.

Lightweight containers (Spring)

A container like Spring container is analogous to EJB container in sense that container can manage objects and also provides infrastructural aspects like transactions transparently to these managed objects. These containers are not conceptually different from EJB containers as they also provide a managed environment for a piece of code to run, but, they are lightweight as they are non invasive and can manage almost any java object. For example, Spring can manage any java object written to simple java bean specifications unlike EJB Container which can only manage components adhering to EJB specifications.

Container frameworks are designed to serve following objectives:

  1. To enable a business object or component declare its dependencies (Configuration)
  2. To resolve these dependencies (Dependency management)
  3. To provide object lifecycle services (Lifecycle management, pooling etc).
  4. Provide Low level Services (like Transaction, security)

In terms of dependencies, a business object might have two types of dependencies:

  1. Low level service dependency (like transactions, persistence)
  2. Other business object dependency

An EJB Container serves these objectives for business objects which are written as per EJB specifications. For example, EJB container does lifecycle management of EJB, EJB can tell container about its “service needs” through declarative semantic of an EJB descriptor. EJBs can also resolve their dependencies upon other EJBs through JNDI lookups

An EJB container is termed as “heavyweight” container as for it to serve its objectives it dictates certain interface dependencies upon EJBs. For example, any object which needs to run within EJB container must implement home and remote interfaces. A lightweight container on the other hand is less invasive than this. For example, Spring container can host any java object without it requiring implementing any specialized interface. This is most fundamental difference between lightweight containers like Spring and so called heavier containers like EJB container. A lightweight container can run virtually any java object. This implies that any java object can be run inside any lightweight container.

The lightness of Spring also emanates from fact that the java objects it manages are run inside regular JVM with Spring just being used as a system library. An EJB container on other hand is a full blown application in its own right. Lightweight containers also like to flaunt their IOC and AOP abilities. IOC which is Inversion of Control is a design pattern which is not documented authoritatively anywhere but conceptually it is all about taking a control away from an object to its container or framework, which is very crux of any framework. IOC as refered by most Lightweight container is about “Dependency Injection IOC”. In EJB system, an EJB component has to lookup its dependency upon other EJBs or resource like Data Source through JNDI, whereas in a lightweight container these dependencies are “injected” into managed Object. This way dependency lookup control is taken away from an object and hence name “Dependency injection IOC”.

Another features advertised by lightweight containers like Spring is their AOP, or Aspect Oriented Programming features. An Aspect is a behavior which cuts across set of objects. A well known example of an Aspect is “transaction management” which is required by most of systems. AOP containers provide these cross cutting services through Aspect oriented techniques. It is possible in these containers to create new Aspects (like Auditing) and attach them to target objects.

Spring does not require to be run inside any Application server, which means that it can also be used for standalone POJO applications. The biggest advantage of spring is that it gives a managed environment for POJO’s without being API invasive and intrusive (There are no callback method from container). Spring framework can also be viewed as “Framework for frameworks”, which is that it can be used to snap together various frameworks targeted at different layers of J2EE stack and glue them together as a cohesive system. In fact, Spring seems to provide a very attractive alternative to EJBs for a small to medium scale J2EE web system where use of a full bloodied EJB container might be luxury and overkill in many ways that one.

Long live RSS

Simple is powerful. It is amazing how powerful a humble RSS feed is in integrating, publishing and syndicating content on internet. RSS perhaps lies on lower end of spectrum of various integration techniques (enterprise SOA bieng on higher end) but it has become omnipresent and ubiquotous on internet. Internet is amazing place because it almost self governs itself and adopts useful standards with alacrity as was the case with rss. I first learnt about power of rss when I worked with Jean Paul Figer whose constant reference to rss made me wonder what was so special about a simple feed in XML format.......but once I understood it, it was a revelation for me. btw, I just had to write this because I used rss to integrate content from some of my favourite Tech sites on this blog, in just 1 minute. Check a cool site which offers nice widgets around RSS .