X

Geertjan's Blog

  • May 20, 2006

Introduction to Platform-Based Rich-Client Application Development

Geertjan Wielenga
Product Manager
This was the final demo in the BOF I did with Petr Pisl on Thursday at 21.30. It illustrates the power of using a framework to create rich-client applications. In fact, you're not creating them, but assembling them. Here's how it goes:

  1. In the New Project wizard, choose NetBeans Plug-in Modules under Categories and then choose Module Suite Project under Projects. Click Next and name the project Text Editor. Click Finish.
  2. Right-click the Text Editor project node and choose Properties. In the Application category, select "Create Standalone Application". In the "Exclude IDE Modules" dialog box, choose Exclude. In Application Title, type "Text Editor". Click OK.
  3. Right-click the Text Editor project node and choose Run. The NetBeans Platform splash screen is shown. When it is deployed, the application looks as follows:

  4. Back in the IDE, right-click the Text Editor project node again, choose Properties, and then choose the Libraries category. Expand the platform6 node. Put a check mark in the "Favorites" item (i.e., select that item). Click OK.
  5. Right-click the Text Editor project node and choose Run. (I had to fiddle a bit here, also during the demonstration. Maybe because I eventually chose "Clean and Build All", it worked. I don't know. Before the fiddling, the Favorites item in the next step didn't appear. Maybe because I'm using a dev build.)
  6. Once the application is redeployed, go to the application's Window menu and choose Favorites. The Favorites window appears. Now right-click inside the Favorites window and open a file. And then open another one. Now you see this:


You can now make use of the NetBeans Platform's windowing system by dragging the Favorites window to a different position (hold down the tab with your mouse and then drag it):

To distribute the application, right-click the Text Editor project node again and choose "Build ZIP Distribution". A ZIP file will be built. It will include an executable for launching the application. You can also choose "Build JNLP Application", which will build the files needed for launching the application as a webstartable application.

The Favorites window is one of many modules that the IDE provides and which you can make use of. This is the simplest (useful) rich-client application that you can build on the NetBeans Platform. Others are outlined at http://platform.netbeans.org/tutorials. For example, there you can find out how to create an HTML Editor (which requires only slightly more work than this Text Editor) and a Feed Reader.

Join the discussion

Comments ( 3 )
  • Matt Ryan Saturday, May 20, 2006
    Geertjan,
    I have to say that you (along with many others there) are doing a fantastic fantastic job!
    I started trying to build on the NetBeans Platform at version 3.4 and found that I had to go right into the NetBeans source itself to understand the platform and what I was working with. It was so time-consuming for me that by the time I started to get productive was before 4.0 and using 3.6. I just gave up then.
    Your blog brought me back into the NetBeans swing of things. I think I caught one of your first posts and I dived right back into this stuff.
    Any news and posts you put out there are really valuable and inspire the rest of us.
    Good work!
    Matt
  • Geertjan Sunday, May 21, 2006
    Thanks Matt. I'm really just doing it out of a sense of enjoyment. Not always out of a sense of the sensible. (My co-presenter at the JavaOne BOF thinks I'm mad for wanting to create a Wicket IDE instead of just a Wicket module for NetBeans IDE. He also thinks that my text editor --described in this blog-- is really 'heavy' for a text editor, since it is built on the NetBeans Platform. However, in terms of example applications, I think these prove a point in terms of simplicity, if not in terms of common sense.)
  • Rich Unger Monday, May 22, 2006
    As someone who creates an IDE on top of netbeans (for developing voicexml apps), I wish I could do it just as a set of modules to plug into netbeans, but alas, sometimes marketing makes such decisions.
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha
Oracle

Integrated Cloud Applications & Platform Services