Edwin Goei's Blog

My IRC Setup

Wednesday Nov 14, 2007

I use IRC (Internet Relay Chat) to work with other people on various projects. I also use IM (Instant Messaging) but unlike the common IM systems, IRC provides channels that users can join. So for example, there is a "#jmaki" channel on Freenode for people who are interested in the Jmaki Project. See a previous entry for more information about using Freenode.

I like using Chatzilla because it is cross platform and has features like "/stalk" that I use. However, it was originally a browser add-on. Well now there is a standalone version which I just installed. It's not the easiest install procedure and I also had to copy over my old preferences manually using a text editor. Look for the "prefs.js" file in your browser's profile directory and copy properties that start with "extensions.irc.". Then merge them into the new chatzilla "prefs.js" in its profile directory.

I serendipitously found a page that shows how to do the equivalent of Chatzilla's "/stalk" in various irc clients. I know other people who use X-Chat Aqua which like Chatzilla is cross platform. It might meet your needs, but I was already used to Chatzilla and didn't want to learn how to configuring it. I was also unsure if it was being maintained.

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

My Blog Has a New Theme

Wednesday Nov 14, 2007

I've been meaning to update my old theme for a long time. So this morning I started to work on it. I started with an existing shared Sun roller blogger theme and am modifying it. It's still a work in progress.

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

VMware Fusion 1.1 is Out (was: VMware Fusion 1.1 RC1 Patch Works)

Sunday Nov 11, 2007

Update: VMware Fusion 1.1 final release is out, resuming a virtual machine (VM) works but it still causes a kernel panic when I boot a VM. See this link for more info.

