Find Time for Java and more!

4 November, 2009

TimeFinder – Powerful Optimization Algorithm, RIA and more

Filed under: Java, Swing, TimeFinder, Timetabling, springrc — karussell @ 11:50

TimeFinder is an Open Source Timetable Optimizer for universities and schools, which uses the Spring Rich Client project to create an easy to use application with a nice user interface, a database and … more bla bla …

ok, it is a bit dingy headline and a more dingy introduction, but I would like to invite you to test the latest development version v4 of TimeFinder now! And without such a headline you woudn’t have read this. And I feel that I would like to release TimeFinder in the next weeks, so I need some beta testers. Go here to see some screenshots.

Get the dev version of TimeFinder here, double click the jar (optionally read the documentation for v1) and tell me:

  1. If you understand the purpose of TimeFinder from the website
  2. If you understand the user interface and how you can insert data
  3. If you find a bug
  4. If you need other features

Any feedback is welcome! Please contact me at peathal AT yahoo |dot| de, post an email to the mailing list or simply leave a comment here.

12 October, 2009

VL Docking and other window docking managers for Java

Filed under: Java, Swing — karussell @ 07:27

Maybe you already know it;

there are several docking managers and since April 2009 (3.0) you can include VL Docking for free even in commercial applications, because its LGPL!

The good thing about VL Docking is (and of MyDoggy by the way …)  that it is well integrated into the Spring RC project.

More information about VL Docking

All Java docking managers

(look here for an old list)

Inactive projects

  • SwingDocking seems to me fully functional and fast; Apache license 2
  • XUI will be further developed here?; MPL; 1.6 MB (XUI-jdk15.zip)
  • JDocking CDDL; 1.3 MB (v0.8.zip) the docking part of netbeans
  • FlexDock MIT; only jar’s: 0.5 MB
  • JRichClient GPL; derivation of flexdock

Please let me know if you know other libraries which support ‘window docking’.

8 October, 2009

Java Application Frameworks (not only client side …)

Filed under: Eclipse, Java, NetBeans, Swing, Web2.0, springrc — karussell @ 11:07

In an old post I listed all Java libraries,where only two application frameworks were listed.

Today it is time to list some client side Java application frameworks, because I discovered some new ones while reading the W-JAX announcement. Some of the listed frameworks will make developing application with DB easier. And some of them are real 3 tier architectured frameworks. Some of them even allow you to develop RIA’s and web frameworks at the same time.

Here is now the list of open source Java application frameworks especially for the desktop. Feel free to add some more (via comment):

  1. NetBeans RC Platform, my IDE is build on this ;-)
  2. Eclipse RC Platform, has an interesting ’subproject’ called Riena
  3. Spring RC, at the moment my favourite used in TimeFinder
  4. AppFramework which won’t be in JDK 7, but has a lot of derivatives
    1. Swing application framework fork
    2. Guice Utilities & Tools Set
    3. Better Swing AppFramework
    4. with OSGi
  5. JVx, looks very nice! Makes fast development of Swing applications possible (with db support)
  6. OpenXDev a framework which could be used as a base for your next Swing project
  7. Genuine is a client framework for Java Swing applications for which it provides basic infrastructure
  8. Genesis with Swing and SWT binding; Easy, transparent remoting; etc
  9. GWT (although only intented for javascript widgets it could theoretically being used as a rich client running in the jvm)
  10. OpenSwing Framework is an open-source suite of advanced graphics components based on Swing toolkit
  11. Leonardi Framework
  12. Jspresso is a framework for building rich internet applications
  13. XUI is a Java and XML RIA platform
  14. Swing + XUL = SwiXAT looks interesting but dead, the same for the next:
  15. Swing + XML = SwiXml a small GUI generating engine.
  16. But why xml if you have groovy: Griffon ;-)
    Now, a nice approach would be to send/receive groovy code and build the clients’ GUI on fly… this would be like replacing the browser+html+javascript system with rock solid JVM+Groovy ;-)
    Another Comment from AndresAn addtional tidbit about Griffon, it can be seen as a polyglot programming desktop/RIA framework as it supports 5 JVM languages at the moment: Java, Groovy, Scala, Clojure and JavaFX. It also lets you embed JavaFX components on Swing containers.
  17. JMatter is a software framework for constructing workgroup business applications based on the Naked Objects Architectural Pattern.
  18. Metawidget is a ‘User Interface widget’ that populates itself, at runtime, with UI components to match the properties of your business objects.
  19. Pivot a platform for building rich internet applications in Java

Especially JVx with a webstart demo looks very promising! It even feels better and faster than an ordinary flash application!

