Edwin Goei's Blog

Sample Ajax App with JMaki Yahoo AutoComplete Widget

Friday May 04, 2007

In my last post, I talked about getting jMaki components to work in NetBeans from a component developer perspective. However, most IDE users are interested in how to build their own domain-specific app. I've created a demo script that uses a Yahoo YUI autocomplete widget to look words up in a dictionary. You can try it yourself because all the instructions are there, including all necessary downloads such as the latest NetBeans 6 M9 preview release. Alternatively if you have access to the JavaOne pavilion, you can ask for a demo at the NetBeans Visual Web booth. Tell 'em I sent you. :-). As I understand it, a pavilion pass is easier to get, though I don't know the details on how to get one.

Below is a screenshot of the app in the IDE.

Please note that the Yahoo component library is a work in progress and may not be product quality. However, it does show some of what is possible given enough resources.

[6] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

JMaki Support for NetBeans Visual Web Pages

Friday May 04, 2007

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.

[2] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

JavaOne Week and New CommunityOne Day

Friday May 04, 2007

Is it that time of the year again? Guess so, next week is JavaOne week -- a bit earlier than last year. Also, this year Sun is sponsoring a new free event called CommunityOne. I think this is a great idea because I suspect lots of people might not have the money to pay to go to JavaOne. I think a recent trend in the software biz is that there are many more smaller companies and individual developers compared to big large companies than there used to be. A phenomena I've heard referred to as The Long Tail. These days you can buy a laptop and write code in a cafe for a few thousand dollars -- there's less of a need for a large company with lots of capital to give you equipment. I hope CommunityOne turns out as good as it sounds. I just registered for it so maybe I'll see you there.

It's been a stressful time for me recently because other people expect things from me for JavaOne that I wasn't able to deliver and I don't do well when people are upset with me. But, I am trying to step back and keep it in perspective. Talking to friends has helped and writing about it too. One of the big tasks I've been working on recently is the subject of my next post on jMaki. I've also been working on some NetBeans 6 Visual Web IDE tasks for the JavaOne preview release. This didn't leave much time to do other tasks and maintain my sanity. Sorry to those I wasn't able to deliver the goods to.

[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg

Sample complib Files for NetBeans Visual Web Development

Friday May 04, 2007

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.

[0] Comments
Like this post? del.icio.us | furl | slashdot | technorati | digg