Sunday October 19, 2008
NetBeans Platform APIs: Top 10 Greatest Hits
In the first place, the NetBeans Platform is a runtime container for desktop applications, comparable to an application server for web applications. Both handle common concerns, such as lifecycle management, for their target application type. However, secondly, the NetBeans Platform is a set of libraries.
In my (humble) opinion, these are the top 10 libraries offered by the NetBeans Platform APIs:
- Module System API. Enables the modular structure of NetBeans Platform applications. In the NetBeans sources, see package "org.openide.modules". Start reading about it here.
- Window System API. Enables you to create an application with advanced logical window functionality, such as drag/drop, dock/undock, maximize/minimize. In the NetBeans sources, package "org.openide.windows". Start reading about it here.
- Lookup API. Enables communication between modules similarly to the ServiceLoader class in JDK 6, as well as the context sensitivity of windows, nodes, and data objects in the application. This API can also be used outside the NetBeans Platform. In the NetBeans sources, package "org.openide.util.lookup". Start reading about it here.
- File System API. Enables the modules in an application to communicate by means of a virtual file system which is, by default, a hierarchical structure of folders and files defined in XML documents. In the NetBeans sources, package "org.openide.filesystems". Start reading about it here.
- Nodes API. Enables you to provide visual representations of underlying objects, i.e., these are NetBeans Platform JavaBeans. This API can also be used outside the NetBeans Platform. In the NetBeans sources, package "org.openide.nodes". Start reading about it here.
- Explorer & Property Sheet API. Enables you to render nodes in one of several NetBeans Platform Swing components that are, via the NetBeans ExplorerManager, loosely coupled to the rendered nodes. This API can also be used outside the NetBeans Platform. In the NetBeans sources, package "org.openide.explorer". Start reading about it here.
- Datasystems API (also known as "Loaders API"). Enables custom file types to be represented in the application. If the application does not make use of custom file types, this API can be ignored. In the NetBeans sources, package "org.openide.loaders". Start reading about it here.
- Actions API. Enables you to include actions that can be hooked up to menu items and toolbar buttons in your application, where you can define them as being always available or context sensitively enabled. In the NetBeans sources, package "org.openide.actions", with the related package "org.openide.util.actions". Start reading about it here.
- Visual Library API. Enables you to add widgets to your application, with common functionality, such as 'zoom' and 'move' provided out of the box. This API can also be used outside the NetBeans Platform. In the NetBeans sources, package "org.netbeans.api.visual". Start reading about it here.
- What do you think..?
I doubt that there'll be much argument about the top 9 listed above (apart from, possibly, the Datasystems API, which those who don't use custom file types are probably not using; and potentially someone will argue that the whole 'runtime container' should be included in the first item, rather than just the Module System API). But... what should no. 10 be? Options? I/O? Common Palette? Something else? Suggestions (with justifications!) welcome.
Oct 19 2008, 10:50:55 AM PDT Permalink


