Aug 11, 2008

Oliver Wahlen's Blog Online

So this is my first post on Blogger.
As an IT consultant I have done several projects using Netbeans and its Visual Web JSF framework based on the Woodstock components.
I think that JSF is in general one of the best approaches to create robust web applications.

However the whole web technology sector is evolving with an enormous speed and to stay "in business" developers have to get comfortable with new technologies at an enormous rate.

I want to use this blog for two purposes:
  1. to present new technology approaches, and to help developers getting comfortable with these technologies.
  2. to share my personal technology evaluation results with others and to challenge other opinions. I think such discussions will help people to get a better level of judgement concerning state of the arte technologies. Therefore I encourage everybody to comment my posts!
And now: Happy blogging!

Netbeans Visual Web Tables with thousands of records

Maybe you have noticed that the table component in Netbeans visual
web tends to become quite slow if it has to deal with a huge amount of
records (e.g. coming from a database).
This is true even if pagination is used.

The reason is that the typical dataproviders (e.g. ObjectArrayDataProvider) on the server side require a complete fetch of all data from the database.
Based on this data they analyze the amount of records which in turn is used to operate the augmented table header and the pagination controls.
Thus the application does not only become slow (because of the sql operations) but also consumes a large amount of memory.

To overcome this problem I have created a new dataprovider called ObjectControllerDataprovider.
Like all the other dataprovider this class can directly be used in the table layout of the visual table component.
This ObjectControllerDataprovider is in turn connected an ObjectController.
In more detail the ObjectControllerDataprovider is connected to a class that is to be written manually which extends the abstract ObjectController class.
The manual written class finally contains the functionality to efficiently retrieve small pages from a database utilizing a caching window concept.

You can download a working Netbeans 6.1 example project using the new dataprovider from the following link: