Toni Epple is the NetBeans module writer behind Jarvis, which is the JasperReports Visual Designer at https://jarvis.dev.java.net/. Here he answers some questions, explains what he's been up to, and gives you some pointers on how to contribute to his project. He also shows us a very cool Flash demo, proving how far along his project has already come.
I live in the heart of Munich, Germany, about 200 meters from the annual Oktoberfest. Originally I'm a geneticist, but after my studies I decided that it was more fun to analyze the data than to produce it, so I studied computer science, and now I develop systems biology applications. I'm leading our small group of Java developers at Genomatix Software GmbH. I've created lots of web and database applications and the rich-client platform we use for our Java applications. My main project is BiblioSphere, a software product that uses information extraction techniques to derive gene networks from scientific literature.
Not really, I must admit that I haven't been too active during the last few years, but I'm a member of the NetBeans User Group.
I first worked with NetBeans, or "Forte for Java" in 2000, I guess, but I didn't like it too much. Back then, I thought a text editor is all one needs as a Java developer. Later, I used JBuilder for some years. NetBeans 4.1 got my attention again in 2005, when I started looking for a new rich-client platform for our software. I watched the progress and when module development got really simple with 5.0, I slowly started to migrate to NetBeans, which is now the IDE I use most.
The hype around Matisse attracted many new developers last year, and deservedly so. I like the IDE in general and the fact that the NetBeans team seems to be pretty enthusiastic about their product. The editor in the current version is a bit slow, but NetBeans is gaining on that too, and the NetBeans 6.0 Milestone releases look very promising. What I'm really looking forward to is the integration of David Kaspar's Visual Library. I used it to create the visual part of Jarvis. It's the kind of tool that makes you actively search for problems where you can apply it.
I like the NetBeans Platform in general. When I started working with it, I discovered much more functionality to reuse than I would ever have expected. On the downside, I don't like the BPEL support, because there is no support for adding Java code, and although the designer looks neat, it is too slow for working with larger workflows. It would be a good idea to use David Kaspar's Visual Library for this.
We wanted to add reports to our applications, and we wanted our users to be able to design their own reports. I searched for what is readily available first, but the only software that is close enough to what I needed is iReports, which is GPLed. So I decided to implement something similar myself, but with a tight integration into the IDE.
The JasperReports Visual Designer (Jarvis) is a NetBeans module for the JasperReports reporting engine. The project aims to provide complete support for the design and execution of report templates. Among the supported features are:
JasperReports template file type support
Integration of the JasperReports viewers as TopComponents (preview, and jasperprint viewer)
Multiview editor for report design
XML text editor
Design view for visually editing the report layout
Editable PropertySheets for all Report Elements
Drag & Drop palette for charts, parameters, fields, variables, text and graphic elements
Add custom parameters, fields, variables to the palette
Configuration of datasources (in progress)
Actions for the execution of reports
Advanced property editors for report elements (in progress)
User defined element templates
First we need to make Jarvis really useful for developers and expert users who know how JasperReports work. An expert user needs to be able to design, test and execute his reports in the Visual Designer, and a Java developer needs support for using the reports from Java code. The main thing that is missing for that part are property sheets for the charts and some Java templates for the execution of reports. In the next step, I want to simplify the design of reports for end users. The plan is to add templates for standard reporting tasks like showing a table or a chart, and wizards to configure them, so a user doesn't have to know anything about how JasperReports works.
You wouldn't want to add it to your rich-client application, but I think it is quite useful for developers already. If you have a report design, you can open it in the IDE and work on it with the visual designer or the XML view. Jarvis also reads the iReports format, so you can import your JDBC data sources. Thanks to Geertjan, there is a predefined library with all the JARs you need for executing the report. Jarvis uses the IDE's Database Explorer to get hold of available database connections and you can execute your reports with them. If you want to design a report from scratch, you will still have to use the XML view a lot, but it works. So, yes, I think you could use it as it is. I'll soon add an update center to the Jarvis project page, with an official pre-release to make it easier to try it.
Jarvis works with NetBeans 5.5. Right now you will need to register at dev.java.net and request the Observer role to check out the project from the project's CVS. After checking out the Jarvis module suite and opening it as a project, you should be able to build and run the module.
Not only code, but also bug reports, tutorials and articles are highly appreciated. Right now we are two active developers working on the project. Tanja Drüke, who also works for Genomatix, has recently joined the project. She is working on the datasource integration and the advanced property sheets. If you want to contribute code, there are lots of places where you can start. Here is a list of tasks where a developer could step in:
You will need to register at dev.java.net and request the Observer role in the project. Please start contributing by writing bug reports, and joining the discussions in the mailing lists. If you would like to request the Developer role, please contact me at firstname.lastname@example.org first.
We have just begun to port two of our applications, BiblioSphere and ChipInspector, to the NetBeans Platform. Besides that, I've got plans for some additional open source modules:
It's very easy to get started using the project templates and there are tons of good tutorials and demos out there. What I was missing, when I started, was a comprehensive book on the platform. So it's really good to know that there is a book underway that covers this topic.
For my schema2beans module I needed a package chooser to decide where the beans should be generated.
It's very easy to get this from the Java Project Support API:
Project p = FileOwnerQuery.getOwner(fileObject); Sources sources = ProjectUtils.getSources(p); SourceGroup groups = sources.getSourceGroups(JavaProjectConstants.SOURCES_TYPE_JAVA); private ComboBoxModel comboBoxModel = PackageView.createListView(sourceGroups); JComboBox packageComboBox = new javax.swing.JComboBox(); packageComboBox.setRenderer(PackageView.listRenderer()); packageComboBox.setModel(comboBoxModel); //..... do something with it packageComboBox.getEditor().getItem().toString();// get the selected package
If you look at the sources, there are lots of APIs that I think should be public. There is, e.g., no standard way to add something to the layer.xml programmatically. But there are non-public APIs hidden to us developers that could be used for that. I know it's a hard road until an API goes public, but this one would help. It would also be great if the Database Explorer API would offer many more features, because this is an API that will be used in many module projects. For starters, better drag & drop support and the possibility to listen for connection state changes would be nice. The most important improvement to me is that the Visual Library will be part of NetBeans. That will definitely boost module development for NetBeans.
About four years ago I had to write my own rich-client platform with an application launcher, splash screen, update and download managers, preferences, proxy handling and so on. With the NetBeans Platform all that stuff is there for free. And there is so much more like the Window system, the Lookup API, Projects, the FileSystems API, Wizards, you name it. Working with the NetBeans Platform really speeds up development for rich-client platform applications. There is a steep learning curve, but once you get the main principles, it's just fun to work with.
Keep up the good work!