Friday May 04, 2007

JMaki Support for NetBeans Visual Web Pages

A project I've been spending much of my time on recently is support for NetBeans Visual Web development on the jMaki project. This means creating components, or rather wrapper components, for the jMaki components. The jMaki project is a JavaScript framework that itself wraps other JavaScript components (i.e. widgets) and it also provides some of its own native components. Craig McClanahan started this sub-project of JMaki by creating JSF wrappers for widgets for the Yahoo yui TreeView and Tabbed View components. I added three others: Menu, AutoComplete, and Slider. You can download a prototype complib file.

Why would you want to wrap existing JavaScript components? Creating good JavaScript and Ajax components is hard, so why not leverage the work of others? I mostly worked on Yahoo yui widgets and many of them are well-designed and tested in the real world. After all, they're deployed on yahoo pages and other sites as well. Plus, there is an active user community and the code is open-sourced.

So why use an additional jMaki JavaScript wrapper instead of just creating JSF wrappers for the yui components? Yahoo yui is just one example of a nice JavaScript widget library. The same argument applies to other widget libraries too like Dojo and Scriptaculous. By using jMaki, it is possible to mix widgets from different underlying widget libraries and get them to work together.

Here are some screenshots of an older prototype which I haven't had time to update, but it still gives a good idea of how the widgets look in the IDE.

The next screenshot shows the same (older) prototype web application but deployed on a server and viewed in a browser. In this image, I hovered the mouse over "Goto" which caused a sub-menu of two web sites to slide out. Then, I moved the mouse over the "java.sun.com" sub-menu item, but the mouse does not show in the screenshot. Activating the item will go to that URL. This behavior was specified at design-time in the IDE.

So what did I learn from this work? Visual web component development is possible but it isn't the simplest task. Re-using an existing JavaScript widget does save a significant chunk of work, but there is still additional work with wrapping the widget with JSF and possibly jMaki, along with the accompanying debugging work. Making the components product quality would require a commitment of engineering resources -- though, less than if you were to also have to create the JavaScript widgets themselves from scratch.

If you're interested in learning more about the jMaki project and tools support and you will be in the neighborhood of San Francisco around the week of Monday, May 7, 2007 (ISO 2007-05-07), some of the key players will be speaking at JavaOne and CommunityOne. Even if you can't make it to JavaOne because of the cost, this year there is a free CommunityOne event that you can register for. For example, I did a search for Craig McClanahan and came up with this list of talks. You can also search for Greg Murray for jMaki talks and Ludo Champenois for other tools related talks.

About

edwingo

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today