Once the above modules are part of our application, we create a new module that provides the user interface for our application. The new module gives the user a tree hierarchy showing data from the database. We then create another module that lets the user edit the data displayed by the first module. By separating the viewer from the editor in distinct modules, we will enable the user to install a different editor for the same viewer, since different editors could be created by external vendors, some commercially and some for free. It is this flexibility that the modular architecture of the NetBeans Platform makes possible.
Once we have an editor, we begin adding CRUD functionality. First, the "R", standing for "Read", is handled by the viewer described above. Next, the "U" for "Update" is handled, followed by the "C" for "Create", and the "D" for "Delete".
At the end of the tutorial, you will have learned about a range of NetBeans Platform features that help you in creating applications of this kind. For example, you will have learned about the UndoRedo.Manager and the ExplorerManager, as well as NetBeans Platform Swing components, such as TopComponent and BeanTreeView.
Click here to start working on this brand new tutorial:
http://platform.netbeans.org/tutorials/nbm-crud.html
Any feedback is more than welcome.
Good tutorial.
I wonder where to get the sample code
Hi hantsy. Thanks for liking the tutorial. The problem with the source code is that it also includes all the extra JARs and so on, as well as the problem that it wouldn't run out of the box since it assumes you have the particular database used in the tutorial. So I'm not sure if it would make sense to make the source code available since it can't be used "as is" anyway.
Hi Geertjan,
Might you can organize the project's libraries, and as well use an embedded db (like derby).
Well, I was supposed to use MySQL since that's the official Sun database server (yes, Derby too, but anyway).