Commercial:

  1. Aviantes-Business-Application-Framework
  2. Jide Desktop Application Framework
  3. Jazz

I listed only frameworks which help developers to easier build client side desktop application and only if they run in the JVM. So frameworks where the client is browser-based (aka web frameworks) are not listed here.

For a good list of J2EE frameworks go to java-source.net or to wikipedia. (Or here, or there, or even here)

Update: For additional comments look at dzone

16 September, 2009

Plugable Swing – A Hello World OSGi Example

Filed under: Java, Swing — karussell @ 21:12

There are a lot of OSGi applications out, a minority is for the client side. Here I will list some “on swing”:

  1. Apache-Felix-Demo
  2. Swing-Application-on-OSGi from Daniel Rohe
  3. Dynamic Swing OSGi Demo from Kai Tödter
  4. Examples from the OSGi in Action book
  5. Sip-Communicator
  6. Daro

Today I tried the same and had luck. It was very fast (~1h) to get all working what I wanted, because I shamelessly stole the code from the example of Apache Felix. It is even more easier than this example but should have the same effect: it shows how one could use OSGi even for a Swing application.

There is a host application called Swing On OSGi – Host with one JMenu which does not change (static) and one (dynamic) JMenu which could be changed from the available plugins (here only one: Swing On OSGi – PluginTest). The source code (Apache License 2) can be checkout via

svn checkout https://timefinder.svn.sourceforge.net/svnroot/timefinder/branches/swingosgi swingosgi

… you will need maven. After ‘mvn install’ for both projects you will only need to start the host application via your IDE or via

java -jar target/host-1.0.0.jar

Then if you see the “dynamic menu” with one menu entry (which was added from the plugin) all is fine:

helloOSGiWorld

If you have problems while building this send me an email or comment here.

I got the plugins even working in my timetabling application TimeFinder which uses the client-side framework called Spring Rich Client. The first plugin for Spring Rich Client – read more.

2 September, 2009

Swing Talks (video and slides available)

Filed under: Java, Swing, springrc — karussell @ 20:59

Maybe you already know that at parleys they put some nice presentations.

Especially the talk Spring is Swinging from Jo Wyns was impressive to me, where he talks about the Spring Rich Client project.

The presentation seems to be an old one (where is the date??), but it is even today a hot theme: rich desktop applications with database access (or internet connection). He concludes his talk with a tip, when to stop or when is is a bit too far. I think with too far he means projects like the metaframeworks I talked about earlier. And maybe this is true: in commercial applications nearly always you will need to customize views etc. then the simple “annotated domain object”-approach will only work for the first rapid prototype.

Have fun with this talk and with the related talks (here or here).

10 August, 2009

A Pagination-enabled List in Swing with Hessian

Filed under: Java, Swing, springrc — karussell @ 14:08

In an ealier post I documented how to set up a maven project to use port 80 for client-server-communication in a Java Swing project.

Today I want to show how you could implement a list which shows ‘all’ objects of one entity. It is common that there exists thousand or more objects for one entity in a database, so pagination is required. I know that JList and JTable could handle very large result sets easily, but the bandwith would be the limitating factor and loading all the objects into memory is often not required (and not good …).

I will use the simplest Swing solution with some pagination buttons, although it would be a lot nicer to have the pagination with a custom vertical JScrollBar-implementation which loads the objects while scrolling (‘on demand’). But this will be either a task for my readers or for myself at a later time. First we can take a look at the resulting (primitive) GUI:

paginationlist

The interface for the data access object was quickly created:

public interface RemoteDao<T> {
   List<T> getAll(int index, int items, String query);
   int count(String query);
}

… the implementatoin, too (but for this see the source in the provided project). You can simply replace the existing fake-implementation with a RemoteHibernateDao or sth. like this, if you like.

The communication follows this picture:

dao-hessian

To try this maven project: start PaginationServlet under the paginationlist package and then the PaginationClient. The Swing gui should pop up and you could hit enter after a search string like ‘person’ or ‘18′ in the textfield at the top. Now try to paginate through the results with the provided buttons at the bottom.

The final goal for me (at a later time) will be to replace the left ‘Available’-JList in a ShuttleList (from Spring rich client project) with my PaginationList. For you information: with a normal ShuttleList one could drop one or more items from ‘available’ list to ‘choosen’ with the buttons in the middle (they have nothing to do with pagination!). Here a normal shuttle list is shown:

shuttlelist-orig

So, now have fun with my small Swing example and feel free to provide feedback or ask questions if you need help while maven or sth. else!

Blog at WordPress.com.