Archive for July, 2007
patching no dilemma
Handcoding is the most favorable in the urgent times. But most of the IT managers end up in frustration/fear when it comes to maintaining it. But how is this tweaking/patching business taken care in the world of Opensource and the complimentary ecosystem ?
Most of the OSS project maintainers are developers(with managing ability too) by themselves. And there are even serious considerations/undergoing effort of making it distributed by having the project decomposed. This setup favors multiple responsibilities per project. Like in the case of GNOME project. Even though the contributor tweaks the code in an unconventional way, it reaches the maintainer for approval. Not only the way it works to correct but also with the quality of the code. The change log is maintained in almost every project by their own way of convenience.
There is generally an idea or belief that “Patches are costly”. But in the world of OSS, the more the number of patches, more solid the application becomes. In simple terms the Patches are thought as a “way of doing a thing”. Which “way” better suits the functionality is decided after spicy conversations among the contributors.
Add comment July 26, 2007
jasper ireport
I was looking for a opensource reporting tool for an application i develop. I chose jasper report. iReport (ide) is a handy tool to design reports. It also supports javabean datasource among the many other alternatives. There are also few useful inbuild classes available to test how JavaBean datasource works.
I tried implementing a bean datasource setup. It basically needs a factory class which returns a vector of bean object on invocation of a static method. The setup is quite simple.
The methodology goes like this,
- Create a new document using File -> New Document or Ctrl+N
- Next step is to create a datasource. Data -> Connections/Datasources -> New -> JavaBean set data source
- Give a name to the JavaBean data source
- Mention the Factory Class with the exact package where it is available. Leave other fields with their default values and press Test button. If the test is successful, press the button Save.
- To retrieve the bean fields, Data -> Report Query -> Select JavaBean Data source. Give the Bean class with the exact package name if any. Press Read attributes and Add the listed fields.
- The fields can then be made part of the document from View -> Fields and drag drop in to the document under design
Creating Factory Class and a Bean Class
package com.wordpress.ixfree;
import java.util.*;
public class FactoryBean
{
public static Vector createBeanCollection()
{
java.util.Vector coll = new java.util.Vector();
ExampleBean myBean = new ExampleBean();
myBean.setExampleage(35);
myBean.setExampleexperience(10);
coll.add(myBean);
return coll;
}
}
class ExampleBean implements serializable
{
private Exampleexperience;
private Exampleage;
public void setExampleage(int june21age)
{
this.Exampleage = june21age;
}
public int getExampleage()
{
return Exampleage;
}
public void setExampleexperience(int june21experience)
{
this.Exampleexperience = june21experience;
}
public int getExampleexperience()
{
return Exampleexperience;
}
}
Referring Bean Class
* Make a jar of the above classes and add it to the iReport<version>\lib directory. The look and feel depends on the designers creativity/purpose.
Click [for Jasper Reports Rendering as HTML]
20 comments July 4, 2007
