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 "" 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.

Sample complib Files for NetBeans Visual Web Development

One feature of the original Creator IDE that has been carried over and improved into the current NetBeans 6 Visual Web IDE are complib files. Complib files provide web app developers access to third-party components that are not pre-packaged with the IDE itself. I've created a complib files wiki page with links to some complib files that I know about.

Wednesday Apr 04, 2007

Updating the Built-in Java EE 5 Components in Visual Web Pack

NetBeans Visual Web Pack (VWP) has several sets of built-in components. One of these is a built-in version of Project Woodstock components designed to be used with Java EE 5 containers. The Project Woodstock components have now been open-sourced on and it's possible to modify the components and update the built-in VWP Woodstock components. See this link for more information. I think the procedure is more difficult than it has to be so improvements in this area are welcome. I'd encourage anyone interested in this to join Project Woodstock.




« February 2016