There are a couple bugs with VMware Fusion 1.1 Beta like flakey bridged networking and a caps lock remapping bug so I tried 1.1 RC1. However, it caused a kernel panic on my Mac :-(. Recently, someone posted a patch that fixes this bug. See these instructions on getting it to work.

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

Installing SXDE on VMware Fusion 1.1 Beta

Thursday Oct 25, 2007

I recently installed Solaris Express Developer Edition (SXDE) on my Mac using VMware Fusion 1.1 Beta. It's not as straight forward as it could be so here are the details. Based on the SXDE instructions, I had to modify the default configuration for Solaris 10 to create a VM with 768MB of memory and 20GB of disk. I also had to add the line below to the ".vmx" file to get Solaris to run in 32-bit mode. See this link for details.

monitor_control.disable_longmode = 1

Installing the VMware tools enables features such as integrated mouse movement and cut and paste and its installation is documented in the VMware manual. Hopefully, the final release of Fusion will have these problems fixed. I've also installed SXDE on the latest version of Parallels 3.0 and am in the process of comparing the two of them.

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

Making Other Components Work in NetBean VisualWeb Pages

Friday Jul 20, 2007

A reader asks:

Im using Netbeans 5.5 for a JSF web application that is about to kick off soon… We’re using Apache Myfaces Trinidad, and want to add these components to the Netbeans palette to we can drag and drop the components as we need them. I’m not sure how this is done in a Netbeans Visual Web Application, and reading over you blog we might need a complib for this?

I've tried doing some of this in the past. (For example, see this link.) You are correct that you need to create a component library and package it up as a complib file. Unfortunately, it's not as easy as it should be and requires a major commitment if you are doing it yourself. The last time I worked in this area was with visualweb jMaki components. Project jMaki contains a rich set of components many developed from other independent projects such as Yahoo, Dojo, and Scriptaculous. Sun also has a team of engineers working on Project Woodstock. The Woodstock components are the built-in components that are part of NetBeans visualweb pages.

BTW, the most current version of NetBeans is NetBean 6 M10.

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

New Blueprints Ajax Component Library Version

Tuesday Jul 10, 2007

Matt has fixed several bugs (104788, 92496, 99144, 108695) in the Blueprints Ajax Component Library and released version 0.1.2. To download the latest, go to this page of complib files. I am told that the posted version 0.1.2 has not yet gone through extensive testing and to remind users that these are sample components and so are not supported at the same priority level as the built-in components.

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

Freenode IRC Server Details

Monday Jul 09, 2007

The group I work in is using an IRC server for communication. Some people have asked me what my setup is. I currently use Chatzilla as my main client because it is cross-platform and has a "/stalk" command which will ping me when certain words like "anyone", "someone", and "lunch" are used on a channel. Chatzilla can be easily installed as a Firefox Browser Add-on. Information on other IRC clients that team members use are listed on this wiki page. The details below use the Chatzilla as an example, but you can use similar steps for other IRC clients.

Say you want your nick to be "joeuser". In chatzilla you specify this in: Chatzilla->Preferences->General->Identification. You then connect to an IRC server such as freenode.net:

/attach freenode

You can then join a channel, for example "#nbdev":

/join #nbdev

On freenode, user registration is optional but it allows you to reserve your nick and to send private messages to others. If you register, you only do this once. Pick a password, say "mysecret". Register your nick and password by sending it to the "nickserv" robot:

/msg nickserv register mysecret

This sends a private message to the robot. The robot knows the message came from "joeuser" because that was what your nick was set to. The message is to register a password with that nick and the password is "mysecret".

The part that you do each time you connect is the equivalent of logging in. To do that you send a private message to the nickserv robot what your password is. Do this as follows:

/msg nickserv identify mysecret

This sends a private message to the nickserv robot and it knows it comes from "joeuser" because that is your current nick. The private message is that you want to login with the password you registered earlier. If all goes well, you can then send private message to other users.

You can put the following in Chatzilla->Preferences->freenode->Lists->Auto-perform:

"/msg nickserv identify mysecret"
"/join #nbdev"

This will cause chatzilla to automatically run those commands when you connect to "freenode".

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

Firewalls and Accessing Source Repositories

Tuesday Jun 26, 2007

This article applies to companies that have firewall configurations that are similar to Sun's. Many companies such as the one I work for (Sun) have a firewall which presents problems with accessing source code repositories on the Internet. This documents the approach I use.

To elaborate further, it works because we have Direct Internet Access (DIA) now. What I do is use the public repository hostname in my trees, like: CVSROOT=:pserver:USER@cvs.netbeans.org:/cvs. I handle the three separate cases this way:

  1. In the office on SWAN, it works because of DIA
  2. Off SWAN, it works because it's the real hostname
  3. VPN on SWAN, I change the /etc/hosts file so that it points to the internal proxy.
See this link for more information.

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

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

Unexpected Behavior: Visual Component Does Not Appear on Page

Thursday Apr 12, 2007

A component developer described the following problem to me:

I have developed the custom component in netbeans. There are no errors, I am able to build the complib successfully. But the problem is, when I drag and drop the component, I am not able to see that in design page or JSP page but I am able to see the component in outline window, Java source and properties…etc.

This caused me to add a troubleshooting section to a page that badly needs updating. The pertinent information is repeated here.

If you try to add a new visual component from the palette to a page in the IDE and expect something to appear on the page and instead only see the component in the Outline view, then this often means that the associated custom BeanInfo class of the component cannot be instantiated. In reality, a default BeanInfo class is created internally by introspection, but the default is not very useful. One way to check this is to write a unit test that instantiates the BeanInfo classes of your components.

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

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

Wednesday Apr 04, 2007

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 java.net 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.

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

Speeding Up Visual Web Component Development

Tuesday Mar 13, 2007

If you're a component developer who doesn't mind working on the bleeding edge and are writing new components for NetBeans Visual Web Projects (WVP), this entry is for you. Writing components for VWP using the tried and true method of building and creating a complib file and then importing it into the IDE produces a long painful edit-deploy-test cycle. I've been there because I am also currently working on adding VWP support for jMaki components. See the NetBeans RFE on this very problem.

I've created a first pass implementation to fix this problem on the NetBeans 6 trunk. Unfortunately, it has some file locking issues on Windows that I haven't figured out, but by restarting the IDE, it should still be somewhat usable. It's also on the bleeding edge so be prepared for some other possible unknown IDE instability, but having used it myself for a week or so leads me to think that it is an improvement. The basic idea is that the component library will exist in one or more NetBeans Library projects. Your test webapp will exist in a separate NetBeans Web project. The test webapp NetBeans Web project will depend upon the component library NetBeans Library project to provide it with the classes it needs for the components. In effect, component libraries are implemented as standalone projects that are shared instead of embedded within a Web project. For more information on component libraries see the main component library page I maintain.

To use this new feature, you first need to run a current version (around 2007-03-02 or later) of the NetBeans 6 trunk. Next, create at least one NetBeans Library project that contains your component library. The project should have an ant target to build a "complib" file and the current implementation assumes it will produce an expanded directory structure at "$(my-project-dir)/build/complib/".

The next step is to create a test webapp NetBeans Web project. As I understand it, in NetBeans 6, there will no longer be a separate "Visual Web" project. Instead there will be a single "Web" project with a "Visual JSF" framework that you can add to it so be sure to select the "Web Project" in the New Projects Wizard and ignore the "Visual Web Project" if such an entry still exists. Proceed to add the "Visual JSF" framework. The following UI is temporary. Open "index.jsp" and select the "Design" view. Select Tools->Shared Component Libraries. Use this dialog to manage any shared libraries that are being used by the currently active project. The dialog recognizes open component library projects that are in the format described above. It also allows you to see which shared libraries the currently active project depends on and also to refresh the palette.

A typical development cycle goes like this:

  • Add a component from the palette to the test webapp.
  • Test the component at design-time and runtime.
  • See something is wrong.
  • Fix the problem in the component library project.
  • Rebuild the component library project.
  • If needed, refresh the palette from the Shared Component Libraries dialog.
  • Retest by building the test webapp.

Note: as I mentioned before, on Windows there are file locking issues that I haven't resolved, but by restarting the IDE or maybe even only closing and re-opening projects and the deployment server, it should still be somewhat usable. I'd appreciate any feedback so please let me know if this is useful to you.

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