[JavaEE] JSF Tag-Library zum Darstellen von BigData

Es ist heutzutage eine Herausforderung (wirklich) große Datenmengen (BigData) in ansehnlicher Form (neudeutsch “management-tauglich”) darzustellen. Ein toller Lösungsansatz die JavaScript-Bibliothek D3.js die die Transformation von XML, JSON & Co in SVG-Grafiken vornimmt. Da mir die Gestaltung eines sauberen Backends immer besser gelingt, wenn ich zu JavaEE greife, habe ich beschlossen, eine entsprechende JSF-Tag-Library zu schreiben, die das Darstellen von verschiedenen Diagrammen vereinfacht.

Bisher habe ich lediglich 2 Komponenten erstellt, nämlich das BulletChart das man in der Grafik oben sieht, und das BubbleChart unten. Im Listing unten ist zu sehen, dass das Einbinden eines solchen Charts mehr als simpel ist.

1
2
3
4
<h:body>
		<j:bulletChart bulletChartData="#{testBB.bulletChartInput}" width="400" height="50"/>
		<j:bubbleChart bubbleChartData="#{testBB.bubbleChartInput}" diameter="500" />
</h:body>

Gefüttert werden die beiden Tags durch eigene Datentypen die extra für eine einfache Handhabung der Bibliothek erstellt wurden. Das Erzeugung des Datensatzes sieht für das BubbleChart etwa so aus:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
	public BubbleChartInput getBubbleChartInput() {
		BubbleChartInput bci1 = new BubbleChartInput("cluster");
 
		BubbleChartInput bci2 = new BubbleChartInput("Wert1"); bci2.setSize(3983); 
		BubbleChartInput bci3 = new BubbleChartInput("Wert2"); bci3.setSize(3812);
		BubbleChartInput bci4 = new BubbleChartInput("Wert3"); bci4.setSize(6714);
		BubbleChartInput bci5 = new BubbleChartInput("Wert4"); bci5.setSize(743);
 
		bci1.getChildren().add(bci2);
		bci1.getChildren().add(bci3);
		bci1.getChildren().add(bci4);
		bci1.getChildren().add(bci5);
 
		return bci1;
	}

Bei genügend Resonanz, werde ich die Komponenten als JAR zur Verfügung stellen.
 

2 thoughts on “[JavaEE] JSF Tag-Library zum Darstellen von BigData”

  1. the JSF component looks really nice !. Is there any way to get the code so I can implement another d3 graph ? also as open source. 😉

    in advance thanks for your cooperation,

    — Miguel

  2. Hi Miguel,
    thanks for your message. I’m developing an entire set of components for my master thesis which is planned to be finished in august. Then I’ll provide the graphs as open source library but until I’m done, I can’t publish any code 😉 Did you do anything in that area so far?

Leave a Reply to admin Cancel reply

Your email address will not be published. Required fields are marked *