Download presentation
Presentation is loading. Please wait.
Published byRuth Fields Modified over 8 years ago
1
NetBeans Platform intro Emilian Bold
2
What's it about ? ● Contains usual desktop application items: – Window management – Menu & tool bar management – User settings – Application autoupdate – Task management with GUI feedback – Modular architecture (usual ?)
3
Open Source ● Everything Open Source – Supported by SUN (all the main developers are probably payd by SUN) – Passed through rigorous QA ● Respects standards (or improves them)
4
Ant based ● The build harness is totally ant based. ● One could use it the same from the IDE or from the command line (though harder)
5
Modular ● There is a Platform-core ● Most of the other facilities are modules build on top of the core – Even the window system ! ● Modules may be enable / disabled at runtime. ● Modules may be added at runtime without application restart. ● Support for update
6
Modules ● A module is just a JAR ● Initial interaction with the Platform declarative: – Menus / toolbars – Default windows, services etc. – Reason: Mostly to avoid actual class-loading which is expensive.
7
Dependencies ● Declared in Manifest file ● Can declare dependency on a particular class, not module (handy if working with 3rt party jars that you want to interchange)
8
layer.xml file ● Contains all the descriptive part – Menu items – Toolbar items – Actions – Services – Windows – User options – Even resources
9
layer.xml ? ● At runtime the Platform only uses the layer info to present the GUI – Modules are lazy-loaded – If a module is disabled all its gui items will go away
10
Configuration filesystem ● The layer file is actually a configuration filesystem ● Toolbar is a folder – Files inside are actual menu items ●.instance file handler ● Each module may add / remove files from the filesystem ● The FS is read-write – Store settings in the nb.user folder
11
System update ● The harness build system generates autoupdate information ● The user just downloads the new module (which is a glorified ZIP; think WAR ;) )
12
Window system ● Docking windows (like JIDE) ● Draggable floating windows ● Window persistence ● Window groups ALL pure Swing.
13
META-INF/services ● Service declaration
14
Lookup ● Poor man's JNDI or registry ● Drives most of the Platform ● Initially started with the Cookie concept
15
Options API and SPI ● Easy API to offer user options ● GUI – wise similar to the Firefox option window ● No persistence offered so far – Will show up in 6.0 release (ie. 2007) – Use preferences API from standard Java (on windows -> registry)
16
Tasks and GUI feedback ● RequestProcessor, Mutexes, etc – Written long before java.lang.concurrency API ● Progress API – Display a GUI progress bar – Cancel tasks – Asynchronous
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.