Sunday May 08, 2005
NetBeans Modules for Dummies (Part 3)
Another way to learn about writing NetBeans Modules (NBMs) is to read as much as possible about them. Here is a complete list of all the resources I've come across while attempting to understand NBMs. I've tried to organize the links in stages, otherwise it's all a bit overwhelming.
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.
May 08 2005, 06:03:57 AM PDT Permalink
Posted by Tim Shi on August 03, 2005 at 01:29 PM PDT #
Posted by Geertjan on August 03, 2005 at 10:02 PM PDT #
To understand the concepts, I highly recommend this book. Unfortunately it's from the 3.6 ages, but the OpenAPIs haven't changed too much, so I got a lot of unique information from here. The concepts are mostly the same in 4.1 and 4.2 so it's worth reading to get an overview (and to get a deep understanding how the layered filesystems, datasystems, nodes, etc. work).
Posted by Roman Strobl on August 04, 2005 at 08:52 AM PDT #
Could you please provide the link to download nbantext.jar I am not able to get it from binary
Why do you need it?
Posted by Geertjan on September 06, 2007 at 10:37 PM PDT #
I am just a new comer to netbean plateform.i just want to test the NetBeans: How to write a HelloWorld module posted in http://www.javalobby.org/java/forums/t17711 where build.xml is using that jar.
Or if any other way for it.please suggest.I dont want to use IDE for module creation.I have downloaded only the blank plateform from netbean.I want to plug swing module into it.
Posted by Abhisek on September 06, 2007 at 10:41 PM PDT #
Did you see that JavaLobby article that was written in 2005?! It is completely out of date. It is now completely wrong. Here is how you can create a module in 6.0: http://platform.netbeans.org/tutorials/60/nbm-google.html
It is much simpler than it used to be, as you will see if you follow that tutorial. And here is a very long list of other tutorials for creating NetBeans modules:
http://platform.netbeans.org/tutorials/
Posted by Geertjan on September 06, 2007 at 10:49 PM PDT #
It is using IDE.I dont want to use IDE.I want have in depth knowledge on configuring the plateform to develop a desktop application.Could you please send me the steps to develop Hello World appl without using IDE .
My netbean plateform loc: D:\nb\Netbeans\Plateform6
and my user dir is
C:\nbUser
I am using eclipse as IDE.
Posted by Abhisek on September 06, 2007 at 11:13 PM PDT #
I strongly advise you to use NetBeans IDE, because NetBeans IDE provides LOTS of tools to help you create NetBeans modules. Eclipse does not. You are making your life very difficult for yourself if you use a different IDE. It is like using instructions from Ikea to build furniture from Japan. Almost not possible. We have no instructions to help you to o what you are trying to do -- if you want to use Eclipse to develop modules on the NetBeans Platform, you should ask Eclipse for instructions how to do so.
Posted by Geertjan on September 06, 2007 at 11:22 PM PDT #
I want to learn from scratch.I dont bother difficulties.Please suggest .I am using eclipse only for getting methods from apis imported not for netbean plugin dev.Please suggest me to proceed.It may need some time .i am ready for it.please suggest me
Posted by Abhisek on September 07, 2007 at 02:22 AM PDT #
If you are using Eclipse, I cannot help you. I simply don't know how to work with Eclipse. Write to this mailing list, maybe they will have someone who can help you: dev@openide.netbeans.org. Again, please understand: I cannot give you advice, because I do not know Eclipse.
Posted by Geertjan on September 07, 2007 at 03:53 AM PDT #
Thanks a lot for your valuable respones. assume that i am not using eclipse.I am not using any IDE .I have one netbean plateform i.e blank plateform.how to plug hello world module into it.
As given by http://www.javalobby.org/java/forums/t17711
it was not using any IDE.but the only problem i faced was i didnt get nbantext.jar to download.
Can you suggest further.
Posted by abhisek on September 07, 2007 at 04:00 AM PDT #
No, I cannot suggest further. I don't know the answer to your question, except that you are referring to something written in 2005. It is probably completely wrong now. Please read these words: I don't know. Please join to this mailing list and ask your question there: dev@openide.netbeans.org.
Posted by Geertjan on September 07, 2007 at 04:04 AM PDT #
i build furniture from Japan..:)...its not so difficult .it took 1 week for me.
Posted by abhisek on September 10, 2007 at 09:49 PM PDT #
:-) Hurray! Please tell me how... Write to me at geertjan DOT wielenga AT sun DOT com with the instructions and I will blog about it for other people who need to build furnitue from Japan!
Posted by Geertjan on September 10, 2007 at 10:36 PM PDT #
surely i wl post if u want...ijust started doing the coding part...i need small code to go through to understand TopComponent(just opening one explorer window in left side of plateform).waiting for ur help
Posted by Abhisek on September 18, 2007 at 02:10 AM PDT #
http://platform.netbeans.org/tutorials Plus, if you use the Window Component wizard in the IDE you will see how a TopComponent works. (That's exactly why it makes sense to use NetBeans for module development, i.e., because NetBeans provides lots of wizards that help you get started with many APIs).
Posted by Geertjan on September 18, 2007 at 02:12 AM PDT #
Thanks...i am almost done with that...just a simple problem i am facing.In the menu bar i am adding TestComp .this option is coming fine in menu bar.But after clicking it ..under it "balnk" is getting displayed with disable mode.in layer.xml under tag folder name="TestComp" i have given the correct mapping for the action class.waiting for your help
Posted by Abhisek on September 18, 2007 at 04:22 AM PDT #
CMS and Blog Website templates, flash templates,WordPress Themes,Php-Nuke Templates, phpBB Templates for a economical rate web design products for a economical rate
Posted by Antony Fernando on November 02, 2007 at 09:43 PM PDT #
Hi
My topcomponent is not getting garbedge collected...when i am opening topcomponent(say tComp) one instance getting od tComp created which is never garbedge collected...whthr netbean is registering something somewhere
Posted by rocky on February 21, 2008 at 10:52 AM PST #
Is netbeans the kind of api that could be embedded into a website that does a custom build project? Like adding a deck to my house, pick some styles, hieghts, colors, and have it show as a 3D model ? I have seen this at a Lowes homebuilder website and would like to build one of these to look at other concepts.


