GWT Drag and Drop
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Freitag, Januar 29, 2010.Das Projekt unter http://code.google.com/p/gwt-dnd/ gehört mit den zu den bekanntesten Drag & Drop Bibliotheken für GWT. Die von Fred Allen-Sauer geschriebene Bibliothek ist ordentlich mit Beispielen hinterlegt, sodass der Einstieg einfach ist. Ein kleines Beispiel soll die Bibliothek demonstrieren.
a) Nach dem Einbinden der Jar-Datei ist in der XML-Datei für GWT folgendes einzutragen:
<inherits name='com.allen_sauer.gwt.dnd.gwt-dnd'/>
b) Von http://code.google.com/p/gwt-dnd/source/browse/trunk/DragDrop/war/DragDropDemo.css sind die Einträge beginnend mit demo-FlexTableRowExample in die eigene CSS-Datei mit aufzunehmen (nicht alle Einträge sind nötig)
c) Aus http://code.google.com/p/gwt-dnd/source/browse/trunk/DragDrop/#DragDrop/war/images nimmt man die Grafik row-dragger-8.gif passend etwa in das WEB-INF/images mit auf und schaut auf den URL-Eintrag in der CSS, dass der Pfad passt.
c) Von http://code.google.com/p/gwt-dnd/source/browse/trunk/DragDrop/#DragDrop/demo/com/allen_sauer/gwt/dnd/demo/client/example/flextable kopiert man die Dateien
- FlexTableRowDragController
- FlexTableRowDropController
- FlexTableUtil
in das eigene GWT-Projekt.
In onModuleLoad() kann es dann so aussehen:
AbsolutePanel panel = new AbsolutePanel();
panel.setPixelSize(450, 300);
panel.addStyleName("demo-FlexTableRowExample");
FlexTableRowDragController dragController = new FlexTableRowDragController( panel );
FlexTable table = new FlexTable();
table.addStyleName( "demo-flextable" );
HTML handle1 = new HTML( "<b>Heinzelmann</b> (100 €)" );
handle1.addStyleName( "demo-drag-handle" );
table.setWidget( 0, 0, handle1 );
dragController.makeDraggable( handle1 );
HTML handle2 = new HTML( "<b>Wumme</b> (200 €)" );
handle2.addStyleName( "demo-drag-handle" );
table.setWidget( 1, 0, handle2 );
dragController.makeDraggable( handle2 );
HTML handle3 = new HTML( "<b>Fred</b> (90 €)" );
handle3.addStyleName( "demo-drag-handle" );
table.setWidget( 2, 0, handle3 );
dragController.makeDraggable( handle3 );
panel.add(table, 10, 20);
FlexTableRowDropController dropController = new FlexTableRowDropController(table);
dragController.registerDropController(dropController);
RootPanel.get().add( panel );
Anschließend haben wir eine Webseite mit
Heinzelmann (100 €)
Wumme (200 €)
Fred (90 €)
wobei wir die 3 Einträge in der Reihenfolge verschieben können.
Labels: GWT, Open Source
Groovy 1.7 und Groovy Eclipse 2.0
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Mittwoch, Januar 20, 2010.Ein paar Tage ist es schon her, da wurde Groovy 1.7 veröffentlicht. Die Neuerungen gibt es unter http://docs.codehaus.org/display/GROOVY/Groovy+1.7+release+notes. Im Wesentlichen sind es die Unterstützung von geschachtelten und anonymen inneren Klassen, ein paar AST-Sachen.
Ganz frisch ist nun das Update der Groovy IDE auf Eclipse Basis. Die Version 2.0 ist fertig und ist nahezu ein vollständiger rewrite. Die News listet http://docs.codehaus.org/display/GROOVY/Groovy-Eclipse+2.0.0+New+and+Noteworthy auf. Weiterhin mit bunten Bildern:
- Groovy-Eclipse 2.0.0M1 New and Noteworthy
- Groovy-Eclipse 2.0.0M2 New and Noteworthy
- Groovy-Eclipse 2.0.0RC1 New and Noteworthy
Labels: Open Source
Ant 1.8.0RC1 ist auf dem Weg
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Dienstag, Januar 19, 2010.Ant 1.7 gibt’s ja schon gefühlte ewige Zeit und bei Ant, dem make des 2.0 Zeitalters, steht ein Update ein. Nichts großes, sondern eher Detailverbesserungen:
Apache Ant 1.8.0RC1 is now available for download .
- a new top level element extension-point allows build files to be extended with custom targets more easily
- if and unless attributes will be evaluated according to the values of the properties entered if these properties evaluate to true, false, on, off
- Ant now requires Java 1.4 or later
- new task include provides an alternative to <import> that should be preferred when you don't want to override any targets
- numerous bug fixes and improvements as documented in Bugzilla and in WHATSNEW
While in open source projects a final release date strongly depends on the free time of the volunteers/committers, the final release is expected one to two months maximum after this RC. So Ant 1.8.0 is expected between mid February and mid March 2010.
Labels: Open Source
Google Collections Library 1.0 ist raus und bald nicht mehr eigenständig
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Freitag, Januar 01, 2010.
Labels: Open Source
Von http://www.netbeans.com/ gibt es eine neue Version, die insbesondere im Bereich des neuen Java EE 6 punktet. Die Neuigkeiten führt http://wiki.netbeans.org/NewAndNoteworthyNB68 auf.
Labels: Entwicklungsumgebung, Open Source
Google App Engine 1.3
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Mittwoch, Dezember 16, 2009.Kurz nach 1.2.8 veröffentlich Google nun die Google App Engine 1.3. Von http://googleappengine.blogspot.com/2009/12/app-engine-sdk-130-released-including.html:
Store and Serve - Files can be uploaded and stored as blobs, to be served later in response to user requests. Developers can build their own organizational structures and access controls on top of blobs.
Pricing and Quotas - We include blob storage and transfer under the same datastore pricing and quotas you're already familiar with. For more information, see the App Engine quotas page.
The new Blobstore API is now available in both App Engine SDKs for local development. At this time it can only be used by applications that have enabled billing. There's a lot more information about the API and how it works in the Blobstore documentation (Python, Java) so please check that out and post any questions to the groups.
This release also includes some performance tweaks to the Java runtime. For example, we've sped up many reflective operations by up to 10x resulting in improvements on the order of 10% for applications based on dynamic languages. As always, there are a few other minor changes and bug fixes in this release, so make sure to read our release notes (Python, Java).
Labels: GWT, Open Source, Web Frameworks
GlassFish v3 und Java EE 6 freigegeben
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Freitag, Dezember 11, 2009.Unter http://www.theserverside.com/news/thread.tss?thread_id=58858 ist heute zu lesen:
Sun has released the Java Platform Enterprise Edition 6and the GlassFish Enterprise Server v3.
Java EE 6 includes new specifications that add new functionality to the platform, like dependency injection, Bean Valiation and RESTful services, as well as improvements to the existing specifications including very significant improvements to Java Server Faces, Enterprise Java Beans, JPA, Servlets and Java Connectors. Java EE 6 also includes a Web Profile. Additional information on Java EE 6 is available from the WebSite and this Overview Article.
The GlassFish v3 Server implements the Java EE 6 specification. GlassFish v3 is Open Source and fully modular, built on an OSGi kernel and the Grizzly NIO infrastructure. GlassFish v3 is suitable for a wide range of applications, from development to deployments. The long list of additional GFv3 features includes embeddability, very fast startup, redeploy-on-save, session state persistence, dynamic language support, management and monitoring facilities, graphical, CLI and REST command interfaces, and an update center. GlassFish v3 is supported by NetBeans, Eclipse and IntelliJ IDEA.
Additional information on GlassFish v3 Server is available from the Product Page and our main Team Announcement. GFv3 can be downloaded here; the full version is 70MB and the Web Profile 50MB.
Labels: Java EE, Open Source
App Engine Java SDK 1.2.8 aktualisiert
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Dienstag, Dezember 08, 2009.Von der http://code.google.com/p/googleappengine/ gibt’s eine neue Version. Die Neuerungen in kürze:
- Support for JAXB. JAXB is included in JDK 1.6 (and App Engine's production servers). If you're using JDK 1.5 with your local dev_appserver, you will need to include the JAXB libraries with your application to use it.
- New support for application pre-compilation to reduce the length of loading requests. To enable pre-compilation on your application, add this flag to your appengine-web.xml:
- <precompilation-enabled>true</precompilation-enabled>
- If you have trouble deploying your application, you should remove this flag or set it to false.
- Added Quota API (com.google.appengine.api.quota) to match Python
- Low-level Memcache API now supports incrementAll()
- HTTPResponse object now has getFinalUrl() method for 302 redirects.
- Java Dev Appserver now automatically executes tasks. If you prefer the old behavior where tasks do not automatically execute you can use the --jvm_flag=-Dtask_queue.disable_auto_task_execution flag when starting the server.
- Additional file extensions permitted when sending mail.
- Fixed issue with Java mail handler not processing multipart messages correctly
- Fixed agent code included in appengine-local-runtime.jar results in RuntimeException
- Fixed issue with sort orders defined on properties that allow multiple values
- Fixed problem with dropped query strings after requiring log-in
- Removed limitation preventing multiple parameters with the same name
- Fixed issue with local datastore incorrectly sorting results of ancestor queries
Labels: Open Source
Neu: Release 5.0
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Dienstag, Dezember 08, 2009.Vom Quellcode-Checker Checkstyle gibt es eine neue Version 5. Die Änderungen beschreiben die Seite http://checkstyle.sourceforge.net/releasenotes.html.
The following checks were added since release 4.4:
- AnnotationUseStyle
- MissingDeprecated
- MissingOverride
- PackageAnnotation
- SuppressWarnings
- EqualsAvoidNull
- NoClone
- NoFinalizer
- AvoidStaticImport
- JavadocPackage
- ClassTypeParameterName
- MethodTypeParameterName
- RegexpMultiline
- RegexpSingleline
- RegexpSinglelineJava
- OuterTypeNumber
- FileTabCharacter
- GenericWhitespace
Labels: Open Source
JUnit 4.8 freigegeben
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Mittwoch, Dezember 02, 2009.Die Infos gibt es unter http://kentbeck.github.com/junit/doc/ReleaseNotes4.8.html. Die Änderungen halten sich in Grenzen:
Summary of Changes in version 4.8
Categories
From a given set of test classes, the
Categoriesrunner runs only the classes and methods that are annotated with either the category given with the@IncludeCategoryannotation, or a subtype of that category. Either classes or interfaces can be used as categories. Subtyping works, so if you say@IncludeCategory(SuperClass.class), a test marked@Category({SubClass.class})will be run.You can also exclude categories by using the
@ExcludeCategoryannotationExample:
public interface FastTests { /* category marker */ }
public interface SlowTests { /* category marker */ }
public static class A {
@Test
public void a() {
fail();
}
@Category(SlowTests.class)
@Test
public void b() {
}
}
@Category({SlowTests.class, FastTests.class})
public static class B {
@Test
public void c() {
}
}
@RunWith(Categories.class)
@IncludeCategory(SlowTests.class)
@SuiteClasses( { A.class, B.class }) // Note that Categories is a kind of Suite
public static class SlowTestSuite {
// Will run A.b and B.c, but not A.a
}
@RunWith(Categories.class)
@IncludeCategory(SlowTests.class)
@ExcludeCategory(FastTests.class)
@SuiteClasses( { A.class, B.class }) // Note that Categories is a kind of Suite
public static class SlowTestSuite {
// Will run A.b, but not A.a or B.c
}Bug fixes
- github#16: thread safety of Result counting
Labels: Open Source
Update von Swing Look and Feel Synthetica V2.9 – tolle Screenshots
2 Kommentar(e). Veröffentlicht von Christian Ullenboom am Sonntag, November 22, 2009.Die Version 2.9 verbesser der Aussehen insbesondere bei den neuen Java 6 Updates. Infos gibt http://weblogs.java.net/blog/wzberger/archive/2009/11/22/synthetica-blackeye-highlights.



![]()
![]()



Labels: Open Source, Swing
GWT 2.0 RC1 ist raus, Updates beim Google Eclipse Plugin
1 Kommentar(e). Veröffentlicht von Christian Ullenboom am Mittwoch, November 18, 2009.Infos dazu hier: http://code.google.com/p/google-web-toolkit/wiki/GWT_2_0_RC.
Major New Features in the GWT SDK
- In-Browser Development Mode
- Prior to 2.0, GWT hosted mode provided a special-purpose "hosted browser" to debug your GWT code. In 2.0, the web page being debugged is viewed within a regular-old browser. Development mode is supported through the use of a native-code plugin called the "Google Web Toolkit Developer Plugin" for many popular browsers. In other words, you can use development mode directly from Safari, Firefox, IE, and Chrome.
- Developer-guided Code Splitting
- Code splitting using GWT.runAsync(), along with compile reports (also known as The Story of Your Compile) allows you to chunk your GWT code into multiple fragments for faster startup. Imagine having to download a whole movie before being able to watch it. Well, that's what you have to do with most Ajax apps these days -- download the whole thing before using it. With code splitting, you can arrange to load just the minimum script needed to get the application running and the user interacting, while the rest of the app is downloaded as needed.
- Declarative User Interfaces with UiBinder
- GWT's UiBinder now allows you to create user interfaces mostly declaratively. Previously, widgets had to be created and assembled programmatically, requiring lots of code. Now, you can use XML to declare your UI, making the code more readable, easier to maintain, and faster to develop. The Mail sample has been updated to show a practical example of using UiBinder.
- Bundling of Resources via ClientBundle
- GWT introduced ImageBundle in 1.4 to provide automatic spriting of images. ClientBundle generalizes this technique, bringing the power of combining and optimizing resources into one download to things like text files, CSS, and XML. This means fewer network round trips, which in turn can decrease application latency -- especially on mobile applications.
- Simplified Unit Testing with HtmlUnit
- Using HtmlUnit for running test cases based on GWTTestCase: Prior to 2.0, GWTTestCase relied on SWT and native code versions of actual browsers to run unit tests. As a result, running unit tests required starting an actual browser. As of 2.0, GWTTestCase no longer uses SWT or native code. Instead, it uses HtmlUnit as the built-in browser. Because HtmlUnit is written entirely in the Java language, there is no longer any native code involved in typical test-driven development. Debugging GWT Tests in development mode can be done entirely in a Java debugger.
Major New Features in the Google Plugin for Eclipse
- Development Mode Launch View
- Integrates your Development Mode logs right into Eclipse, which means one less window to shuffle around
- UiBinder Support
- The UiBinder template editor provides auto-completion and formatting for editing ui.xml files (and embedded CSS blocks)
Validation of UiBinder templates and backing Java classes
New UiBinder wizard to quickly get started- ClientBundle Support
- "New ClientBundle" wizard to bundle CSS and other resources together to minimize HTTP round-trips
As-you-type validation ensures that your app's static resources are always in the right place- RPC Refactoring
- Automatically updates sync/async pairs of RPC interfaces and their methods
- JNSI Reference Auto-completion
- Auto-completion takes the pain out of referencing Java members from JSNI methods
Labels: GWT, Open Source
Java-Ribbon Komponente Flamingo 4.2 ist raus
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Dienstag, November 03, 2009.- Support for placing small command buttons in ribbon galleries
- Option to specify the callback for populating the default content of ribbon application menu
- Command buttons support no icon / no text mode
- Emitting full bounding box coordinates in SVG transcoder
- Support for changing the expand listener of ribbon bands
- Better tracing of inconsistent ribbon resize policies
Mehr Infos gibt es unter https://flamingo.dev.java.net/.
Mit dem Substance LaF sieht das hervorragend aus.
Labels: Open Source, Swing
Hibernate Validator 4 ist fertige RI von JSR-303 Bean Validation
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Donnerstag, Oktober 15, 2009.- Doku ist hier: http://docs.jboss.org/hibernate/stable/validator/reference/en/html_single/
- Download unter https://www.hibernate.org/6.html
- Die JSR-Seite: http://jcp.org/en/jsr/detail?id=303
Labels: Open Source
GWT-Bibliotheken
2 Kommentar(e). Veröffentlicht von Christian Ullenboom am Donnerstag, Oktober 15, 2009.http://code.google.com/p/kiyaa/. Leistungsfähiges XHTML-Template Framework. Bis zum Google UI-Binder ist a) noch Zeit und b) nutzt Kiyaa einfaches XHTML, was man mit jedem HTML-Editor editieren auf aufbauen kann.
http://code.google.com/p/gwt-mosaic/. “GWT Mosaic is a highly usable, feature rich toolkit for creating Rich Internet Applications and an easy to use API.” http://69.20.122.77/gwt-mosaic/Showcase.html
http://code.google.com/p/cobogw/. In erster Linie Buttons, Button-Gruppen, runde Panels, Rating-Widget. Demo. Weiterhin “GWT emulation of java.sql”, also von Date, Time, Timestamp
http://www.asquare.net/gwttk/. Demo. Seit 2007 kein neues Release
http://code.google.com/p/gwtlib/. MenuBar, PagingBar, Table, PagingTable und StyleListBox. Table hat Renderer. Aktuell
http://code.google.com/p/gwt-masterview/. “GWT-Masterview library is an extension to Google Web Toolkit that provides widgets to filter, sort and paginate your data”
http://code.google.com/p/gwtchismes/. Demo. Rendert nicht ganz sauber die Buttons
http://code.google.com/p/gwt-beans-binding/
http://code.google.com/p/gwt-table/
http://code.google.com/p/gwt-datepicker/
http://code.google.com/p/guwit/
http://gwt-widget.sourceforge.net/. Besteht aus GWT Server Library (GWT-SL) und GWT Widget Library (GWT-WL). http://gwt-widget.sourceforge.net/demo/calc/index.html zeigt einen kleinen Taschenrechner, kann mal praktisch sein… (bin ich zynisch?) Der letzte Blog-Eintrag endete vor exakt 3 Jahren.
http://gwt-vl.sourceforge.net/. GWT Validation Library
http://raibledesigns.com/rd/entry/creating_a_facebook_style_autocomplete
Noch mehr: http://google.wikia.com/wiki/Google_Web_Toolkit#Widgets
Fehlt was?
Labels: GWT, Open Source
guava-libraries -- Guava: Google Core Libraries for Java
2 Kommentar(e). Veröffentlicht von Christian Ullenboom am Mittwoch, Oktober 14, 2009.| com.google.common.base | |
| com.google.common.io | |
| com.google.common.primitives | |
| com.google.common.util.concurrent |
Mir gefällt besonders gut, das moderne API-Design. Ein Blick ist es wert! Die Doku gibt es unter http://guava-libraries.googlecode.com/svn/trunk/javadoc/index.html. Die Folien versprechen auch eine Unterstützdung von GWT -- das wäre wirklich interessant.
Labels: Open Source
Labels: Android, Open Source
Google App Engine SDK 1.2.5
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Donnerstag, September 10, 2009.Das Update bringt interessante Neuerungen. Dazu zählen XMPP-Unterstützung. http://code.google.com/intl/de/appengine/docs/java/xmpp/:
An App Engine application can send and receive instant messages to and from any XMPP-compatible instant messaging service, such as Google Talk. An app can send and receive chat messages, send chat invites, and request status information. Incoming XMPP messages are handled by request handlers, similar to web requests.
Für Python gab es schon eine API für Aufgaben, die offline abgearbeitet werden konnten. Das gibt es es nun auch für Java, http://code.google.com/intl/de/appengine/docs/java/taskqueue/overview.html.
With the Task Queue API, applications can perform work outside of a user request but initiated by a user request. If an app needs to execute some background work, it may use the Task Queue API to organize that work into small, discrete units, called Tasks. The app then inserts these Tasks into one or more Queues. App Engine automatically detects new Tasks and executes them when system resources permit.
Labels: Open Source, Web Frameworks
Update von Findbugs auf 1.3.9
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Donnerstag, September 10, 2009.Findbugs http://findbugs.sourceforge.net/ hat die Versionsnummer erhöht und unter anderem neue Detektoren aufgenommen. Von der Webseite:
- New bug patterns; in some cases, bugs previous reported as other bug patterns are reported as instances of these new bug patterns in order to make it easier for developers to understand the bug reports
- BC_IMPOSSIBLE_DOWNCAST
- BC_IMPOSSIBLE_DOWNCAST_OF_TOARRAY
- EC_INCOMPATIBLE_ARRAY_COMPARE
- JLM_JSR166_UTILCONCURRENT_MONITORENTER
- LG_LOST_LOGGER_DUE_TO_WEAK_REFERENCE
- NP_CLOSING_NULL
- RC_REF_COMPARISON_BAD_PRACTICE
- RC_REF_COMPARISON_BAD_PRACTICE_BOOLEAN
- RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED
- SIC_THREADLOCAL_DEADLY_EMBRACE
- UR_UNINIT_READ_CALLED_FROM_SUPER_CONSTRUCTOR
- VA_FORMAT_STRING_EXPECTED_MESSAGE_FORMAT_SUPPLIED
- Providing a bug rank (1-20), and the ability to filter by bug rank. Eventually, it will be possible to specify your own rules for ranking bugs, but the procedure for doing so hasn't been specified yet.
- Fixed about 45 bugs filed through SourceForge
- Various reclassifications and priority tweaks
- Added more bug annotations to a variety of bug reports. This provides more context for understanding bug reports (e.g., if the value in question was is the return value of a method, the method is described as the source of the value in a bug annotation). This also provide more accurate tracking of issues across versions of the code being analyzed, but has the downside that when comparing results from FindBugs 1.3.8 and FindBugs 1.3.9 on the same version of code being analyzed, FindBugs may think that mistakenly believe that the issue reported by 1.3.8 was fixed and a new issue was introduced that was reported by FindBugs 1.3.9. While annoying, it would be unusual for more than a dozen issues per million lines of codes to be mistracked.
Labels: Open Source
Beta 1 von Hibernate 3.5 mit JPA 2.0
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Donnerstag, August 27, 2009.Steve Ebersole schreibt auf seinem Blog http://in.relation.to/12153.lace dazu:
This is the first release towards supporting JPA 2. Most of the APIs are implemented. Some know limitations for this beta include:
- Some of the 'metamodel' APIs are still unimplemented, specifically differentiating between declared attributes and attributes (same wording as java.lang.reflect). The getDeclaredXYZ methods simply return null in this release.
- 'criteria' query building is fully implemented aside from defining subquery correlations, to the best of my knowledge and current state of the spec. However, compiling criteria queries is unimplemented scheduled for the next release.
Additionally, initial support for
fetch profileshas been added in this release. Currently only join-fetching is supported as a strategy in fetch profiles.The artifacts have all been published to the JBoss Maven repository. Additionally the release bundles have been uploaded to SourceForge.
This is also the first version bundling annotations, entitymanager and envers together with the other core modules. Moving forward all will be versioned and released together.
Labels: Open Source
VMware kauft SpringSource
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Mittwoch, August 12, 2009.Together, VMware and SpringSource plan to further innovate and develop integrated Platform as a Service (PaaS) solutions that can be hosted at customer datacenters or at cloud service providers. These solutions will allow customers to rapidly build new enterprise and web applications and run and manage these applications in the same dynamic, scalable and cost-efficient vSphere-based internal or external clouds that can also host and manage their existing applications, providing an evolutionary path to the future.
Labels: Open Source
Trident ist eine neue und sehr flexible Animationslibrary, die die Version 1.0 erblickt. Grouchnikov’sBlog-Eintrag erklärt dazu mehr.
Labels: Open Source
EventBus Version 1.3
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Dienstag, Juli 14, 2009.Seit einem Monat gibt es EventBus 1.3. Die Webseite spricht im Wesentlichen von zwei Neuigkeiten:
Mein Blog-Eintrag und Folien stellen das nette Projekt vor:
- http://www.tutego.com/blog/javainsel/2009/03/einfuhrung-in-den-eventbus.html
- http://www.slideshare.net/tutego/einfhrung-in-den-eventbus?type=powerpoint
Labels: Open Source
Vergleich von HTML-Dateien mit Daisy Diff
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Dienstag, Juli 14, 2009.In meiner Seminarverwaltungssoftware können Trainer die Seminarbeschreibungen ändern. Natürlich möchte ich mitbekommen, welche Stellen geändert wurden und das am Liebsten hübsches aufbereitet. Da bin ich auf http://code.google.com/p/daisydiff/ gestoßen. Man kann entweder über die Kommandozeile arbeiten oder mit einer Hilfsklasse, wobei zwei Klassen einen ersten Anhaltspunkt für die API geben:
- http://code.google.com/p/daisydiff/source/browse/trunk/daisydiff/src/java/org/outerj/daisy/diff/Main.java
- http://code.google.com/p/daisydiff/source/browse/trunk/daisydiff/src/java/org/outerj/daisy/diff/DaisyDiff.java
Ein kleines Beispiel soll das Diff in HTML-Form in den Temp-Ordner C:\Users\CHRIST~1\AppData\Local\Temp\ schreiben:
package com.tutego.traida;
import java.awt.Desktop;
import java.io.File;
import java.io.FileWriter;
import org.outerj.daisy.diff.Main;
public class DaisyDiffDemo
{
public static void main( String[] args ) throws Exception
{
String html1 = "Eine zwei Polizei";
String html2 = "Eins zwei drei Polizei";
File fileIn = File.createTempFile( "daisyin", ".html" );
File fileOut = File.createTempFile( "daisyout", ".html" );
File fileDiff = File.createTempFile( "daisydiff", ".html" );
new FileWriter( fileIn ).append( html1 ).close();
new FileWriter( fileOut ).append( html2 ).close();
String[] daisyDiffArgs = {
fileIn.getAbsolutePath(), fileOut.getAbsolutePath(), "--file="+fileDiff.getAbsolutePath()
};
Main.main( daisyDiffArgs );
fileIn.deleteOnExit();
fileOut.deleteOnExit();
Desktop.getDesktop().open( fileDiff );
}
}
Das generierte HTML greift auf allerlei Zeugs zurück. Damit die HTML-Datei gut angezeigt wird, einfach aus dem Zip die Order css, images und js in das temp-Verzeichnis C:\Users\CHRIST~1\AppData\Local\Temp kopieren. Dann sieht das Ergebnis so aus:

Labels: Open Source
Mit GPL-Tools von COBOL nach Java migrieren
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Samstag, Juli 04, 2009.Auf Jazoon09 (Präsentation: http://docs.google.com/Present?docid=dcc9m6z9_1524fzspccfp) wurde ein Projekt vorgestellt, wie 4 Millionen Zeilen COBOL erfolgreich nach Java konvertiert werden konnten. (infoQ http://www.infoq.com/news/2009/07/cobol-to-java hat die Links). Im Zentrum der Konvertierung steht der Konverter (83.000 Quellcodezeilen, fast 700 Klassen), das zusammen mit der Laufzeitbibliotheken (153k Zeilen, fast 900 Klassen) auf COBOL-Programme übersetzt und ausführt. Die COBOL-Masken werden in HTML übersetzt.
Die GPL-Projekte sind unter http://code.google.com/p/naca/ zu finden (aber nicht im Source als SVN).
Labels: Open Source
Welches Projekt wird von Maven wie oft referenziert?
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Donnerstag, Juli 02, 2009.- das HSQLDB doch noch so oft (für Tests) gebraucht wird, aber Derby noch auf die erste Seite kommt,
- Spring (schon) so weit oben seht,
- CXF vor Axis und dem alten XFire steht,
- JAXB so groß im Einsatz ist,
- Plexus von CodeHaus in der Liste auf der ersten Seite steht (unter anderem von Maven2 genutztes IoC-Framwork und daher wohl so weit vorne),
- dom4j populärer als JDOM ist,
- Struts ist (ein wenig) wichtiger als WebWork aber weit abgeschlagen von JSF.
- http://classworlds.codehaus.org/
- http://qdox.codehaus.org/
- http://www.janino.net/
Labels: Open Source
JavaDoc in Wiki-Notation statt HTML
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Donnerstag, Juli 02, 2009.Das ist das Ziel vom http://code.google.com/p/markdown-doclet/. Mit der Syntax von http://daringfireball.net/projects/markdown/syntax und zusammen mit leicht optimiertem CSS und kleinen UML-Diagrammen für die Hierarchien, folgt:
Labels: Open Source
JaQue Version 1.5: MS LINQ Expression Trees für Java
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Donnerstag, Juni 11, 2009.Von der Webseite:
JaQue provides an infrastructure for Microsoft LINQ like capabilities on Java platform. Using ASM, JaQue builds expression trees, which are used to build a query in domain specific technology or language, such as SQL. This way Java developers can focus on writing application logic in the language they know - Java, regardless what the underlying technology or language is in use. JaQue to Objects and JaQue to XML are currently supported and JaQue to JPA is under development.
Ein Beispiel macht das praktisch deutlich:
EntityManagerFactory emf = Persistence.createEntityManagerFactory("hibernate");
EntityManager em = emf.createEntityManager();
JaqueEntityManager jem = new JaqueEntityManager(em);
Queryable<Order> orders = jem.from(Order.class);
System.out.println(count(where(new Predicate<Order>() {
public Boolean invoke(Order t) throws Throwable {
return t.getOrderID() > 11000;
}
}, orders)));Wie bei LINQ soll eine eine API für die verschiedenen Datenquellen geben, also XML, Objekte, Datenbanken, … Für JPA schreibt die Seite “Currently it's able to perform only simple SELECTs, JOINs and AGGREGATEs”. Das ist natürlich nicht viel. Insofern ist diese Lösung WEIT von den LINQ to SQL-Möglichkeiten entfernt.
Der Hinweis der Webseite auf “Interoperability with Java Closures” ist natürlich hinfällig. Dadurch, dass Closures aber wegfallen, wird die ganze API viel aufgeblähter, als wenn man Closures hätte. Die Scala-Variante ist daher auch viel kürzer.
PS: Die nächsten 2 Wochen gibt es keine Blog-Einträge, da ich ich Afrika bin.
Labels: Open Source
Quaqua Look And Feel. Das bessere Mac OS X LaF
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Donnerstag, Juni 04, 2009.Quaqua ist ein Swing-LaF, was besonders gut an die Apple Human Interface Guidelines ranreicht.
Das Demo läuft auch unter Windows.
Features (von der Webseite):
- (Nearly) Native User Experience
Quaqua user interface delegates closely look and behave like their native counterparts. Complex user interface components, such as JFileChooser and JColorChooser, are close enough to make end users feel comfortable with them. - Blends into OS X Designs
Quaqua supports three OS X designs: Tiger, Panther, Jaguar. Quaqua automatically chooses the right design for the current operating system. - Alternative Styles
Quaqua offers alternative styles for many user interface elements. Such as small styles for most of the components, as well as a striped style for tables, lists and trees. Jaguar-design like tabbed panes with stacking tabs are also supported. - Additional Components
Quaqua provides Swing implementations of NSBrowser and NSSheet (named JBrowser and JSheet). - Clean Layout
Laying out Aqua components with Java is quite challenging. Quaqua provides an API for component alignment based on visual criteria (baseline, visual bounds, preferred gaps). JScrollPane's automatically avoid overlaps with the grow-boxes of windows. - Localized in four languages
Quaqua is localized in the following languages: German, French, Italian and English.
Neben dem LaF für Standardkomponenten gibt es mit JBrowser und JSheet noch zwei “Spezialkomponenten”.
Die Lizenz ist License (LGPL or BSD), und die Doku mit vielen Screenshots. Tolle Arbeit!
Labels: Open Source, Swing
Labels: Open Source
OpenOffice Draw + XForms Export + iText = PDF
3 Kommentar(e). Veröffentlicht von Christian Ullenboom am Montag, Juni 01, 2009.Für unseren Seminarbetrieb erstellen wir nach dem Seminarabschluss aus einer XML-Datei die Rechnung und Zertifikate für den Kunden. Die Vorlagen sind in OpenOffice verfasst und können ohne Probleme verändert werden. Ein großer Vorteil ist weiterhin, dass OO einen PDF Exporter mitbringt.
Der Nachteil der Lösung, OpenOffice für die PDF-Erzeugung fernzusteuern ist, dass es sehr schwergewichtig. OO muss installiert und gestartet werden. Das ist auf einem Server, etwa einem einfachen Servlet-Container oder sogar der Google App Engine for Java natürlich nicht denkbar.
Ein anderer Weg ist daher, zwar weiterhin OpenOffice für die Erstellung einer Vorlage zu verwenden, aber beim PDF-Export anders vorzugehen. Die Lösungen können Acrobat Forms (Acroforms) bieten, also eigentlich interaktive Felder, die man später über ein Programm füllen kann. Im ersten Schritt erzeugt man daher mit OpenOffice Draw eine Formular. (Das wird etwa beschrieben unter http://www.devx.com/opensource/Article/38178/.) Dann exportiert man das Dokument in PDF unter Erhaltung der Formulareigenschaften. Dieses PDF lässt sich nun mit iText auslesen, die Formularzellen füllen und wieder als PDF schreiben. Dabei kann die “Formulareigenschaft” wegfallen, dass man später bei dem PDF-Dokument nichts mehr von interaktiven Elementen sieht.
import java.io.FileOutputStream;
import com.lowagie.text.pdf.*;
public class FillInPdfForm
{
public static void main(String[] args) throws Exception
{
PdfReader reader = new PdfReader("c:/rein.pdf");
PdfStamper stamper = new PdfStamper(reader, new FileOutputStream("c:/raus.pdf"));
BaseFont font = BaseFont.createFont("c:\\windows\\fonts\\Calibri.ttf", BaseFont.CP1252, BaseFont.NOT_EMBEDDED);
AcroFields form = stamper.getAcroFields();
for( Object o : reader.getAcroForm().getFields() )
form.setFieldProperty( ((PRAcroForm.FieldInformation) o).getName(), "textfont", font, null);
form.setField("name", "Christian Ullenboom");
form.setField("content", "Brav sein\nLieb sein");
stamper.setFormFlattening(true);
stamper.close();
}
}
Etwas lästig ist, dass beim Ausfüllen der in OO zugewiesen Font flöten geht. Daher muss man diesen neu zuweisen. Sonst ist es Arial/Helvetica.
Labels: Open Source
Labels: Open Source
Zum Zugriff auf Dokumente und Spreadsheets von OpenOffice ist http://www.jopendocument.org/ eine GPL-Bibliothek, die das mit einer einfachen API unterstützt. Etwa das laden und verändern von Spreadsheets:
File file = new File( "c:/in.ods" );
SpreadSheet createFromFile = SpreadSheet.createFromFile( file );
Sheet sheet = createFromFile.getSheet( 0 );
sheet.setValueAt( "Filling test", 1, 1 );
sheet.getCellAt( "A1" ).setValue( "On site support" );
sheet.getCellAt( "I10" ).setValue( new Date() );
sheet.getCellAt( "F24" ).setValue( 3 );
File outputFile = new File( "c:/out.ods" );
sheet.getSpreadSheet().saveAs( outputFile );
Weitere Beispiele gibt http://www.jopendocument.org/documentation.html.
Interessant ein ein purer Java-Viewer, und damit die Möglichkeit in PDF zu exportieren, ohne dass man OO dazu fernsteuern muss.
Beim Testen der SpreadSheet-API sind mir leider einige Nachteile aufgefallen:
- Es gibt keine Named References
- Die API ist sehr Datei-orientiert. Nur im Speicher Dokumente anzulesen und zu verarbeiten ist nicht möglich. Ich sehe erst einmal keine Methode, wie ein Servlet z.B. sich den InputStream auf ein OO-Dokuments holen und als OutputStream an den Client verschicken kann, ohne dass man vorher das OO-Dokument in eine Datei schreibt.
- Soll der eingebauter Viewer verwendet werden, können TIFF-Bilder nicht angezeigt werden.
- GPL könnte für einige Bereiche ein Problem sein. Es werden aber kommerzielle Lizenzen verkauft.
Labels: Open Source
Texte umbrechen (Word-Wrap)
2 Kommentar(e). Veröffentlicht von Christian Ullenboom am Montag, Mai 25, 2009.import java.text.BreakIterator;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.StringTokenizer;
public class StringUtils
{
/**
* Indent and wrap multi-line strings.
*
* @param original the original string to wrap
* @param width the maximum width of lines
* @param breakIterator algorithm for breaking lines
* @param removeNewLines if <code>true</code>, any newlines in the original string are ignored
* @return the whole string with embedded newlines
*/
public static String wrapAndIndentString( String original, String indent, int width )
{
BreakIterator breakIterator = BreakIterator.getWordInstance();
List<String> lines = wrapStringToArray( original, width, breakIterator, true );
StringBuffer retBuf = new StringBuffer();
for ( String line : lines )
{
retBuf.append( indent );
retBuf.append( line );
retBuf.append( '\n' );
}
return retBuf.toString();
}
/**
* Wrap multi-line strings (and get the individual lines).
*
* @param original the original string to wrap
* @param width the maximum width of lines
* @param breakIterator breaks original to chars, words, sentences, depending on what instance you provide.
* @param removeNewLines if <code>true</code>, any newlines in the original string are ignored
* @return the lines after wrapping
*/
public static List<String> wrapStringToArray( String original, int width,
BreakIterator breakIterator, boolean removeNewLines )
{
if ( original.length() == 0 )
return Arrays.asList( original );
String[] workingSet;
// substitute original newlines with spaces,
// remove newlines from head and tail
if ( removeNewLines )
{
original = original.trim();
original = original.replace( '\n', ' ' );
workingSet = new String[] { original };
}
else
{
StringTokenizer tokens = new StringTokenizer( original, "\n" ); // NOI18N
int len = tokens.countTokens();
workingSet = new String[len];
for ( int i = 0; i < len; i++ )
workingSet[ i ] = tokens.nextToken();
}
if ( width < 1 )
width = 1;
if ( original.length() <= width )
return Arrays.asList( workingSet );
widthcheck :
{
boolean ok = true;
for ( int i = 0; i < workingSet.length; i++ )
{
ok = ok && (workingSet[ i ].length() < width);
if ( !ok )
break widthcheck;
}
return Arrays.asList( workingSet );
}
ArrayList<String> lines = new ArrayList<String>();
int lineStart = 0; // the position of start of currently processed line in
// the original string
for ( int i = 0; i < workingSet.length; i++ )
{
if ( workingSet[ i ].length() < width )
lines.add( workingSet[ i ] );
else
{
breakIterator.setText( workingSet[ i ] );
int nextStart = breakIterator.next();
int prevStart = 0;
do
{
while ( ((nextStart - lineStart) < width) && (nextStart != BreakIterator.DONE) )
{
prevStart = nextStart;
nextStart = breakIterator.next();
}
if ( nextStart == BreakIterator.DONE )
nextStart = prevStart = workingSet[ i ].length();
if ( prevStart == 0 )
prevStart = nextStart;
lines.add( workingSet[ i ].substring( lineStart, prevStart ) );
lineStart = prevStart;
prevStart = 0;
} while ( lineStart < workingSet[ i ].length() );
lineStart = 0;
}
}
return lines;
}
}
Schade nur, dass GWT keinen BreakIterator für die Clientseite emuliert und selbst das Paket http://code.google.com/p/gwtx/ nicht. Schade …
Labels: Open Source
Labels: Open Source
Google Collections 1.0 Release Candidate 1
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Samstag, Mai 09, 2009.Die Google Collections Library (http://code.google.com/p/google-collections/) Version 1.0 ist nicht mehr fern. Ab jetzt sollte sich die API nicht mehr verändern. (Im Interview sagten die Autoren, sie müssten dann von Hand jede Änderung in allen Quellen bei Google ändern, die die Google Collections einsetzen.)
Interessante Klassen aus Google Collection sind:
- http://google-collections.googlecode.com/svn/trunk/javadoc/index.html?com/google/common/collect/MapMaker.html
- http://google-collections.googlecode.com/svn/trunk/javadoc/index.html?com/google/common/collect/ImmutableSet.html
- http://google-collections.googlecode.com/svn/trunk/javadoc/index.html?com/google/common/collect/Ordering.html
- http://google-collections.googlecode.com/svn/trunk/javadoc/com/google/common/collect/HashMultimap.html
- http://google-collections.googlecode.com/svn/trunk/javadoc/com/google/common/base/Joiner.html
Bemerkenswert sind auch neue Annotationen wie http://google-collections.googlecode.com/svn/trunk/javadoc/com/google/common/annotations/GwtCompatible.html.
Labels: Open Source
gwtrpc-spring zur Einfachen Integration von Spring in GWT 1.6
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Samstag, Mai 09, 2009.GWT-SL bietet schon seit längerem die Möglichkeit, die RPC-Services durch Spring-Beans zu definieren. Ist Spring auf der Serverseite, so möchte man gerne Spring-POJOs als GWT-RPC-Service freigeben. GWT-SL ist aber relativ groß und mit http://code.google.com/p/gwtrpc-spring/ gibt es eine sehr schlanke Alternative, die nur aus zwei Klassen besteht. Das die Klassen, die beide im Quellcode unter 3 KB liegen, liegt daran, dass GWT in den neuen Versionen eine Integration RPC-Implementierungen vereinfacht. Die Hauptseite zeigt die 4 Schritten zur Integration anschaulich.
Noch besser beschreibt es allerdings http://devbright.com/2009/05/super-simple-gwt-spring-integration/; hier kann man gleich ein Archiv laden, mit allen Jar-Dateien und alles ist fertig. So läuft das Beispiel nach wenigen Minuten.Labels: GWT, Open Source, Web Frameworks
Seit längerem gibt es mal wieder in Update in JUnit. Das Projekt ist relativ fehlerfrei und daher ist das neue Release kein Bug-Fix-Release, sondern JUnit 4.6 integriert einige interessante Neuigkeiten.
MaxCore:
JUnit now includes a new experimental Core, `MaxCore`. `MaxCore`
remembers the results of previous test runs in order to run new
tests out of order. `MaxCore` prefers new tests to old tests, fast
tests to slow tests, and recently failing tests to tests that last
failed long ago. There's currently not a standard UI for running
`MaxCore` included in JUnit, but there is a UI included in the JUnit
Max Eclipse plug-in.
Scheduling-Strategien für parallele Abarbeitung von Tests:
`JUnitCore` now includes an experimental method that allows you to
specify a model of the `Computer` that runs your tests. Currently,
the only built-in Computers are the default, serial runner, and two
runners provided in the `ParallelRunner` class:
`ParallelRunner.classes()`, which runs classes in parallel, and
`ParallelRunner.methods()`, which runs classes and methods in parallel.
This feature is currently less stable than MaxCore, and may be
merged with MaxCore in some way in the future.
Dann lassen sich Arrays mit Fließkommazahlen auch mit einem Delta vergleichen:
assertArrayEquals(new double[] {1.0, 2.0}, new double[] {1.0, 2.0}, 0.01);Das tutego-JUnit-Seminar berücksichtigt diese Änderungen.
Labels: Open Source
JavaNCSS (Source Measurement Suite) in der Version 30.51
1 Kommentar(e). Veröffentlicht von Christian Ullenboom am Mittwoch, Mai 06, 2009.JavaNCSS ist ein “A Source Measurement Suite for Java”, mit dem man Statistiken über Projekte bekommt. Das Release vom 9. Feb. 2009 trägt die Versionsnummer 30.51 und gehört damit den zu höchsten Versionsnummer, die ich je gesehen habe.
Die Ausgabe, hier etwa für das JDK 1.1.5 (nicht 1.5!), sieht so aus:
Output generated by JavaNCSS with Sun's JDK 1.1.5 java.* source tree
Nr. Classes Functions NCSS Package
1 3 11 376 .
2 4 38 95 java.applet
3 70 1232 7060 java.awt
4 6 25 94 java.awt.datatransfer
5 30 117 861 java.awt.event
6 14 137 1023 java.awt.image
7 27 117 196 java.awt.peer
8 27 201 1268 java.beans
9 73 716 4221 java.io
10 72 711 3327 java.lang
11 7 92 288 java.lang.reflect
12 2 105 760 java.math
13 33 282 1504 java.net
14 19 73 318 java.rmi
15 3 10 71 java.rmi.dgc
16 3 13 47 java.rmi.registry
17 23 95 412 java.rmi.server
18 28 193 827 java.security
19 8 30 53 java.security.acl
20 5 8 22 java.security.interfaces
21 18 352 923 java.sql
22 40 522 4657 java.text
23 103 108 722 java.text.resources
24 30 322 2472 java.util
25 19 170 1064 java.util.zip
26 1 51 1093 sun.tools.ttydebug
27 1 0 2 sunw.io
28 2 1 6 sunw.util
--------- --------- ---------
671 5732 33762 Total
Packages Classes Functions NCSS | per
---------------------------------------------------
28.00 671.00 5,732.00 33,762.00 | Project
23.96 204.71 1,205.79 | Package
8.53 50.32 | Class
5.89 | Function
NCSS steht für “Non Commenting Source Statements (NCSS)”.
Für die Statistiken gibt es auch einen Ant-Task. Desweiteren gibt es eine kleine Gui und ein SVG-Output.
Labels: Open Source
gwt-connectors – Verbindungen zwischen Formen
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Mittwoch, Mai 06, 2009.gwt-connectors ist eine GWT-Bibliothek, um Formen miteinander zu verbinden.
Die Präsentation zeigt, wie das geht.
Wer’s selber ausprobieren möchte, schaut unter demo (IE, Firefox, Opera, Chrome). (Aber wie kann man nun die Verbindung wieder lösen …)
Der nötige Programmcode ist kurz:
// Create boundary panel
AbsolutePanel boundaryPanel = new AbsolutePanel();
boundaryPanel.setSize("600px", "400px");
RootPanel.get().add(boundaryPanel, 10, 10);
Diagram diagram = new Diagram(boundaryPanel);
boundaryPanel.add(new Label("Connectors example"), 10, 2);
// Add connectors
Connector connector1 = new Connector(50, 80, 100, 100);
connector1.showOnDiagram(diagram);
Connector connector2 = new Connector(350, 200, 270, 80);
connector2.showOnDiagram(diagram);
Connector connector3 = new Connector(450, 120, 500, 80);
connector3.showOnDiagram(diagram);
// Add some elements that can be connected
Label label = new Label("LABEL");
Image image = new Image("http://code.google.com/images/code_sm.png");
HTML html = new HTML("<b>HTML<br>ELEMENT</b>");
boundaryPanel.add(label, 50, 270);
boundaryPanel.add(image, 180, 250);
boundaryPanel.add(html, 450, 250);
Shape shapeForLabel = new Shape(label);
shapeForLabel.showOnDiagram(diagram);
Shape shapeForImage = new Shape(image);
shapeForImage.showOnDiagram(diagram);
Shape shapeForHtml = new Shape(html);
shapeForHtml.showOnDiagram(diagram);
Ich bin gespannt, wann es das erste UML-Tool mit GWT gibt. gwt-connectores basiert im Übrigen auf Fred Sauer's gwt-dnd. (Dazu auch das Demo http://allen-sauer.com/com.allen_sauer.gwt.dnd.demo.DragDropDemo/DragDropDemo.html.)
Dazu passt auch die Ankündigung von http://googledocs.blogspot.com/2009/03/drawing-on-your-creativity-in-docs.html, ein Zeichenwerkzeug in Google Docs einzubetten:

http://www.googlewatchblog.de/2009/03/26/google-docs-drawing-veroeffentlicht/ hat dazu ebenfalls ein Bild parat:

Labels: GWT, Open Source, Web Frameworks
GWT Charting Bibliothek gflot und charts4j.
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Dienstag, Mai 05, 2009.Alles fängt mit http://jquery.com/ an. Darauf baut auf http://code.google.com/p/flot/, eine JavaScript-Bib. für Chars:
- Basic example
- Different graph types and setting various options
- Turning series on/off
- Selection support and zooming and zooming with overview
- Plotting time series and visitors per day with zooming and weekends
- Dual axis support
- Interacting with the data
http://code.google.com/p/gflot/ ist nun der GWT-Aufsatz auf flot.
Für eine Bar-Diagramm ist nur folgender Quellcode nötig:final String[] MONTH_NAMES = { "jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec" };
PlotModel model = new PlotModel();
PlotOptions plotOptions = new PlotOptions();
BarSeriesOptions barSeriesOptions = new BarSeriesOptions();
barSeriesOptions.setShow(true);
barSeriesOptions.setLineWidth(1);
barSeriesOptions.setBarWidth(1);
barSeriesOptions.setAlignment(BarAlignment.CENTER);
plotOptions.setDefaultBarsSeriesOptions(barSeriesOptions);
plotOptions.setLegendOptions(new LegendOptions().setShow(false));
// add tick formatter to the options
plotOptions.setXAxisOptions(new AxisOptions().setTicks(12).setTickFormatter(new TickFormatter() {
public String formatTickValue(double tickValue, Axis axis) {
if (tickValue > 0 && tickValue <= 12) {
return MONTH_NAMES[(int) (tickValue - 1)];
}
return "";
}
}));
// create a series
SeriesHandler handler = model.addSeries("Ottawa's Month Temperatures (Daily Average in °C)", "blue");
// add data
handler.add(new DataPoint(1, -10.5));
handler.add(new DataPoint(2, -8.6));
handler.add(new DataPoint(3, -2.4));
handler.add(new DataPoint(4, 6));
handler.add(new DataPoint(5, 13.6));
handler.add(new DataPoint(6, 18.4));
handler.add(new DataPoint(7, 21));
handler.add(new DataPoint(8, 19.7));
handler.add(new DataPoint(9, 14.7));
handler.add(new DataPoint(10, 8.2));
handler.add(new DataPoint(11, 1.5));
handler.add(new DataPoint(12, -6.6));
// create the plot
SimplePlot plot = new SimplePlot(model, plotOptions);
// put it on a panel
FlowPanel panel = new FlowPanel();
panel.add(plot);
return panel;Eine Alternative dazu ist http://code.google.com/p/charts4j/ bzw. http://code.google.com/p/charts4j/wiki/GWT_Port.
Labels: GWT, Open Source, Web Frameworks
Letzten Monat ist Dozer 5.0 veröffentlicht worden. Vor einem Jahr hatte ich schon über Dozer berichtet: http://www.tutego.de/blog/javainsel/2008/01/bean-bean-mapping-mit-dozer.html. Neu beim Java-Bean-Mapper sind:
- Added Generics to public api
- Switched to XSD instead of DTD
- Simpler packaging
- Upgraded 3rd party dependencies
- Upgraded code to use jdk 1.5 features
- Various feature requests and bug fixes
Auch die Namen sind vereinheitlicht worden, nun heißt es org.dozer, BeanFactory, CustomFieldMapper, usw.
Wie das Mapping über XML-Dateien beschrieben wird, klärt das Dokument http://dozer.sourceforge.net/documentation/mappings.html genauer. Auch wenn Dozer nun Java 5 unterstützt, beginnt Dozer nicht mit Annotationen, um die Mappings zu beschreiben.
Labels: Open Source
Derby Datenbank endlich auch pur In-Memory
5 Kommentar(e). Veröffentlicht von Christian Ullenboom am Dienstag, Mai 05, 2009.Zum Weiterlesen: http://blogs.sun.com/kah/entry/derby_10_5_preview_in, http://wiki.apache.org/db-derby/InMemoryBackEndPrimer. Die aktuelle Derby-Datenbank kann man unter http://db.apache.org/derby/releases/release-10.5.1.1.cgi beziehen.
Labels: Open Source
EoD SQL hilft beim Mini-OR-Mapping aber nicht, um Girls zu kriegen
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Freitag, April 10, 2009.EoD SQL (Ease of Development) ist eine API, die über Annotationen SQL-Queries an Methoden erlaubt und diese dann zur Laufzeit ausführt. Ein Beispiel zeigt die Arbeitsweise am schnellsten:
public interface UserQuery extends BaseQuery {
@Select("SELECT * FROM users WHERE id = ?1")
public User getUserById(long id);
@Select("SELECT * FROM users")
public DataSet<User> getAllUsers();
@Update("UPDATE users SET user_name = ?{1.userName}, email_address = ?{1.emailAddress} " +
"dob = ?{1.dob} WHERE id = ?{1.id}")
public void updateUser(User user);
@Update(sql = "INSERT INTO users (user_name, email_address, dob) VALUES " +
"(?{1.userName}, ?{1.emailAddress}, ?{1.dob})",
keys = GeneratedKeys.RETURNED_KEYS_FIRST_COLUMN)
public User insertUser(User user);
}
Mit
UserQuery QUERY = QueryTool.getQuery(UserQuery.class);
wird dann ein Objekt erzeugt, was die Schnittstelle implementiert. Dann sind Aufrufe wir QUERY.getAllUsers() möglich
Zusammenfassung von der Webseite;
EoD SQL is a very small API that allows binding of SQL Queries to Java Objects. The API is designed to be compatible with the "Ease of Development" API that could be found in J2SE 1.6 beta, but not in the final release. The EoD API's main principal is that it maps SQL ResultSet's to objects, and not the other way around. Most OR mapping layers try to replicate the database structure in objects, where EoD SQL lets you write the SQL code, while it allows for easy access to Java Objects that map to the ResultSet.
Advantages to EoD SQL:
- Super light weight
- Very easy to work with
- Generally well documented (tell me where it's not)
- More features than the original EoD RI
- No compile-time anything needed
- No XML, or other configuration files needed
- Should work with any JDBC database
- Lets you code whatever SQL you like
- Object mapping is loose (extra columns in the results are ignored, as are extra fields in the data object)
What EoD SQL is not:
- EoD SQL will not parse or validate your SQL in any way
- EoD SQL is not a database or database connector, it sits on top of JDBC
- EoD SQL will not get you girls
Labels: Open Source
Google App Engine unterstützt Java
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Mittwoch, April 08, 2009.
Nach Python unterstützt die GAP nun auch Java 6. Allerdings gibt es auch einige Besonderheiten:
- Kein Dateisystem (somit keine sinnvollen java.io.File-Operationen), da Zugriff über den App Engine Datastore
- Keine eigenen Threads
- Kein AWT- und Swing-Funktionalität/Pakete. Dass man kein Fenster aufmachen kann ist klar, aber es können auch keine Bilder skaliert werden und einige Web-Frameworks nutzen Swing-Modelle wie TableModel. (Für die Bild-Operationen bietet Google eine eigene API: http://code.google.com/intl/de/appengine/docs/java/images/overview.html)
- Eingeschränktes Reflection
- Besonderer Klassenlader
- (Natürlich) kein JNI
- Nicht unterstützte Dinge werfen eine SecurityException
Nichts desto trotz laufen auch dyn. Sprachen wie Groovy und JRuby. Und es gibt ein Eclipse-Plugin für das Deployment (Google Plugin for Eclipse). Datenzugriff der AppEngine gibt es mit der API von JPA/JDO über http://www.datanucleus.org/products/accessplatform/ (früher JPOX), IMHO eine recht unbekannte Implementierung der Standards.
Zum Weiterlesen:
- http://code.google.com/intl/de/appengine/docs/java/overview.html
- http://googleappengine.blogspot.com/2009/04/seriously-this-time-new-language-on-app.html
- http://www.infoq.com/news/2009/04/gae
- http://code.google.com/intl/de-DE/appengine/docs/java/jrewhitelist.html
- http://paulhammant.com/blog/google-app-engine-for-java-with-rich-ruby-clients.html
- http://www.vineetmanohar.com/2009/04/11/writing-java-hello-world-for-google-app-engine/
- http://broadcast.oreilly.com/2009/04/java-for-google-appengine-fina.html
- http://www.theserverside.com/news/thread.tss?thread_id=54256
Labels: Open Source, Web Frameworks
Einführung in den EventBus
1 Kommentar(e). Veröffentlicht von Christian Ullenboom am Donnerstag, März 26, 2009.Was ist EventBus?
- Die Idee vom EventBus https://eventbus.dev.java.net/ ist schnell in einem Satz beschrieben:
- Biete einen Publish/Subscribe-Ereignisdienst für Applikationen an, die innerhalb einer JVM laufen.
- Anders als also JMS, funktioniert EventBus nur in einer JVM, aber nicht über Rechnergrenzen.
- Ereignisbehandlung wird üblicherweise über Observer/Observable oder über Listener realisiert.
- Listener sind aber lästig zu schreiben: Man benötigt XXXEventListener Schnittstellen und Implementierungen, addXXXListener(), removeXXXListener() und fireEventListener() Methoden und vielleicht XXXEvent-Klassen.
- EventBus vereinfacht das und mit zwei Typen und drei Methoden ist ein erstes Beispiel programmiert.
Erstes Beispiel
Analyse
import org.bushe.swing.event.EventBus;
import org.bushe.swing.event.EventSubscriber;
class Observer
{
Observer()
{
EventBus.subscribe( Object.class, new EventSubscriber<Object>() {
@Override public void onEvent( Object evt ) {
System.out.println( evt );
}
} );
}
}
public class First
{
public static void main( String args[] )
{
new Observer();
EventBus.publish( "Hallo Welt" );
}
}
- EventBus.publish( Object ) sendet ein Ereignis an alle Interessenten aus.
- EventBus.subscribe( Class, EventSubscriber ) meldet für einen speziellen Klassentyp einen Listener an.
- Das besondere: Es ist hierarchisch. Wir senden mit EventBus.publish( "Hallo" ) einen String, aber da String eine Unterklasse von Object ist, bekommt unser "Alles"-Listener die Nachricht.
- EventBus.unsubscribe() meldet den Interessenten wieder ab.
- Der EventSubscriber ist generisch deklariert, so dass es bei EventSubscriber<Object> somit onEvent( Object evt ) heißt.
Hierarchien
- Mit der Möglichkeit Event-Hierarchien zu bilden gibt es eine große Flexibilität.
- So horcht folgendes auf alle IOException-Events: EventBus.subscribe( IOException.class, new EventSubscriber() { ... EventBus.publish( new FileNotFoundException() );
- Ist dieses Matchen nicht gewünscht, verwendet man statt EventBus.subscribe() die Methode EventBus.subscribeExactly().
- Bei Generics funktioniert ein .class nicht wie erwartet.
- Es liefert System.out.println( new Holder<String>().getClass() ); und System.out.println( new Holder<StringBuffer>().getClass() ); immer nur class javax.xml.ws.Holder.
- Was passiert bei EventBus.subscribe( Holder.class, new EventSubscriber() { ... und EventBus.publish( new Holder<String>("String value") ); EventBus.publish( new Holder<Date>( new Date() ) );
- In beiden Fällen wird der Listener benachrichtigt.
Hierarchien bei Generischen Typen (2)
- Soll eine Trennung aufgrund des generischen Typs stattfinden, lässt sich auf ein java.lang.reflect.Type anmelden und Senden. Der Quellcode ist ein wenig komplex:
EventBus.subscribe( new TypeReference<Holder<Date>>(){}.getType(), new EventSubscriber<Object>() {
@Override public void onEvent( Object evt ) {
System.out.println( ((Holder)evt).value );
}
} );
EventBus.publish( new TypeReference<Holder<String>>(){}.getType(), new Holder<String>("String value") );
EventBus.publish( new TypeReference<Holder<Date>>(){}.getType(), new Holder<Date>( new Date() ) );
Jetzt wird nur noch das Datum empfangen und auf den Bildschirm kommt:
Thu Mar 26 14:28:15 CET 2009
Topics
- Im Regelfall sind nicht alle Interessenten an allen Ereignissen interessiert.
- Man kann nun verschiedene Ereignistypen definieren, doch wenn man etwa Strings verschicken möchte, ist es lästig, diesen String extra in in Ereignisobjekt zu verpacken.
- Die Lösung sind Topics, also bestimmte Themen, zu denen man sich anmelden kann und zu denen man schicken kann.
- Es ändern sich in der API zwei Dinge: Bei publish() ist der Topic anzugeben, bei subscribe() ist statt ein EventSubscriber ein EventTopicSubscriber nötig, da der Listener neben dem Event auch den Topic übergibt.
Beispiel mit Topics
EventBus.subscribe( "Error", new EventTopicSubscriber() {
@Override public void onEvent( String topic, Object evt ) { System.out.printf( "'%s' für Topic '%s'%n", evt, topic ); }
} );
EventBus.publish( "Error", "Hallo Welt" );
Liefert dann
'Hallo Welt' für Topic 'Error'
Für mehrere Topics anmelden
- Soll ein EventTopicSubscriber für mehrere Topics angemeldet werden, so kann man natürlich schreiben: EventTopicSubscriber ets = ... EventBus.subscribe( topic1, ets ); EventBus.subscribe( topic2, ets );
- Eine weitere subscribe()-Methode ist subscribe(java.util.regex.Pattern, EventTopicSubscriber).
- Damit lassen sich leicht über reguläre Ausdrücke Gruppen bilden.
EventBus.subscribe( Pattern.compile( "Error|Warning" ), new EventTopicSubscriber() { ...
EventBus.publish( "Error", "Hallo Welt" );
EventBus.publish( "Info", "Hallo Welt" ); // Kommt nicht an
EventBus.publish( "Warning", "Hallo Welt" );
EventBus und AWT Event Dispatching Thread (EDT)
- Setzt man in die onEvent()-Methode die Anweisung System.out.println( Thread.currentThread() ); // Thread[AWT-EventQueue-0,6,main] so findet man, dass der EventBus den Programmcode im AWT Event Thread abarbeitet.
- Das ist natürlich gut für Aktionen, die an den Swing-Komponenten vorgenommen werden.
- Zum Beispiel: Ein beliebiger Thread lädt Daten und möchte nach dem Laden eine Statuszeile aktualisieren. Schickt der Thread dann mit publish() ein Ereignis, wird der Programmcode vom Empfänger im EDT ausgeführt, sodass dort etwa ein setText() auf einem JLabel der Statuszeile erlaubt ist.
- Auf der anderen Seite hat das zur Konsequenz, dass der Programmcode schnell sein muss, damit der EDT nicht zu lange blockiert wird.
- Bei nicht-AWT-Anwendungen ist die Abarbeitung im EDT unsinnig
EventBus und SwingEventService
- Der EventBus setzt den Programmcode standardmäßig in den EDT, kann ihn aber auch von einem anderen Thread abarbeiten lassen.
- System.out.println( EventBus.getGlobalEventService() ); // org.bushe.swing.event.SwingEventService@173a10f
- Standardmäßig nutzt EventBus also intern eine SwingEventService-Objekt.
- Alternativ kann man schreiben: SwingEventService eventing = new SwingEventService(); eventing.subscribe( Object.class, new EventSubscriber() { @Override public void onEvent( Object evt ) { System.out.println( evt ); } } ); eventing.publish( "Hallo" );
SwingEventService und ThreadSafeEventService
- Neben dem SwingEventService gibt es den ThreadSafeEventService für eine Abarbeitung, die nicht im EDT stattfindet.
- Beide Implementieren die Schnittstelle EventService. (Genaugenommen ist SwingEventService eine Unterklasse von ThreadSafeEventService.)
- Man schreibt dann: EventService eventing = new ThreadSafeEventService(); eventing.subsribe(...); eventing.publish(...);
EventServiceLocator (1)
- Den EventBus kann man nun so umstellen, dass er standardmäßig den ThreadSafeEventService nutzt.
- Dazu wird intern ein EventServiceLocator eingesetzt.
System.out.println( EventBus.getGlobalEventService() ); // org.bushe.swing.event.SwingEventService System.out.println( EventServiceLocator.getEventBusService() ); // org.bushe.swing.event.SwingEventService System.out.println( EventServiceLocator.getSwingEventService() ); // org.bushe.swing.event.SwingEventService
- Der EventServiceLocator verwaltet also zwei unterschiedliche Event-Services.
EventServiceLocator (2)
try { EventServiceLocator.setEventService(EventServiceLocator.SERVICE_NAME_EVENT_BUS, new ThreadSafeEventService()); } catch ( EventServiceExistsException e ) { e.printStackTrace(); }
System.out.println( EventBus.getGlobalEventService() ); // org.bushe.swing.event.ThreadSafeEventService System.out.println( EventServiceLocator.getEventBusService() ); // org.bushe.swing.event.ThreadSafeEventService System.out.println( EventServiceLocator.getSwingEventService() ); // org.bushe.swing.event.SwingEventService
Achtung: Das muss an den Anfang bevor ein Event je den Bus sieht!
EventServiceLocator (3)
- Wenn man nun Ereignisse über einen "normalen" Thread bearbeitet haben möchte, schreibt man wie üblich EventBus.publish()/subscribe().
- Sollen die Eventanweisungen in den EDT, schreibt man EventServiceLocator.getSwingEventService().publish()/subscribe().
Hängende Referenzen bei Listenern
- Ein häufiges Problem bei Listenern insbesondere bei Swing-Anwendungen sind angemeldete Listener, für die der Interessent aber schon weg ist. Ein Szenario:
- Ein Textfeld einer Maske meldet eine Listener an, um bei Modelländerungen die Daten darstellen zu können.
- Das Model speichert den Listener und indirekt auch eine Referenz auf das Textfeld.
- Die Maske verschwindet, somit auch der Interessent für Modelländerungen.
- Da aber das Model den Listener und indirekt das Textfeld referenziert, kann der GC das Textfeld gar nicht freigeben.
- Daher müssen Listener immer abgemeldet werden, oder...?
EventBus und WeakReference (1)
- Damit Listener bei nicht mehr aktiven Horchern automatisch verschwinden, kann man WeakReferences einsetzen.
- Eine WeakReference ist wie ein Proxy, der ein anderes Objekt ummantelt. Ist die WeakReference die einzige Referenz, die sich für das Objekt interessiert, so kann sie beim nächsten GC das Objekt wegräumen. Der Proxy wird dann ebenfalls nicht mehr benutzt.
- Standardmäßig mantelt die EventBus.subscribe(XXX, EventSubscriber)-Methoden den EventSubscriber in eine WeakReference.
- Wenn es also keinen starken Verweis auf den EventSubscriber mehr von außen gibt, wird der EventBus diesen Listener automatisch abmelden.
EventBus und WeakReference (2)
public class First
{
First()
{
new Observer();
}
public static void main( String args[] )
{
new First();
// System.gc();
EventBus.publish( "Hallo Welt" );
}
}
EventBus und WeakReference (3)
- Der Konstruktor erzeugt einen Observer, der aber nicht referenziert wird. Nach dem der Konstruktor abgearbeitet wurde, ist das Exemplar Freiwild für den GC.
- Wenn in main() System.gc() aufgerufen wird, wird aufgeräumt. Damit werden die WeakReferences entsort also auch der Listener beim EventBus abgemeldet.
- Ist das System.gc() raus, steht immer noch "Hallo", weil das Objekt noch da ist.
- Soll EventBus keinen WeakReference-Behälter um den Listener bauen, so nutzt man subscribeStrongly(XXX, EventSubscriber) bzw. subscribeExactlyStrongly(XXX, EventSubscriber).
Was fehlt noch?
- EventBus kann die Listener aufzählen
- EventBus kann Veto
- Listener können auch über Annotationen angemeldet werden
- Timer können Events überwachen
- Events können gechached werden, sodass spätere Anmelder die Events auch bekommen
Seminar-Werbung. Diese Weiterbildungen sind neu bei tutego
- JBoss RichFaces
- ICEFaces
- Google Web Toolkit (GWT)
- IBM WebSphere Application Server V7.0
- Google Android
- Apache Geronimo Administration
- Web 2.0-Applikationen mit JBoss Seam
- Java-Unternehmensportale und Portlets
Labels: Open Source
gxp: Google XML Pages
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Dienstag, März 17, 2009.Labels: Open Source
JSecurity heißt jetzt Apache Ki
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Freitag, März 13, 2009.Labels: Open Source
Alphanum Algorithm
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Samstag, Februar 28, 2009.Der Alphanum Algorithm bietet eine alternative (bessere?) Sortierung für Zeichenketten mit gemischten Zahlen an:
| Traditional | Alphanum |
| z1.doc z10.doc z100.doc z101.doc z102.doc z11.doc z12.doc z13.doc z14.doc z15.doc z16.doc z17.doc z18.doc z19.doc z2.doc z20.doc z3.doc z4.doc z5.doc z6.doc z7.doc z8.doc z9.doc | z1.doc z2.doc z3.doc z4.doc z5.doc z6.doc z7.doc z8.doc z9.doc z10.doc z11.doc z12.doc z13.doc z14.doc z15.doc z16.doc z17.doc z18.doc z19.doc z20.doc z100.doc z101.doc z102.doc |
Der Alg. ist für Java über den AlphanumComparator (LGPL) implementiert.
Labels: Open Source
Fluent Interface-based API für Java Reflection: FEST-Reflect
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Samstag, Februar 28, 2009.FEST-Reflect is a Java library that provides a Fluent Interface-based API that simplifies the usage of Java Reflection, resulting in improved readability and type safety. It supports class loading, access to static inner classes constructors, methods and fields, and more!
Die Aufrufen sind dann hübsch kompakt:
Steht zur Compilezeit etwa
String name = names.get(8);
wird mit FEST-Reflect daraus
String name = method("get").withReturnType(String.class)
.withParameterTypes(int.class)
.in(names)
.invoke(8);
Ein paar weitere Beispiele:
Person person = constructor().withParameterTypes(String.class)
.in(Person.class)
.newInstance("Yoda");
method("setName").withParameterTypes(String.class)
.in(person)
.invoke("Luke");
field("name").ofType(String.class)
.in(person)
.set("Anakin");
List<String> powers = field("powers").ofType(new TypeRef<List<String>>() {})
.in(jedi)
.get();
Labels: Open Source
Dead Code Detector (DCD)
1 Kommentar(e). Veröffentlicht von Christian Ullenboom am Freitag, Februar 27, 2009.Von der Webseite https://dcd.dev.java.net/:
If you are a developer or a team leader, Dead Code Detector (DCD) simply finds never used code in your Java/JEE applications. Deleting dead code helps to reduce cost of maintenance and to improve quality of code, and as a side effect it improves code coverage metrics of tests by deleting code that can't be tested. Provide a directory of compiled classes, a jar or a war file in the UI and DCD lists suspects of dead code. Dead code found can be private, package-private and even protected or public. Unread local variables, self assignments, toString on String and useless initializations are also detected. Please remember that dead code found by DCD is just suspects. DCD can not detect that reflection or other is used: ask to people who know your application and don't complain if you don't. You can read the usage manual to know how to launch and use DCD or check the FAQ if you have questions. The search is very fast (2000 classes/s on warm files) and made by static analysis of compiled classes without running the application or loading classes. DCD uses the library ASM (licence open source, BSD) from ObjectWeb/OW2 to do the job.
Die letzte Version ist DCD 1.1 und vom 13.2.2009. Das Tool lässt sich auch über Java Web Start starten:
Labels: Open Source
PHP mit Quercus + Tomcat + Eclipse Java Web-Projekt
2 Kommentar(e). Veröffentlicht von Christian Ullenboom am Freitag, Februar 27, 2009.- Lade das WAR-Archiv http://quercus.caucho.com/download/quercus-3.2.1.war von http://quercus.caucho.com/.
- Packe der WAR-Archiv aus.
- Lege in Eclipse ein Dynamic Web Project (etwa unter dem Namen php) an.
- Verbinde es mit Tomcat. (Tomcat kann über Eclipse neuerdings auch automatisch heruntergeladen werden.)
- Kopiere aus dem ausgepackten Quercus-WAR das WEB-INF in das WEB-INF vom Eclipse-Web-Projekt (3 Jars in lib und web.xml)
- Kopiere images und index.php aus dem ausgepackten Quercus-WAR in WebContent
- Starte Tomcat in der Eclipse-View
- Gehe im Browser auf http://localhost:8080/php/
Labels: Open Source, Web Frameworks
SONAR in neuer Version
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Freitag, Februar 27, 2009.Labels: Open Source
JRuby 1.2.0RC1 Released
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Donnerstag, Februar 26, 2009.Aus den News JRuby 1.2.0RC1 Released:
JRuby 1.2.0RC1 has fixed many many compatibility issues and continued to improve general performance. Highlights:
- Improved Ruby 1.9 support (via --1.9)
- Compiler now works
- Almost all of the missing 1.9 methods have been added
- New experimental --fast flag which does more aggressive optimizations
- Large scale compiler and runtime cleanup and performance audit
- Parsing is 3-6x faster now.
- Preliminary android support (Ruboto)
- Rails pathname issue fixed on Windows
- Major bug triage since last release
- 1052 revisions since 1.1.6
- 232 bugs fixed since 1.1.6
Labels: Open Source
Java AMF Client aus BlazeDS ziemlich beschränkt
1 Kommentar(e). Veröffentlicht von Christian Ullenboom am Mittwoch, Februar 25, 2009.the server-based Java remoting and web messaging technology that enables developers to easily connect to back-end distributed data and push data in real-time to Adobe® Flex™ and Adobe AIR™ applications for more responsive rich Internet application (RIA) experiences.Zunächst habe ich angenommen, das die API symmetrisch ist, also nicht nur Java auf der Serverseite das Protokoll VOLLSTÄNGIG implementiert, sondern auch auf der Clientseite. Ursprünglich gab es gar keine Java-Client-API, aber mit http://opensource.adobe.com/wiki/display/blazeds/Java+AMF+Client ist die Klasse http://livedocs.adobe.com/blazeds/1/javadoc/flex/messaging/io/amf/client/AMFConnection.html dazugekommen.
Using this feature, customers will be able to write and read AMF messages using Java on the client (i.e. no Flash player). This in turn will enable Java applications talk to AMF compliant servers such as BlazeDS, LCDS, or AMFPHP.Beispiele, wie mit dieser API ein remote-Aufruf gemacht wird, zeigen etwa
- http://www.infoaccelerator.net/blog/post.cfm/remoting-from-java-to-coldfusion-by-example
- http://java.dzone.com/news/calling-flex-data-services-piv
What this feature is not: 1) It is not full implementation of BlazeDS Actionscript client libraries. It will strictly be a mirror of Flash player's NetConnection but no Channels will be built on top of it. Similarly, no Consumer, Producer, etc. of BlazeDS will be implemented on top. 2) Flash player's NetConnection supports RTMP. AMFConnection will not support RTMP, and hence the name AMFConnection instead of NetConnection.Vielleicht wird ja http://www.osflash.org/red5 eine vollständige Java-Client-API für RTMP anbieten.
Labels: Open Source
macwidgets - Collection of Mac style widgets written in Java
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Montag, Februar 23, 2009.Gibt es unter http://code.google.com/p/macwidgets/. Von der Webseite:
Sieht nett aus und die API ist einfach zu nutzen.
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
![]()
Labels: Open Source
Groovy 1.6 ist da
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Montag, Februar 23, 2009.Unter http://groovy.codehaus.org/ liegt die neue Version von Groovy 1.6. Groovy-Chef-Stratege Guillaume Laforge zählt in seinem Blog die Hauptfeatures auf:
Obviously, 1.6 is a very important milestone for the project, with several great new features and improvements:
- great runtime performance improvements
- multiple assignments
- optional return in if/else and try/catch blocks
- AST transformations and all the provided transformation annotations like @Singleton, @Lazy, @Immutable, @Delegate and friends
- the Grape module and dependency system and its @Grab transformation
- various Swing builder improvements, thanks to the Swing / Griffon (http://griffon.codehaus.org) team
- as well as several Swing console improvements
- the integration of JMX builder
- JSR-223 scripting engine built-in
- various metaprogramming improvements, like the EMC DSL, per-instance metaclasses even for POJOs, and runtime mixins
Einige Links zu den Konzepten:
- http://groovy.codehaus.org/Multiple+Assignment+Proposal
- http://groovy.codehaus.org/Immutable+AST+Macro
- http://groovy.codehaus.org/Grape
- http://code.google.com/p/groovy-jmx-builder/
- http://groovy.codehaus.org/ExpandoMetaClass, http://groovy.codehaus.org/api/groovy/lang/ExpandoMetaClass.html
Ein deutscher Beitrag dazu: http://it-republik.de/jaxenter/artikel/Groovy-1.6---Mittel-der-Wahl-2198.html
Labels: Open Source
Darauf hat die Welt gewartet: Wieder ein neues/altes Web-Framework
2 Kommentar(e). Veröffentlicht von Christian Ullenboom am Montag, Februar 23, 2009.Apache Click http://incubator.apache.org/click/ heißt es und läuft ab Java 1.4. Super. Kommt damit 5 Jahre zu spät. Also nix mit Annotationen. Schön XML und so. (Click 0.3 gab es auch schon im März 2005, also ist das Projekt nicht wirklich jung.) Das Wort Ajax taucht auf den ganzen Webseiten nicht auf. Immerhin gibt es eine http://incubator.apache.org/click/docs/click-ide.html auf Eclipse 3.4 Basis. Toll die Antwort auf die Frage "Why develop a new Web Application Framework?" Antwort: "Because the existing frameworks did not meet my needs. Struts doesn't really do much, while Tapestry is too complicated. For a more comprehensive answer please see Why Click." Klar, als ob es nur Struts und Tapestry gibt. Vor 10 Jahren vielleicht. Bei Struts 1.x ist die Zeit schon lange abgelaufen und bei Tapestry 5 hält man sich noch ein wenig mit DI/IoC über Wasser.
Labels: Open Source, Web Frameworks
Sun unterstützt ICEfaces und gibt Woodstock auf
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Samstag, Februar 21, 2009.Die Nachricht vom Dezember 2008 ist schon etwas älter, ist aber dennoch eine Meldung wert.
The Woodstock release 4.2 is the last official version of Woodstock that Sun will release. Sun will continue to support its customers that have built on top of Woodstock 4.2. The Project Woodstock code is still available, and community members can still create new features or enhancements.
Damit geht Suns Versuch, eine "Standard"-JSF-Komponenten-Sammlung aufzubauen, auch zu Ende. Nun hat sich Sun von JSF-Komponenten nicht ganz abgekehrt, und unterstützt ICEfaces. ICEFaces steht unter der Mozilla Public License (MPL) und ist mit RichFaces die populärste JSF-Komponentensammlung. Die Demo-Seite zeigt warum. Zudem gab es letzte Jahr eine Auszeichnung.
We are very pleased to announce that ICEfaces has been voted the Best Overall Enterprise RIA Product by the AJAXWorld RIA Conference & Expo 2008 West delegates.
Sun geht es mit dem Schritt zu ICEFaces insbesondere darum, die JSF-Bibliothek in NetBeans gut zu unterstützen. ICEfaces 1.7 wurde schon früh in der Version NetBeans 6.0.1 integriert.
- ICEfaces Evolves Integration with NetBeans IDE and GlassFish
- Woodstock to ICEfaces Migration, Woodstock Migration Path to ICEfaces
- http://www.netbeans.org/kb/articles/icefaces-netbeans-crud-apps.html
Das ICEfaces Project integration for Eclipse 3.4 unterstützt als Eclipse-Plugin Eclipse 3.4 und ICEFaces 1.7.2SP1.
Es ist auch auch ICEfaces 1.8.0-RC1 now available. Siehe dazu auch http://www.icefaces.org/releasenotes/icefaces-1.8.0-RC1-RN.html.
Labels: Open Source, Web Frameworks
emite - Chat-Client und GWT XMPP Bibliothek
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Freitag, Februar 20, 2009.Eine tolle GWT-Anwendung/Bibliothek ist http://code.google.com/p/emite/:
Der Chat-Client läuft im Browser als GWT-Anwendung. Über einen Proxy kann dann der Client (Browser) direkt mit dem Xmpp Server sprechen. (Noch ist ein Proxy nötig, siehe http://ejohn.org/blog/cross-site-xmlhttprequest/). Das heißt, emite implementiert das Extensible Messaging and Presence Protocol (XMPP), um über Bidirectional-streams Over Synchronous HTTP (BOSH) die Daten zum Chat-Server zu senden. Da emite auf der einen Seite eine Bibliothek ist und auf der anderen Seiten ein Chat-Client mit der hübschen Gui, lässt sich die Bib. natürlich auch getrennt nutzen; eine Nachricht wird etwas so versandt:
Session session = Suco.get(Session.class);
session.login(XmppURI.uri("me@domain", "myPassword");
Message message = new Message("send this");
session.send(message);
Intern setzt emite auf http://code.google.com/p/suco/ auf. Suco ist ein einfaches DI-Framework für GWT-Applikationen zusammen mit einem Eventing-Framework. (Suco ist nicht Annotationsgetrieben, da kein echtes Reflection mit GWT möglich ist. Mit einem speziellen Builder könnte man da aber was machen. Hm...)
Labels: Open Source, Web Frameworks
GWT API's for SmartClient
1 Kommentar(e). Veröffentlicht von Christian Ullenboom am Freitag, Februar 20, 2009.SmartClient Ajax (http://www.smartclient.com/) ist eine (weitere) Ajax-Bibliothek für RIA-Anwendungen. Die Demos unter http://www.smartclient.com/index.jsp#_Welcome zeigen auch, was man heute von RIA-Frameworks erwartet: Nette Komponenten, Layout-Manager und Data-Binding über diverse Datenquellen. Es geht nicht nur um hübsche Widgets allein und die Optik ist auch nur OK. (Obwohl http://extjs.com/ in meinen Augen immer noch aus optischen Gründen vorne liegt, hat doch SmartClient Ajax einen sehr großen Vorteil: SmartClient Ajax platform now open source under LGPL. Ext JS ist, wenn man es denn kommerziell einsetzten möchte, nicht ganz billig.)
Für die JS-Library gibt es mit http://code.google.com/p/smartgwt/ auch eine GWT-Wrapper SmartGWT. Der Showcase liegt unter http://www.smartclient.com/smartgwt/showcase/, die JavaDoc unter http://www.smartclient.com/smartgwt/javadoc/. SmartGWT liegt wie auch SmartClient Ajax unter der LGPL. Der Port ist mehr oder weniger die (Fleiß)Arbeit einer Person Sanjiv Jivan. Die folgenden Screenshots stammen aus seinem Blog http://www.jroller.com/sjivan/entry/smartgwt_1_0_released:



Labels: GWT, Open Source, Web Frameworks
Zwei interessante GWT-Erweiterungen: Gilead und GWT-SL
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Montag, Februar 16, 2009.Sind
Gilead (früher Hibernate4GWT), abgeleitet von "Generic Light Entity Adapter" ist ein interessantes Projekt mit folgendem Konzept:
transform persistent entities back to simple Plain Old Java Object, by removing code instrumentation and replacing persistent collections with their regular counterpart.
Kommt zum Beispiel eine JPA-Bean mit Assoziationen mit Eager-fetching rein, kommt ein vollständig geladener Objektgraph raus. Das ist praktisch genau dann, wenn man einen Daten-Service hat, den man von der GWT-Oberfläche zum Holen der Daten nutzt, aber die JPA-Implementierung baut diverse Proxies ein.
Das SF-Projekt "GWT-Widgets" besteht aus zwei Teilen: Der GWT Server Library (GWT-SL) und der GWT Widget Library. Die GWT-SL ist eine GWT-Spring-Integration. Mit dem GWTRPCServiceExporter können etwa die Spring-POJOs als GWT-Services veröffentlicht werden. Die Doku stellt die Arbeitsweise kurz vor.
Labels: GWT, Open Source, Web Frameworks
Folien zum Einsatz von Annotationen in Spring
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Sonntag, Februar 15, 2009.Labels: Open Source, Spring
GWT 1.6 Milestone 1
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Dienstag, Februar 10, 2009.*** New Project Structure in GWT 1.6 ***
One of the biggest changes to GWT 1.6 is a new project structure. The old
output format has been replaced by the standard Java web app expanded "war"
format, and the actual directory name does default to "/war". Note that the
war directory is not only for compiler output; it is also intended to
contain handwritten static resources that you want to be included in your
webapp alongside GWT modules (that is, things you'd want to version
control). Please also note that the "GWTShell" and "GWTCompiler" tools will
maintain their legacy behavior, but they have been deprecated in favor of
new "HostedMode" and "Compiler" tools which use the new war output. When 1.6
is officially released, we will be encouraging existing projects to update
to the new directory format and to use the new tools to take advantage of
new features and for compatibility with future GWT releases.
The sample projects provided in the GWT distribution provide an example of
correct new project configurations. For more details on the specifics of the
new project format, please see GWT 1.6 WAR design document (
http://code.google.com/p/google-web-toolkit/wiki/WAR_Design_1_6).
A couple of important changes we should highlight here:
- Projects with server-side code (GWT RPC) must configure a "web.xml" file
at "/war/WEB-INF/web.xml". This web.xml file must define and publish any
servlets associated with the web application. See the included DynaTable
sample. Additionally, server-side library dependencies must be copied into
"/war/WEB-INF/lib". For example, any GWT RPC servlets must have a copy of
gwt-servlet.jar in this folder.
- HTML host pages will no longer typically be located in a GWT module's
public path. Instead, we'll be recommending that people take advantage of
the natural web app behavior for serving static files by placing host pages
anywhere in the war structure that makes sense. For exmaple, you might want
to load a GWT module from a JSP page located in the root of your web app. To
keep such handwritten static files separate from those produced by the GWT
compiler, the latter will be placed into module-specific subdirectories. Any
page that wishes to include a GWT module can do so via a script tag by
referencing the GWT-produced "<module>.nocache.js script" within that
module's subdirectory. As of 1.6, we'll be recommending that only
module-specific resources used directly by GWT code, such as image files
needed by widgets, should remain on the public path. See the included
Showcase sample for some examples of this distinction.
- When you do need to load resources from a module's public path, always
construct an absolute URL by prepending GWT.getModuleBaseURL(). For example,
'GWT.getModuleBaseURL() + "dir/file.ext"'. This advice has not changed, but
in the past it was easy to be sloppy with this, because the host page and
GWT module typically lived in the same directory, so using a relative URL
would usually do the right thing. Now that GWT modules live in a
subdirectory, you must reference public resources through
GWT.getModuleBaseURL().
*** Hosted Mode Enhancements ***
Although the legacy GWTShell still uses an embedded Tomcat server, the new
HostedMode runs Jetty instead. There is also a new "Restart Server" button
on the main hosted mode window. Clicking this button restarts the internal
Jetty server, which allows Java code changes to take effect on the server
without having to completely exit and restart hosted mode. This is useful
when making code changes to RPC servlets, or when serializable RPC types are modified and the server and client are out of sync.
*** New EventHandler System ***
Event handlers have been added to replace the old event listeners used by
Widgets, History, and various other classes. The new system has a few
differences from the old system:
- EventHandler methods always take a single parameter: the GwtEvent that the Widget fired. For example, ClickHandler has a single method
onClick(ClickEvent).
- Each GwtEvent contains accessors relevant to the event, such as the key
that was pressed on KeyEvents. Native events provide access to the
underlying native event object.
- Each EventHandler defines only one method, so you do not need to create
empty methods just to satisfy the interface requirements.
For users who create their own Widgets, you no longer need to manage
listeners manually. Every Widget has a HandlerManager that manages all of
its handlers. For native events, such as ClickEvent, just call
addDomHandler() from within your code to register a handler and sink the
associated event on the Widget. When the native event is detected, the
handler will automatically be called. For logical events, such as
SelectionEvent, call addHandler() and fire the event manually using the
fireEvent() method.
You can see examples of EventHandler usage in many of the updated GWT
widgets and samples, or in new projects created with the new webAppCreator tool.
You can now trigger a native event on almost any Element. Create a new
native event using the Document.create*Event() methods, then dispatch it on a specific Element by calling Element.dispatchEvent(). These methods allow you to expand your test coverage in ways that were previously impossible.
*** New Widgets ***
DatePicker
The new DatePicker and DateBox widgets allow your users to select a date
from a calendar. The Showcase sample provides examples of both of these
widgets.
LazyPanel
The new LazyPanel widget allows you to delay the creation of certain
sections of your application until they are first accessed, improving
startup performance. For example, if your application has a seldom used
"Help" section, you can wrap it in a LazyPanel and create the user interface
only if and when the user tries to access it. To use the LazyPanel, extend
the class and override the abstract createWidget() method. The
createWidget() method will be called the first time you call setVisible() on
the LazyPanel.
Labels: GWT, Open Source
Flamingo 4.0 Swing Ribbon Komponente
1 Kommentar(e). Veröffentlicht von Christian Ullenboom am Montag, Februar 09, 2009.Kirill Grouchnikov schreibt heute in seinem Blog http://www.pushing-pixels.org/?p=1087 über das 4.0 Release von Flamingo, einer Swing Ribbon Komponente. Auf der Haupsteite https://flamingo.dev.java.net/ gibt es weitere Demos.









Labels: Open Source, Swing
Apache Jackrabbit 1.5
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Mittwoch, Dezember 10, 2008.- The standalone Jackrabbit server component. The runnable jackrabbit-standalone jar makes it very easy to start and run Jackrabbit as a standalone server with WebDAV and RMI access.
- Simple Google-style query language. The new GQL query syntax makes it very easy to express simple full text queries.
Labels: Open Source
SpringSource und Groovy/Grails und SpringSource mit Adobe
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Mittwoch, Dezember 10, 2008.SpringSource,Nun arbeitet SpringSource auch mit Adobe zusammen und Flash näher an Spring zu setzen. Das Spring-Framework integriert dazu BlazeDS (http://opensource.adobe.com/wiki/display/blazeds/BlazeDS/), eine unter LGPL stehende Remoting- und Messaging-Technologie. Mit BlazeDS kann Flex auf Java-Methoden auf der Serverseite zugreifen, so wie es auch JavaScript über DWR (http://directwebremoting.org/) kann. Die Ankündigung zur Zusammenarbeit:
the maker of the Spring framework have just announced they are acquiring G2One, Inc.,
the Groovy/Grails company. You can learn more about this announcement here:
- Announcement on SpringSource's site
- Overview and FAQ regarding the acquisition
- Official press release
Guillaume Laforge's post
and Graeme Rocher's post
going into details about the key benefits of this acquisition.
- http://www.springsource.com/node/1077
Labels: Open Source, Spring
Android GUI-Builder
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Mittwoch, Dezember 10, 2008.Labels: Open Source
XStream mit JSON-Serialisierung
1 Kommentar(e). Veröffentlicht von Christian Ullenboom am Mittwoch, Dezember 10, 2008.XmlBeans einer der bekanntesten XML-Serialisierer. Nun haben die Entwickler die Bibliothek erweitert, dass XStream auch als XML-JSON-Serialisierer (http://xstream.codehaus.org/json-tutorial.html) arbeitet. Die Methodenamen sind mit toXML() und fromXML() zwar nicht so passend, aber der Aufruf dennoch einfach:
Product product = new Product("Banana", "123", 23.00);
XStream xstream = new XStream(new JettisonMappedXmlDriver());
xstream.setMode(XStream.NO_REFERENCES);
xstream.alias("product", Product.class);
System.out.println(xstream.toXML(product));Der andere Weg:
String json = "{\"product\":{\"name\":\"Banana\",\"id\":\"123\"" +
",\"price\":\"23.0\"}}";
XStream xstream = new XStream(new JettisonMappedXmlDriver());
xstream.alias("product", Product.class);
Product product = (Product)xstream.fromXML(json);
System.out.println(product.getName());Labels: Open Source
Grammatikalische Struktur vom Java-Programm visualisieren
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Sonntag, Dezember 07, 2008.Unter http://www.antlr.org/wiki/display/ANTLR3/Tool+showing+grammatical+structure+of+Java+code gibt es ein hübsches Gui-Tool, welches nach der Java Grammatik vom Openjdk javac compiler project with ANTLR-based Java grammar die Struktur aufzeigt:

Labels: Open Source
JavaFX 1.0 offiziell veröffentlicht
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Samstag, Dezember 06, 2008.
Sun hat Anfang Dezember 2008 JavaFX veröffentlicht. Es ist als Alternative zu MS Silverlight und Flash + Flex für Rich Internet Applications gedacht. Einige Links dazu:
- http://en.wikipedia.org/wiki/JavaFX
- http://en.wikipedia.org/wiki/JavaFX_Script
- http://en.wikipedia.org/wiki/JavaFX_Mobile
- http://www.theregister.co.uk/2008/01/24/javafx_tools_adobe/
- http://www.oreillynet.com/onjava/blog/2007/05/javafx_im_still_not_impressed.html
Zentrale Punkte von JavaFX 1.0 sind: (Zitiert von http://blogs.sun.com/javafx/entry/javafx_1_0_is_live)
- Fast and easy to use 2D graphics
- PerspectiveTransform for 3D effects
- KeyFrame animation
- Video and Audio support using both native and cross-platform codecs
- Swing Integration
- XML & JSON web services
- Pixel-filters and visual effects with GPU hardware acceleration
- CSS styling (more on that later)
- Windows XP+ and Mac 10.4+ support with Linux & Solaris in the works (more on that later too)
- The new JavaFX Script language with binding and animation built in, running 10->20x faster than Javascript
- Visually rich applets that you can drag to your desktop and save for later
- Integration with Photoshop and Illustrator
- Access to the world's huge library of Java code and APIs
- A new website with docs, tutorials, and tons of BSD licensed sample code and as a nice bonus:
- A sneak-peek beta of JavaFX on mobile devices
Der Punkt Support with Linux & Solaris in the works macht sicherlich nicht jeden in der Community glücklich, aber gut...
Sun hat die schöne Seite http://javafx.com/ aufgebaut, um mehr über JavaFX zu lernen. Die NetBeans IDE 6.5 bringt volle Unterstützung für JavaFX (http://www.netbeans.org/features/javafx/index.html) mit. Für Eclipse gibt es bisher keine große Unterstützung.

http://www.reportmill.com/jfx/ bringt passend ein Tool auf Markt. Zentrale Elemente sind (Zitiert von der Webseite):
- Powerful Visual Designer
- Animation, Illustration and Page Layout
- Video, Sound and Image Effects
- Drag & Drop Application Components
- JDBC and POJO Data Binding
- HTTP Form Generation and Binding
- Navbar Generation, Page Transitions
- Graphs, Charts, Tables and Reports
- Full Featured Player/Document Reader
- Extension Plugins with Internet Directory

Labels: Open Source
JBoss 5 ist fertig + Application Servers 2008 Rankings
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Samstag, Dezember 06, 2008.Nach 3 Jahren gibt es nun (endlich) den JBoss 5 AS. Einige Meldungen und Meinungen dazu:
- http://www.heise.de/newsticker/JBoss-5-ist-nach-drei-Jahren-Entwicklungszeit-fertig--/meldung/120010
- http://www.jboss.org/feeds/post/as_5_0_0_we_are_done_next
- http://sourceforge.net/project/shownotes.php?release_id=645033&group_id=22866
JBoss 5 taucht aber (noch) nicht als zertifizierter Java EE 5 Container unter http://java.sun.com/javaee/overview/compatibility.jsp auf, obwohl http://sacha.labourey.com/2008/09/15/jboss-as-is-now-ee5-certified/ davon berichtet.
Unter http://www.theserverside.com/news/thread.tss?thread_id=51008 wird der EDC report - "Application Servers 2008 Rankings" (http://www.evansdata.com/reports/viewRelease_download.php?reportID=20) diskutiert. Die Kommentare sind lesenswert. Der Download des Papers verlangt ein Login, ist aber ansonsten frei.
Labels: Java EE, Open Source
Inselraus: Ein flexibles Tabellenlayout mit JGrid
1 Kommentar(e). Veröffentlicht von Christian Ullenboom am Donnerstag, Dezember 04, 2008.Eine JTable ist zwar eine einfache Komponente, doch schon in der HTML-Tabelle gibt es Eigenschaften, die die JTable nicht abbilden kann: Zellen, die über mehrere Zeilen und Spalten gehen. Hier ist einiges an Programmieraufwand nötig, der jedoch für diejenigen unnötig ist, die auf die freie Komponente JGrid zurückgreifen. Die Swing-Komponente gehört zu Pepper (http://jeppers.sourceforge.net/), einer Komponente für Tabellenkalkulationen, die sogar eine Formelauswertung ähnlich Excel versteht. Pepper selbst untersteht zwar der GPL, doch JGrid ist LGPL und lässt sich somit in eigene kommerzielle Anwendungen einbinden.

PS: tutego bietet nun auch ein GWT-Seminar an:
Labels: Open Source
Neuer Java Decompiler
1 Kommentar(e). Veröffentlicht von Christian Ullenboom am Dienstag, Dezember 02, 2008.Jad (http://www.kpdus.com/jad.html) gehört immer noch zu den Klassikern der Java-Decompiler. Nun gibt es etwas neues, den “Java Decompiler” (http://java.decompiler.free.fr/). Mit dem Screenshot der Gui sieht das schon mal vielversprechend aus.

Labels: Open Source
Joda Time 1.6/JSR 310
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Samstag, November 29, 2008.Von Joda Time (http://joda-time.sourceforge.net/) gibt es ein neues Update in der Version 1.6 (vom 2008-10-27). Interessant bleibt zu sehen, wie sich Joda Time im Laufe der Zeit gegenüber der JSR 310: A New Java Date/Time API abhebt.
Zur JSR 310, die in Java 7 erwartet wird:
- https://jsr-310.dev.java.net/
- http://jcp.org/en/jsr/detail?id=310
- http://today.java.net/pub/a/today/2008/09/18/jsr-310-new-java-date-time-api.html
- https://jsr-310.dev.java.net/nonav/doc-2008-08-04/index.html
Stephen Colebourne ist einer der treibenden Personen von Joda Time und auch Specification Lead der JSR 310.
Labels: Java 7, Open Source
Diskussion und Anwendung von Ribbon-Komponenten
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Samstag, November 29, 2008.Kirill Grouchnikov hat unter http://www.pushing-pixels.org/?p=622 einen langen Blog verfasst, in dem er sich mit der Entwicklung und Einsatz der Ribbon-Komponente befasst. Der Blog mit seinen vielen Links ist auf jeden Fall lesenswert. Für Java hat Kirill eine Ribbon Komponente implementiert, die Teil vom Flamingo Framework (https://flamingo.dev.java.net/) ist. Die Dokumentation https://flamingo.dev.java.net/docs/ribbon/ribbon-overview.html zeigt Screenshots und die API dahinter.
Labels: Open Source
Jersey 1.0 (JAX-RS) ist fertig
2 Kommentar(e). Veröffentlicht von Christian Ullenboom am Dienstag, Oktober 14, 2008.Im Sun-Blog ist http://blogs.sun.com/theaquarium/entry/jersey_1_0_just_shipped ist zu lesen:
JAX-RS co-spec lead and Jersey lead Paul Sandoz just announced Jersey 1.0 availability. v1.0 moments are always special and this one is certainly no exception given how progress was made on a regular basis from engineering hard work and lots of community feedback. Congrats to Paul and the entire community for a well run open source project !
Jersey 1.0 is obviously a JAX-RS 1.0 implementation, but it also adds Spring integration, a REST client, and obviously is production quality...
One of the signs of a community-involved project is the many ways the bits can be accessed: GlassFish v2 and v3, NetBeans 6.5, Maven 2, zip, etc...With Jersey 1.0 out the door, you can now freely choose your Web Services style and stick to standards. Java EE 6, scheduled sometime mid-2009, will make this even clearer though a maintenance release.
See Jerseyfor more stories.
Labels: Java EE, Open Source
TWAIN-Scannen mit Java
3 Kommentar(e). Veröffentlicht von Christian Ullenboom am Donnerstag, Oktober 09, 2008.http://www.mms-computing.co.uk/uk/co/mmscomputing/device/twain/ ist eine Java-API für die TWAIN-Schnittstelle, um etwa einen Scanner anzusteuern. Ein Beispiel ist schnell aufgebaut:
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import javax.swing.AbstractAction;
import javax.swing.Action;
import javax.swing.JButton;
import org.jdesktop.swingx.JXFrame;
import org.jdesktop.swingx.JXImagePanel;
import org.jdesktop.swingx.JXImagePanel.Style;
import uk.co.mmscomputing.device.scanner.Scanner;
import uk.co.mmscomputing.device.scanner.ScannerIOException;
import uk.co.mmscomputing.device.scanner.ScannerIOMetadata;
import uk.co.mmscomputing.device.scanner.ScannerListener;
public class TwainExample
{
@SuppressWarnings("serial")
public static void main( String[] args )
{
final JXImagePanel imagePanel = new JXImagePanel();
imagePanel.setStyle( Style.SCALED_KEEP_ASPECT_RATIO );
final Scanner scanner = Scanner.getDevice();
JXFrame f = new JXFrame( "SSP", true );
Action action = new AbstractAction("Scan") {
@Override public void actionPerformed( ActionEvent e ) {
try { scanner.acquire(); } catch ( ScannerIOException ex ) { }
}
};
f.add( new JButton(action), BorderLayout.PAGE_START );
f.add( imagePanel );
f.setSize( 1000, 700 );
f.setVisible( true );
scanner.addListener( new ScannerListener()
{
public void update( ScannerIOMetadata.Type type, ScannerIOMetadata metadata )
{
if ( ScannerIOMetadata.ACQUIRED.equals( type ) )
imagePanel.setImage( metadata.getImage() );
}
} );
}
}
Labels: Open Source
Globale Tastendrücke und Mausoperationen abfangen (Windows)
1 Kommentar(e). Veröffentlicht von Christian Ullenboom am Dienstag, Oktober 07, 2008.Globale Mausbewegungen von Java zu überwachen ist mit dem MouseInfo.getPointerInfo().getLocation() kein Problem. Aber mitzubekommen, ob in einer anderen Java-Applikation eine Maustaste oder eine andere Keyboard-Taste gedrückt ist, schon. Wer vor dem Problem steht, dies unter Java und Windows abzufangen, kann SWT zusammen mit den SWT Win32 Extensions (http://www.swtui.cn/index.php) nutzen -- auch wenn man selbst nicht mit SWT, sondern mit Swing arbeitet. Soll etwa global die <Pause> Taste abgefangen werden, kann man schreiben:
Hook.KEYBOARD.addListener(new HookEventListener() {
public void acceptHookData( HookData hookData ) {
if ( ((KeyboardHookData) hookData).getVirtualKeyCode() == KeyEvent.VK_PAUSE &&
! ((KeyboardHookData) hookData).getTransitionState() ) {
// TU WAS DICH GLÜCKLICH MACHT
}
} } );
Hook.KEYBOARD.install();
Neben Hook.KEYBOARD gibt es auch Hook.MOUSE.
Möchte man nun beides zusammen haben, also wissen, ob etwa STRG und eine Maustaste gedrückt wurde, meldet man einen HookEventListener für die Maus an und fragt die Taste wie folgt ab:
Extension.GetKeyState(Extension.VK_CONTROL) < 0
Labels: Open Source
HOWTO: Change Title, Autor, Subject of a PDF
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Dienstag, September 30, 2008.package com.tutego.traida.util;
import java.io.FileOutputStream;
import java.util.HashMap;
import com.lowagie.text.pdf.PdfReader;
import com.lowagie.text.pdf.PdfStamper;
public class PdfUtils
{
public static void setMetaData( String sourceFilename, String targetFilename )
{
try
{
PdfReader pdfReader = new PdfReader( sourceFilename );
PdfStamper stamp = new PdfStamper( pdfReader, new FileOutputStream( targetFilename ) );
@SuppressWarnings("unchecked")
HashMap<String, String> info = pdfReader.getInfo();
info.put( "Title", "Rechnung für Beratung" );
info.put( "Author", "tutego" );
info.put( "Subject", "Rechnung" );
info.put( "Keywords", "Rechnung, tutego" );
info.put( "Creator", "http://www.tutego.com/" );
info.put( "Producer", "tutego Training Software 1.2" );
stamp.setMoreInfo( info );
stamp.close();
pdfReader.close();
}
catch ( Exception e )
{
e.printStackTrace();
}
}
public static void main( String[] args )
{
setMetaData( "c:/a.pdf", "c:/new.pdf" );
}
}
With iText of course: http://www.lowagie.com/iText/
Labels: Open Source
Alpha-Version vom JAva COm Bridge (JACOB) Plug-In
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Montag, September 29, 2008.Das Eclipse-Plugin http://jacob-project.wiki.sourceforge.net/Jacob+Gen+Plugin erlaubt über einen Menüeintrag einfach das Erzeugen von Stub-Code für den Zugriff auf Windows-DLLs.
Der Generator geht einen interessanten Weg über Eclipse JET, wie es die Webseite erklärt:
The plug-in uses the old, JacobGen 0.7, c++ program (dll) which reads a Microsoft's proprietary TLB file and writes out what it finds on stdout. From the information gathered the plug-in produces an ecore model based of what is found inside the TLB. At this point the plug-in has created a model of what's inside the DLL file. I.E. what classes and enums exist. The plug-in uses Java Emitter Templates (JET) to generate java code based on the above ecore model. It also produces the java method bodies to automatically call JACOB methods with the correct parameters. This will create a strongly typed java proxy, via JACOB, into the windows DLL.
So to wrap up. The plug-in reads the TLB file (using the existing JacobGEN DLL), creates a model based on the TLB / DLL file, and then produces a java proxy. The JET generated classes are really a proxy into the DLL via JACOB. So the end result is a set of java classes hiding all JACOB internal knowledge.
Labels: Open Source
Und überall sitzt die OSGi Service Platform drunter...
2 Kommentar(e). Veröffentlicht von Christian Ullenboom am Montag, September 29, 2008.Unter http://www.earthtimes.org/articles/show/world-leading-enterprise-application-server-providers,541827.shtml und http://www.osgi.org/blog/2008/09/impressive-press-release.html führen die Autoren auf, wie beliebt mittlerweile OSGi als Basis für Java EE Container ist. Peter Kriens führt folgende Container auf:
- IBM Websphere. They started in 2006 and aggresively moved their code on OSGi. Obviously it helped that IBM has committed itself to OSGi since day -1.
- Oracle WebLogic. Formerly known as BEA weblogic. BEA was one of the first companies public touting the advantages of OSGi, clearing the road for others.
- Paremus Infiniflow. Paremus has pioneered the use of OSGi in highly distributed application servers allowing the system to scale to unprecendented heights.
- ProSyst ModuleFusion. ProSyst is the key provider of OSGi technology in the embedded worlds but originated from the development of a J2EE server. They are now back in this market with an offering based completely on OSGi.
- Redhat JBoss. JBoss already worked with a microkernel approach but recognized the advantages of a standard two years ago.
- SAP Netweaver. Well, they are not yet based on OSGi, but they clearly see their future based on the OSGi specifications and are becoming more and more active in the OSGi Alliance.
- SpringSource Application Platform. The company that simplified Enterprise development with their Spring Framework decided to create their own offering in the application server market completely based on the OSGi specifications.
- Sun Glassfish. And last, but definitely not least, Sun decided to use OSGi in the JEE reference implementation Glassfish. They clearly take OSGi extremely serious nowadays since they also hired Richard S. Hall. It is so good to see Sun back at the OSGi Alliance.
Interessant sind zwei Feststellungen:
- In der Regel geben die Container die OSGi-Implementierung nicht nach oben weiter, abstrahieren also von den Internas. Nur einige Produkte erlauben, auch selbst OSGi-Bundles anzumelden.
- Java EE und das SpringFramework sind beides Nutznießer der OSGi-Plattform. Man kann nun fragen, ob man sich überhaupt noch mit OSGi selbst beschäftigen muss, wenn etwa GlassFish oder http://www.springsource.com/products/suite/applicationplatform gute Abstraktionen bieten.
Labels: Java EE, Open Source, Spring
Das erste Android Programm
1 Kommentar(e). Veröffentlicht von Christian Ullenboom am Freitag, September 26, 2008.Im Moment gibt es ein großes Rumgezampel wegen der NDA von Apple bei der Entwicklung von iPhone-Applikationen und das, was es als Applikationen in den Apple App Store darf und was nicht
- http://www.heise.de/newsticker/Programmierer-kritisieren-Apples-App-Store--/meldung/115950
- http://www.alleyinsider.com/2008/9/apple-s-iphone-developer-nda-kills-book-for-iphone-developers
Google macht das mit Android besser, da hier alles frei sind wird und auch jede Applikation in den Store kommt. Und ein erstes Programm ist schnell aufgebaut:
- Gehe auf http://code.google.com/android/download_list.html.
- Lade unter Windows zum Beispiel android-sdk-windows-1.0_r1.zip. Entpacke das Zip, etwa nach C:\Program Files\Java\android-sdk-windows-1.0_r1.
- Installiere über den Eclipse Update-Manager das Plugin unter der URL http://dl-ssl.google.com/android/eclipse/. Das dauert! Starte Eclipse neu.
- Unter Window > Preferences > Android trage das Verzeichnis C:\Program Files\Java\android-sdk-windows-1.0_r1 ein.
- Gehe auf http://code.google.com/android/intro/hello-android.html und führe die Schritte für ein neues Android-Projekt durch.
- In die generierte onCreate()-Methode setzte rein:
- Starte die Applikation wie unter http://code.google.com/android/intro/hello-android.html#run beschrieben im Emulator. Das dauert leider sehr lange!
super.onCreate(savedInstanceState);
TextView tv = new TextView(this);
tv.setText("Hello, Android");
setContentView(tv);
Labels: Android, Open Source
Java Wikipedia API
1 Kommentar(e). Veröffentlicht von Christian Ullenboom am Sonntag, September 14, 2008.Wer von Java aus auf die Inhalte von Wikipedia zugreifen, und die Inhalte auch noch Rendern möchte, findet mit der quelloffenen Java Wikipedia API (http://www.matheclipse.org/en/Java_Wikipedia_API) eine passende Unterstützung.
Zum Laden einer Wikipedia-Seite und Renderer in eine Datei ist lediglich nötig:
User user = new User( "", "", "http://de.wikipedia.org/w/api.php" );
List<Page> queryContent = user.queryContent( Arrays.asList( "Java (Programmiersprache)" ) );
String content = queryContent.get( 0 ).getCurrentContent();
WikiModel wikiModel = new WikiModel( "http://de.wikipedia.org/wiki/${image}",
"http://de.wikipedia.org/wiki/${title}" );
String rendererdHtmlContent = wikiModel.render( content );
FileWriter fw = new FileWriter("c:/test.html");
fw.write( rendererdHtmlContent );
fw.close();
Einige Dinge löst der Renderer aber nicht auf. So verbleiben im Text Wiki-Templates wie
- {{Infobox Programmiersprache}}
- {{IPA}}
- {{Wikiversity}}
- {{Wikibooks}}
oder bei anderen Texten
- {{Begriffsklärungshinweis}}
- {{Commonscat}}
- {{internetquelle}}
- {Literatur}}
Auch Bilder werden standardmäßig nicht richtig umgesetzt. So wird bei http://de.wikipedia.org/wiki/Linux aus
[[Bild:Linus Torvalds.jpeg|thumb|right|Linus Torvalds 2004]]
kein Bild, sondern ein Link
<a href="http://de.wikipedia.org/wiki/Bild:Linus_Torvalds.jpeg%7Cthumb%7Cright" id="w">Linus Torvalds 2004</a>
Dumm nur, dass %7Cthumb%7Cright falsch ist, sonst wäre wenigstens der Link korrekt. (%7C ist |)
Labels: Open Source
Unter http://www.theserverside.com/news/thread.tss?thread_id=50498 ging gerade die Nachricht rein, dass GWT 1.5 nun final ist.
- GWT Home: http://code.google.com/webtoolkit/
- Download: http://code.google.com/webtoolkit/download.html
- Announcement: http://googlewebtoolkit.blogspot.com/2008/08/gwt-15-now-available.html
Labels: GWT, Open Source
DZone-Interview mit Sacha Labourey über JBoss AS 5
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Sonntag, August 24, 2008.Gibt es unter http://java.dzone.com/videos/tech-chat-sacha-labourey-jboss.
Natürlich galt es im Interview zu klären, warum man auf JBoss 5 so lange warten muss. Fertig ist er aber immer noch nicht!
We are very close to GA.
Warum noch immer nicht soweit? Weil der JBoss einen ganz neuen Microcontainer bekommt und weil unter anderem die Messaging-Lösung (JBoss Messaging) neu entwickelt wurde und JBoss 5 einen neuen Transaktions-Monitor bekommt. Einen Lacher erntet er bei mir aber mit:
Intuitively people usually think that it is an issue with the J2EE spec and how much time it took us to implement this pretty significant update of the J2EE spec.
JBoss war immerhin einer der ersten Container, die EJB 3 unterstützten. Aber Web-Services machen den JBoss 4 immer etwas Probleme, was auch an der Integration von Axis lag.
Ich sehe eher weniger gute Zukunfsaussichten für JBoss. Mit der wachsenden Popularität von GlassFish und Geronimo wird JBoss 5 zu kämpfen haben. GlassFish und Geronimo/IBM WASCE sowie WebLogic Server v10.0, SAP NetWeaver 7.1, Apusic Application Server, TmaxSoft JEUS 6, NEC WebOTX 8.1 sind (zum Teil schon sehr lange) Java EE 5 zertifiziert (http://java.sun.com/javaee/overview/compatibility.jsp) und JBoss 5 hat das auch noch vor sich.
Weiterhin glaube ich in der Java-Community einen Trend in Richtung der Sun-Implementierungen erkennen zu können, was zum Beispiel die RI für JavaServer Faces, aber auch etwa JAX-WS für Web-Services angeht. Interessant ist auch, dass GlassFish die JSP-Servlet-Übersetzung optimiert über JSR 199 regelt, eine Entwicklung, die eben nicht von Tomcat ausgeht. So nutzt auch Jetty das. (Schon 2006 war zu lesen: "patch to allow Jetty to use JSP2.1 from Glassfish instead of Jasper from Tomcat"). Von GlassFish geht im Moment ein sehr starker Zug aus und es bleibt sehr spannend.
Labels: Java EE, Open Source
- Java 1.5 Support
- Compiler Enhancements to Improve Application Speed
- UI Library Additions: Widget Animations, Visual Themes
- DOM API for simplified DOM Programming
- Internationalization Improvements: Bi-di, Pluralization
- Accessibility Support
- Enhancements to the JRE Emulation Library
Labels: GWT, Open Source, Web Frameworks
VisualVM 1.0 + JDK Integration
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Freitag, Juli 25, 2008.VisualVM ist nun in der Version 1.0 final. Ein erstaunliche Neuerung ist, dass Sun VisualVM in das Update 7 von JDK 6 integriert hat; sonst wurden noch nie in Updates neue Tools integriert.
Die wichtigsten Features von der Webseite:
Display local and remote Java applications. VisualVM automatically detects and lists locally and remotely running Java applications (jstatd must be running on the remote host). You can also define applications manually by JMX connection. This way you can easily see what Java applications are running on your system or check if a remote J2EE server process is alive.
Display application configuration and runtime environment. For each application VisualVM shows basic runtime information: PID, main class, arguments passed to java process, JVM version, JDK home, JVM flags and arguments and system properties.
Monitor application memory consumption and runtime behavior. VisualVM monitors application heap and permanent generation memory, number of loaded classes and running threads. You can easily detect suspicious memory consumption and take an action - invoke garbage collection in the application or take a heap dump and browse the contents of application heap.
Monitor application threads. All threads running in a Java process are displayed in a timeline. You can track thread activity and uncover inefficient patterns like blocked Event Dispatch Thread or unused worker threads.
Profile application performance or analyze memory allocation. VisualVM has a built-in application profiler which can visualize where most of the time is being spent or which objects consume most of the memory by just one mouse click without any additional configuration.
Take and display thread dumps. Taking and displaying a thread dump is as easy as clicking a mouse button. You don't need to deal with the command line at all to determine what's currently happening in the application. Moreover, simultaneous thread dumps of multiple applications can be taken at once to start uncovering distributed deadlocks.
Take and browse heap dumps. When you need to browse contents of application memory or uncover a memory leak in your application, you'll find the built-in HeapWalker tool really handy. It can read files written in hprof format and is also able to browse heap dumps created by the JVM on an OutOfMemoryException.
Analyze core dumps. When a Java process crashes, a core dump can be generated by the JVM containing important information about application state at the time of the crash. VisualVM is able to display application configuration and runtime environment and to extract thread and heap dumps from the core dump.
Analyze applications offline. VisualVM is able to save application configuration and runtime environment together with all taken thread dumps, heap dumps and profiler snaphots into a single application snapshot which can be later processed offline. This is especially useful for bug reports where users can provide a single file containing all the necessary information to identify runtime environment and application state.
Die Webseite sieht auch viel schicker aus (was für die anderen java.net-Projekte aber nicht gilt).
Werbung: Wir haben neue/aktualisierte Seminare.
Labels: Open Source
Doclet APIviz für nette UML-Diagramme
2 Kommentar(e). Veröffentlicht von Christian Ullenboom am Freitag, Juli 25, 2008.APIviz ist ein LGPL-Doclet, welches nicht nur die klassische JavaDoc-API erstellt, sondern gleich dabei noch UML-Diagramme. Die Diagramme werden generiert von http://www.graphviz.org/.
Hier ein Beispiel, wie das nach dem Erzeugen aussieht:
net.gleamynode.netty.buffer
Class HeapChannelBuffer
java.lang.Object
net.gleamynode.netty.buffer.AbstractChannelBuffer
net.gleamynode.netty.buffer.HeapChannelBuffer
- All Implemented Interfaces:
- Comparable<ChannelBuffer>, ChannelBuffer
- Direct Known Subclasses:
- BigEndianHeapChannelBuffer, LittleEndianHeapChannelBuffer
public abstract class HeapChannelBuffer
- extends AbstractChannelBuffer

- Version:
- $Rev$, $Date$
- Author:
- The Netty Project (netty@googlegroups.com), Trustin Lee (trustin@gmail.com)
Labels: Open Source
Zwei Open-Source Bibs für Java ME Entwicklung
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Mittwoch, Juli 02, 2008.Wer für die Java ME entwickelt, der muss vieles selbst machen, da die CLDC/MIDP-Bibs doch relativ schwach sind. Zwei Open-Source Bibs, die dort Arbeit abnehmen können, sind:
- kommons - JavaME reusable objects; hat nix mit KDE zu tun :-)
The goal of the project kommons is to provide a set of reusable objects useful to make networking, object persistence (Caching), logging, working with Strings (Iso, UTF8) and many more... - 59pixels Open Source J2ME Libraries
Some of the libraries which 59Pixels have built up over the last year. Most of them are the first generation versions and are not as polished or as efficient as they could be but we have been able to distribute our products on over 150 handsets so I'm sure they will be useful to you.
Labels: Open Source
Apache POI 3.1 final
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Mittwoch, Juli 02, 2008.Von http://poi.apache.org, der Open-Source Bib. zum Verarbeiten von MS Excel-, PowerPoint-, Visio- und Word-Dateien, gibt es eine neue Version. Änderungen sind unter anderem:
Highlights in POI-HSSF - Java API To Access Microsoft Excel Format Files:
- Major improvements in formula evaluation
- Support for conditional formatting
- Support for Excel hyperlinks
- Handling of embedded OLE2 documents
- Support for getting excel cell comments when extracting text
- Support for specifying a policy to HSSF on missing / blank cells when fetching
Highlights in POI-HSLF - Java API To Access Microsoft PowerPoint Format Files:
- Support for getting embedded sounds
- Support for getting embedded OLE objects
- Support for Tables
- Improved text extraction
- Export PowerPoint slides into image
- Java2D Graphics driver
Highlights in POI-HWPF - Java API To Access Microsoft Word Format Files
- Handling of embedded OLE2 documents
- Support for extracting Escher images from HWPF files
- Improved Range.replaceText()
Ich bin gespannt, ob sich mit der MS-Initiative, Dokus anzubieten, die Bib. noch weiter und vollständiger entwickeln wird:
Labels: Open Source
Open Source Docking Frameworks
3 Kommentar(e). Veröffentlicht von Christian Ullenboom am Montag, Juni 16, 2008.http://lopeathal.wikispaces.com/Open+Source+Docking+Frameworks gibt einen Überblick über Docking-Frameworks:
| Name | Development | Licens | Size | Comments |
| MyDoggy | active | LGPL | only jar's: 0.5 MB | |
| NetBeans | active | CDDL/GPL | 4.6 MB (platform.zip) | |
| XUI | active | MPL | 1.6 MB (XUI-jdk15.zip) | |
| JDocking | inactive | CDDL | 1.3 MB (v0.8.zip) | the docking part of netbeans |
| JRichClient | active | GPL | heavy development | derivation of flexdock |
| FlexDock | inactive community although there is a new version (bugfix) | MIT | only jar's: 0.5 MB | |
| Sanaware | active | GPL or Commercial | full zip 0.3MB | |
| InfoNode | last version January 2007 | GPL | | |
| VL Docking | one year old - inactive? | CeCILL/GPL | | |
| Eclipse | active | CPL or EPL | ? | only swt (?) |
| Docking Frames | active | LGPL 2.1 | 0.7 MB | |
Labels: Open Source, Swing
JPA for Amazon SimpleDB 0.4-Update vom 20.4.
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Mittwoch, Mai 28, 2008.Ein abgefahrendes Projekt ist eine JPA-Schnittstelle für die Amazon SimpleDB (Amazon S3 (Simple Storage Service)). Mit http://code.google.com/p/simplejpa/ lässt sich auf die Amazon-Datenbank über das standardisierte JPA zugreifen. Die Doku unter http://code.google.com/p/simplejpa/wiki/GettingStarted listet alles nötigen Jar-Dateien auf und zeigt anhand eines kleines Beispiels die Nutzung. Da die Amazon-DB keine "richtige" relationale DB ist, gibt es auch einige Einschränkungen, etwa "Can only query on a single object type, no joins." Auf der anderen Seite:
- Supports ManyToOne references with lazy loading
- Supports OneToMany collections with lazy loading
- Large object (LOB) support via Amazon S3
- Caches objects for quick response after first retrieval
- Retrieves result sets concurrently for fastest retrieval from SimpleDB
- JPA Queries (subset)
- @ManyToOne - object references. Stores id reference to another object in another Domain
- @OneToMany (java.util.List only, must be generified, must be bi-directional with mappedBy parameter) - Collection support. Please be careful with collections, usually better to just query for what you want rather than attaching via collections.
- @Inheritance - Only SINGLE_TABLE supported (only one that makes sense).
- @MappedSuperClass - Useful for a common ID and timestamping class.
- @Lob - stores lobs in S3 so make it as big as you want (up to 5GB).
- @Id - MUST be a string
- JPA Queries - see JPAQuery page
- Integer and Long - no problems, all good.
- Double - pads to 20 digits on each side of the decimal by default so fine for a lot of cases, but if you plan to use Double's, let us know so we can work it out perfectly. SimpleDB makes it hard to work with these numbers because it treats everything as a String.
- BigDecimal - same problems as Double
- String
- no primitives yet! Please use wrappers only for now.
- @Enumerated (ordinal and string)
- @Column (name only)
Labels: Open Source
Cargo: Automatisch Web-/JavaEE-Container starten/stoppen und Module Deployen
2 Kommentar(e). Veröffentlicht von Christian Ullenboom am Mittwoch, Mai 28, 2008.Cargo (von Vincent Massol) bietet Java-APIs sowie Ant und Maven Unterstützung, um Web- und Java EE-Container zu starten/stoppen und Module zu deployen. Die Liste der Server ist erst einmal toll: Geronimo, JBoss, Jetty, Resin, WebLogic, Tomcat (kein WebSphere!). So gut die Idee auch ist, leider ist das Projekt soweit gestorben. Wer Lust hat, darf gerne project lead werden. Na ja, die letzte Version ist von 10/03/07 und bisher hat sich noch keiner gefunden.
Labels: Open Source
GWT-Beispiel in Eclipse
2 Kommentar(e). Veröffentlicht von Christian Ullenboom am Sonntag, Mai 25, 2008.- Beziehe Tomcat 6.0 und entpacke es.
- Beziehe GWT 1.5: http://code.google.com/webtoolkit/download.html. Gerade aktuelle Version: http://google-web-toolkit.googlecode.com/files/gwt-windows-1.5.3.zip
- Lade Eclipse IDE for Java EE Developers (http://phoenix.eclipse.org/packages/)
- Beziehe Cypal Studio for GWT (http://code.google.com/p/cypal-studio/downloads/list).
Das Neue bei Eclipse 3.4: Man packt das GWT-Plugin aus und setzt es in einen
neuen Unterordner Cypal/plugins von Eclipses dropins-Ordner
(und nicht wie früher plugins). Zum Beispiel stehen dann die drei
Jars direkt unter C:\Programme\Eclipse\eclipse\dropins\Cypal\plugins. - Starte Eclipse
- Zwei Einstellungen unter Window > Preferences sind vorzunehmen: 1) Installieren in Eclipse Tomcat 6.0. Gehe unter Server > Runtime Environment, Add, ... 2) GWT-Pfad einstellen: Bei Cypal Studio das GWT Home anpassen.
- Lege in Eclipse ein File > New > Other > Web > Dynamic Web Project an. Unter Configuration gehe auf Modify. Setze ein Häkchen bei Cypal's GWT Facet. Setze Java auf 5.0. Das JavaScript Toolkit ist nicht nötig.
- Beim neuen Web-Projekt gehe auf Properties, dann Java Build Path im Reiter Libraries. Lösche die Apache Tomcat Libraries.
- Lege mit File > New > Other > Cypal Studio ein neues Module an. Gib Paketnamen und Name an. Das Plugin erzeugt daraufhin ein Unterpaket client, mit der Klasse, die EntryPoint erweitert.
- In die Vorlage setzte in onModuleLoad():
RootPanel.get().add( new Button( "Sag 'Hallo'", new ClickListener() {
public void onClick( Widget w ) {
Window.alert( "Hallo" );
}
} ) );
Lasse Strg+Shift+O alle import-Anweisungen einsetzen. (Paket com.google.gwt.core.client und com.google.gwt.core.client.io). - Auf dem Projekt gehe unter Run As > Run Configuration, GWT Hosted Mode Application, New_configuration. Ist das Modul ausgewählt. startet Run die Google GWT-Umgebung.
- Für einen neuen Service öffne File > New > Other Cypal Studio > Remote Service. Der Service soll FileService heißen. Die Service-URL soll file heißen. Bestätige den Dialog. Der Generator legt eine Klasse und eine Schnittstelle für die Client- und eine weitere Klasse für die Server-Seite an. Wähle zunächst den Client aus com.tutego.client.FileService. Setze in den Rumpf der Klasse die Methode String[] getFiles(String path);. Ein Compilerfehler taucht dann bei der Realisierung com.tutego.server.FileServiceImpl auf. Setze dort hinein: public String[] getFiles( String path ) { return new File(path).list(); }
- Erweitere in der Hauptklasse die Methode onModuleLoad() durch:
final ListBox listBox = new ListBox();
FileService.Util.getInstance().getFiles( "c:/", new AsyncCallback<String[]>() {
public void onFailure( Throwable throwable ) { }
public void onSuccess( String[] strings ) {
for ( String string : strings )
listBox.addItem( string );
};
} );
RootPanel.get().add( listBox ); -
Zum Weiterlesen http://blogs.pathf.com/agileajax/2007/07/36-gwt-tutorial.html
Labels: GWT, Open Source
Swing-Komponenten: JIDE Common Layer
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Samstag, Mai 24, 2008.JIDE ist ein Unternehmen, welches schon seit vielen Java qualitativ hochwertige Swing-Komponenten baut. Einige der Komponenten sind frei (JIDE Common Layer (Open Source Project)), weitere wie das Docking-Framework, Action Framework, (Pivot) Grids, Code Editor und weitere gehören zum kommerziellen Teil. Die Komponenten aus dem JIDE Common Layer stehen unter dual-license: GPL und free commercial license.
Textbox, die sich automatisch erweitert

Tabelle und Liste mit Checkboxen, Split-Pane mit mehreren Bereichen


Neue Border und Border-Layout mit anderer Anordnung Norden und Süden

Button-Gruppe und Datums, Popupmenü verbreiterbarer Größe und Zeit/Datum-Auswahl

Neue Standard-Dialoge

Verzeichnisauswahl

Overlay legt Komponenten über andere Komponenten

Scrollpane mit Platz für weitere Komponenten, Slider mit zwei Enden

Container mit Suche und Selektion


Statt Scrollbar automatisches Scrollen durch Pfeile

Diverse Label

Reiterkomponente

Labels: Open Source
YUI4JSF: JSF-Komponenten auf der Basis der Yahoo UI Library
1 Kommentar(e). Veröffentlicht von Christian Ullenboom am Samstag, Mai 17, 2008.YUI4JSF (http://yui4jsf.sourceforge.net/) bietet auf der Basis der The Yahoo! User Interface Library (YUI) neue JSF-Komponenten:
- Accordion Menu
- CommandButton
- Ajax CommandButton
- CommandLink
- Menu Button
- Auto Complete
- Slider
- Calendar
- Datatable
- Column
- Editor
- Menu
- MenuBar
- SubMenu
- Menuitem
- Menu Button Item
- TreeView
- TabView
- Tab
- SortList
- SlideShow
- Panel
- Dialog
- Simple Dialog
- Choose Color
- Input Color
- Tooltip
- Logger
Die Webseite schreibt über das YUI4JSF-Projekt:
Components that wrap around builtin YUI Widgets. YUI has many widgets like calendar, slider, autocomplete, treeview, inputColor and etc. YUI4JSF takes these widgets and provides pure JSF Components which take care of the javascript and server side interaction.
Components powered by YUI Utilities. YUI Utilities like DragDrop Utils are used to create custom components like SortList or Accordion Panel.
AJAX Forms (Beta). YUI4JSF Ajax components like ajaxCommandButton ajaxifies your existing forms in few seconds.
Layout Engine (Experimental). YUI4JSF provides a templating engine that helps creating a flexible layout mechanism in your JSF pages.
Das Demo (http://www.nightdev.devisland.net/yui4jsf-examples) zeigt die Komponenten live. Wenn ich allerdings das Look-and-Feel der YUI-Beispiele mit denen von YUI4JSF vergleiche, kommt YUI4JSF irgendwie schlechter weg.
License: Apache License V2.0
Labels: Open Source, Web Frameworks
Vom VisualVM (https://visualvm.dev.java.net/) gibt es eine erste 1.0 Version.
May 6th, 2008: VisualVM 1.0 RC released. This is mainly a stabilization release: many bugs have been fixed and performance and memory management have been significantly improved. The only new feature is the Start Page which contains useful links to VisualVM documentation and JDK monitoring and troubleshooting guides. Sources for this release are available in
release10branch.

Es sieht so aus, als ob VisualVM in Java 7 als weiteres Tool neben der JConsole einzieht. (Oder vielleicht auch VisualVM sich die JConsole einverleibt und dann VisualVM das "Hauptprogramm" wird. VisualVM erlaubt -- genauso wie auch die JConsole -- Plugins, und eines ist eben für MBeans.)

Labels: Java SE, Open Source
JSF-Woodstock Komponenten 4.2
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Freitag, Mai 16, 2008.Die quelloffene JSF-Komponenten-Sammlung https://woodstock.dev.java.net/ ist in einer neuen Version 4.2 veröffentlicht. Demos der Komponenten gibt es unter http://webdev2.sun.com/example/faces/index.jsp. Interessant finde ich die Rate-Komponente und das Common Tasks Page.
Labels: Open Source
Java nach C# Übersetzer von ILOG Open-Source
0 Kommentar(e). Veröffentlicht von Christian Ullenboom am Donnerstag, März 06, 2008.ILOG hat ihren Übersetzer von Java nach C# quelloffen gemacht. Da Projekt ist unter SourceForge gehostet. Eingebunden ist es über Eclipse und dann macht man einfach nur ein File > Export. Es unterstützt Java 6 mit allen Java 5 Features wie Generics, Enums, foreach.
PS: Aktualisiertes tutego-Seminar Oracle Discoverer für Anwender
Labels: Open Source







for more stories. 
