NetBeans Modules for Dummies (Part 3)
By Geertjan-Oracle on May 07, 2005
Getting your feet wet
- NetBeans: How to write a HelloWorld module by Jerry Tan. This was the first accessible document I ever read on NBMs. It's short and sweet, even though I later realized that both Jerry and Elan (see below) re-invented the wheel to some extent, because they could have used a NetBeans project template to structure their NBM, rather than doing everything manually.
- Netbeans RCP In Action in Elan Meng's blog. I learnt two things from Elan: (a) the Ant script that creates an NBM and (b) how to hook an NBM into the NetBeans Platform.
Everything covered in the two links above, apart from the use of the NetBeans Platform (which Elan refers to as the Rich Client Platform), is also covered in NetBeans Modules for Dummies (Part 1) below. I intend to cover the NetBeans Platform soon.Up to your knees in it
- NetBeans Developer's Guide on the NetBeans site. Launch pad to a wide variety of NBM-related documents.
- Modules API Information on the NetBeans site. This is the best, most thorough, document I have yet seen on NBMs.
- FeedReader, A NetBeans Platform Sample and Tutorial by Rich Unger. This is really helpful (it covers a lot) especially when you have a little bit of background.
- NBM package technology on the NetBeans site. It's a bit old, but gives technical overview that's not too complex. It also tells you how to create your very own Update Center.
- Browse the NetBeans sources on the NetBeans site. This is great, because you can see how NetBeans developers structure their modules.
- NetBeans 4.x Project & Build System How-To on the NetBeans site. Learn more complex things, like writing your own project types.
- NetBeans API List on the NetBeans site. All the API's in a well-structured document. An endless source of information.
- How to use certain NetBeans APIs on the NetBeans site. A FAQ on the NetBeans API's! Really cool.
- New API Support—Proposal on the NetBeans site. Jesse Glick's new API Support proposal.
- Maven Overview. In a 26-page PDF document, here's a broad overview of Maven.
- Maven User Guide on the Apache Maven Project's site. It's a really accessible and friendly document.
- Moving away from build.xml (and towards Maven2) in Michael Nielsen's blog. Interesting discussion about why and why not to use Maven.
- Best Practices on the Apache Maven Project's site.
- Using Maven and Mevenide to create Netbeans modules by Milos Kleint. An abbreviated version of this document can be found here.
And here is my wish list of things I would like NetBeans to be able to provide for NetBeans Module development:
NBM project template. I'd like this template to provide the following: layer.xml with default code, basic Action class with some default content, module entries in manifest.mf, Ant scripts for building the JAR's XML file and the NBM file, together with as few related properties as possible, so that as little customization as possible is necessary.
NBM project wizard. I'd like to be able to specify menus, toolbar buttons, and actions in the wizard (as well as anything else that can be defined in the layer.xml file). And the wizard should generate test code for the menus, toolbar buttons, and actions so that I can build and test the NBM as soon as I've exited the wizard. This is why the wizard should also generate an Action class with default code. The default main class should be something like org.netbeans.modules.app-name so that the structure is NetBeans-friendly from the start.
layer.xml. Code completion, editor (like for web.xml in 4.1), availability as file template with default content as in Mevenide.
Wrapper. I'd like to be able to select a Java application and wrap it in a module. I'd also like to be able to open an NBM file and inspect its sources.
Samples. Simple and complex samples in New Project wizard.
Documentation. "NBM Quick Start Guide"; "Complete Reference Guide for Layer.xml File"; "NBM Development Code Conventions Document"; "Introduction to NetBeans Sources"; FAQ; Helpfiles.