Recently I began to play with Eclipse and several web frameworks as I will be using Eclipse at work and programming with JSP. Another reason for this web-framework-survey is that I need a web front-end for my open source project Jetwick.
I love Swing so I looked at how easy it is to program something useful with up-to-date web frameworks in comparison to Swing. For NetBeans support of several web frameworks such as GWT and Wicket take a look here.
I implemented a very minimalistic example in all frameworks, but it includes three basic components. The example offers a ‘Button’ to perform some gnuplot statements, which will be grabbed from a ‘TextArea’. On the server the statements will be performed (through gnuplot) and the user gets back the calculated image. E.g. if you type ‘plot sin(x)’ and click the button you will get the appropriated graph as an image within the web page.
I used the following statements for gnuplot and you can increase the isosamples to 100 to see what will happen if the respond of the server takes too long:
set isosamples 50
Just copy and paste this into the appropriate ‘TextArea’ of the application.
I chose GnuPlot for the following reasons:
- it is free and available under linux and windows.
- it looks nice
- integration into LaTeX is best (good for scientists)
I used my simple class (see WebGnuplot package) to get the image from gnuplot, although there is a nice JNIBinding for gnuplot available at sourceforge.
Here is the list of the frameworks used in the survey, and how to access the examples
- Click Framework: http://localhost:8080/WGClick/ClickApplication.htm
- Echo2: http://localhost:8080/WGEcho
- Google Web Toolkit: http://localhost:8080/WGGWT/gwt/GWTApplication.html
- Java Server Pages: http://localhost:8080/WGJSP/HomePage.jsp
- Thinwire: http://localhost:8080/WGThinwire
- Wicket: http://localhost:8080/WGWicket/
- WingS: http://localhost:8080/WGWingS/app/
- ZK Framework: http://localhost:8080/WGZK/webgnuplot.zul
Click on the links to go directly to the web page of the product. I will add some more frameworks in a later post such as struts, stripes, jsf and jzeno. Please make some suggestions here.
For some more Java web frameworks look on my own list, on java-source.net or on therightsoft.com. Or take a look at this nice comparison. Through this web framework comparison I have the feeling that there are some categories of frameworks:
- Swing like approach: Echo, Thinwire and WingS
- ‘Integrate components’ into HTML: Wicket and Click
- ‘integrate scripts’ into HTML: JSP, ZK (maybe better: ‘action based’?)
Please help me here to use existent categories.