Sunday May 11, 2008

JFugue Music Application Platform

I suddenly realized that instead of turning Matt Warman's whole JFrets application into a single NetBeans module, I could turn each of its parts into separate modules. The cool thing is that JFrets provides a number of different tools that help with learning to play the guitar, such as a scale selector and a metronome. Here's the JFrets metronome:

I've always wanted a metronome in the JFugue Music NotePad... and now I do:

I simply copied the metronome parts of JFrets into a separate NetBeans module (which makes sense since both the original application and the destination application use Swing) and then slightly reorganized the ui so that it would fit snugly into the explorer view. When you click Start, the JFugue API is used under the hood to start the audible tick-tocking of the metronome, using the settings you set for the tempo, until you press Stop (which is what the Start button turns into once started). This means that I am now treating the JFugue Music NotePad as an application platform. Simply download the binary and then register it as a NetBeans Platform (under the Tools menu in the IDE). All the modules in the JFugue Music NotePad are then available to your own modules. One of these modules is the module that wraps the JFugue API JAR. So in your own module, such as the one which provides the JFrets metronome, you'd simply declare a dependency on JFugue, which the application made available. Then you can deploy the modules you create in the IDE to the JFugue Music NotePad, from within the IDE, via a menu item that would then start up the JFugue Music NotePad and install your module into it.

Now that the JFrets metronome is a module, I can do the same with all the other JFrets tools, as well as the main window itself. Then I could set up an update center that contains these additional modules. The update center would be automatically registered in the JFugue Music NotePad. All its users would then be able to install additional features, such as a metronome and scale selector, which originally all came from the same JFrets application. Of course, anyone else would also be able to install these tools into their own NetBeans Platform applications, such as the IDE. Not necessarily useful to have a metronome in the IDE, but it is at least possible.

About

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.

Search

Archives
« May 2008 »
SunMonTueWedThuFriSat
    
2
5
7
16
20
22
25
28
       
Today