NetBeans IDE & Platfrom API by xld14276

VIEWS: 0 PAGES: 59

More Info
									       NetBeans IDE
         & Platfrom API
          Build Your Rich Client Application



Gao Ang
       i            s
Sun M c r os ys t em , I nc .
Func t i onal Cam         bas
                   pus Am s ador
Agenda



         • NetBeans IDE
         • NetBeans Platform
         • NetBeans Modules Architecture
         • NetBeans OpenIDE API
         • Rich Client Demo


             2
What is NetBeans?
• A comprehensive, modular multi-lingual IDE
(Integrated Development Environment)
   >   Out-of-box support for Java SE, Java EE, Java ME
   >   Large set of 3rd party modules (plugins)
   >   Intuitive drag-and-drop development
   >   Debugger, Profiler, Refactoring, etc...
• A platform for building applications
   > RCP = Rich Client Platform
   > Rich client Java applications
   > Rich framework of windows, menus, tool bars, actions

• A thriving open source community
   > Open source since June, 2000
   > Large community of users and developers
                              3
What is NetBeans?
 Feature Overview
• Java SE Support - Swing GUI Builder, Javadoc integration, Support for JUnit 3 & 4
• Java EE Support (1.3, 1.4 and 5) – first IDE to fully support Java EE 5
• Java ME Support - Visual Mobile GUI Designer, Mobile Game Builder, etc.
• Visual Web Development – Visual Web Editor, Visual Page Flow Editor, Visual Query Editor,
Visual CSS Editor, Database Explorer, etc.
• Rich editing support - Smart Source Code Editor, Code Navigator, Code Completion/Folding,
Refactoring support
• Profiler, Debugger, Version Control, etc.
• Visual UML Modeling,
• Netbeans Platform Development – Visual Library API, Rich Client Development, Lexer API, etc.
• Highly Modular Architecture, Extensible with user contributed plugins
• C/C++ Development
• Dynamic Language Support – Ruby, Javascript, PHP, Groovy, Python, and more

                                              4
What makes NetBeans the best?
• Ant Based Project System
• Friendly Editor
• Powerful J2EE Support
• Visual J2ME Development
• An integrated Profiler
• Collaboration tools

                   5
What makes NetBeans the best?
(cont.)
•   Spectacular GUI Buider (Project Matisse)
•   Refactoring support
•   CVS support
•   Java BluePrints Solution Catalog
•   Module Development Support
•   Update Center


                         6
Java EE Support




              7
Java Mobile and UML




              8
Profiler in NetBeans




               ९
NetBeans Projects Structure
•   Ant-based projects
•   Project file: build.xml
•   Can be extended
•   Ant tightly integrated




                              10
Dynamic Language on Netbeans (JRuby)




                11
Ruby on Rails Support in NetBeans




              12
Editable, Sortable Results, Multiple Result Tabs
• Can sort the results by double-clicking on a row header, modify a row




                                13
Eclipse Importer to NetBeans




              14
Start Using NetBeans




              15
A Growing Ecosystem with more
than 150 partners!




             16
NetBeans Platform
Build new desktop applications without re-inventing the wheel

• NetBeans Platform is a broad SWING-based
  framework to create rich desktop applications
• Platform provides out-of-the-box APIs to simplify
  application common requirements such as window
  management, menus, actions, settings and storage,
  an update manager, and files access
• Core of NetBeans-IDE is Platform ie. NetBeans-IDE
  'minus' IDE specific modules

                          17
NetBeans Platform Manager
NetBeans IDE 6.5 (Build 200811100001) (Default)




                          18
NetBeans Plugins Manager




             19
Real World Demo of
NetBeans Platform




 20
Blue Marine on NetBeans




              21
22
https://visualvm.dev.java.net/




    23
24
25
Demo Project:
JFugue Music NotePad
• https://nbjfuguesupport.dev.java.net/




                       26
 rd
3 Part API from community: Visual Library




                 27
28
    Look Into
NetBeans Platform




 29
The NetBeans Platform Arch

     NetBeans         • Existed before other RCP project
                      • Advantages – platform indepandence,
   NetBeans IDE
                      code reuse, professional look
                      • Possibility to define and choose
                      platform (can be different version IDE)
 NetBeans Platform
                      • Packaging and branding (splash
                      screen, icons, etc.)
                      • Distribution as zip or by java webstart



                     30
Platform Libraries




               31
RCP Stuff Characteristics




• Rich MVC
• Lookup API
• Publish and Subscribe

                     32
NetBeans Runtime Container
The smallest runtime of Netbeans



• Bootstrap
• Startup
• Filesystem API
• Module System API
• Utilities API


                        33
Detailed Runtime Container
• Bootstrap—Enables the runtime container to understand what a
module is and how to load and compose them into one
application.
• Startup—Provides the main method of your application, as well
as all the code needed for starting it up.
• Filesystem API—Gives your application a filesystem.
• Module System API—Lets you influence the lifecycle of the
modules in your application.
• Utilities API—Includes many utility classes, especially the
Lookup class, which is used for communication between
modules.

                           34
NetBeans APIs
•    Action APIs                     •   Palette APIs
                                     •   Refactoring APIs
•    File Systems APIs               •   MultiView APIs
•    Loaders APIs                    •   JavaHelp Integration APIs
•    Nodes APIs
•    Windows APIs

NetBeans APIs in a Nutshell
    http://platform.netbeans.org/tutorials/nbm-idioms.html


                               35
NetBeans APIs (cont.)
• Action APIs
  > Package : org.openide.actions
  > Standard SWING and NetBeans API Actions
• File Systems APIs
  > Package : org.openide.filesystems
  > Manipulating files on disk, and used indirectly by Loaders API
• Loaders(Datasystems) APIs
  > Package : org.openide.loaders
  > Datasystems are the logical layer between a filesystem and
    higher level file oriented operations. The API works on top of
    file objects and gives each file a logical behavior – icon,
    name, operation, etc. 36
NetBeans APIs (cont.)
• Nodes APIs
  > Package : org.openide.nodes
  > The Nodes API controls the usage and creation of nodes,
    which are a variant of Java Beans having adjustable property
    sets; provide cookies and actions; formed into a hierarchical
    tree.
• Window System APIs
  > Package : org.openide.windows
  > Window API allows module to provide window-like
    components, mainly through embeddable visual components
    called topcomponents. A top component is a SWING
    component and need to be docked to be manipulated by the
    window system.       37
    Five Steps
Module Development
   in NetBeans



 38
About NetBeans Module (NBM)
• Packaged for delivery via the web
• NBM files:
  > Are compressed
  > Can contain multiple JARs
  > Contains metadata NetBeans uses to display information
    in the Update Center
  > Typically signed (using JDK mechanism for JAR signing)
• Just zip files with a special extension


                        39
About NetBeans Module (cont.)
• A NetBeans Module
  > JAR written to interact with the NetBeans APIs.
  > Identified by an entry in its MANIFEST.MF
  > Packaged as NBM files (.nbm extension)
• Used to:
  > Build a stand-alone application
  > Extend the IDE




                          40
Module Development in Netbeans
•   Create module from a template
•   Create module “suites”
•   Build/run/debug within the IDE
•   Hot-redeploy modules
•   Debug "fix and continue" (hotswap) for modules
•   http://platform.netbeans.org/



                        41
Step No.1: Project Templates
• Module Suite Project
  > Application Struction
• Module Project
  > Wrap functionality
• Library Wrapper Module Project
  > Wrap external JAR
• NetBeans Platform Application
  > It is the starting point for
    your rich-client applications.

                             42
Step No.2 API Templates
• Action
  > Creates an action that can be
    invoked from a menu item,
    pop-up menu, toolbar button,
    or keyboard shortcut
• Window Component
  > Creates a new window with an
    Open action invoked from a
    menu item.

                         43
Step No.2 API Templates (cont.)
• File Type
  > Let's the IDE recognize a new file type
• Wizard
  > Wizard for generating wizard sketeton...
• Project Template
  > For adding new templates and samples
• J2SE Library Descriptor
  > Adds new JARs to the IDE's Library Manager


                          44
Step No.2 API Templates (cont.)
• Options Panel
  > Extend the Options window
• JavaHelp Help Set
  > Wizard setting up JavaHelp help set
• Update Center
  > Support your distribution process
• Module Installer
  > Before the application begins - initialization


                           45
Step No.3 Develop the Module
• Use the NetBeans Source Editor
• Refer to the NetBeans OpenIDE API Javadoc




                     46
Step No.3 Develop the Module
• http://platform.netbeans.org
  > Quick Start Guide, FAQ, Tutorials




                         47
Step No.3 Develop the Module
• Matisse! Matisse! Matisse!




                      48
Step No.4 Build, Install and Debug
• Build Main Project
• Run Main Project
  > Install in target Platform
  > Install in Development IDE
• Create NBM




                         49
Step No.5 Brand & Distribute
• Module Projects
  > Create NBM
  > Distribute and install via the Update Center
• Module Suite Projects
  > Brand (launcher name, splash screen, progress bar, title
    bar)
• Build ZIP Distribution
• Build JNLP (Web Start)


                          50
So the module development is...
•   Create a rich-client application skeleton
•   Bundle a 3rd party API
•   Add a module for functionality
•   Design and code the module
•   Create a distribution




                          51
 Helpful Tips to
NetBeans Platform




 52
API Changes
• http://bits.netbeans.org/dev/javadoc/apichanges.html




                          53
NetBeans API List
• http://bits.netbeans.org/dev/javadoc/index.html




                       54
SVN Repository




             55
Continuous Integration Engine




              56
Next Steps
NetBeans 6.5 Resources
•NetBeans P roduct S ite: http://www.netbeans.org
   > Download: previews, current & past releases of IDE , plugins
   > Learning: tutorials, technical articles, flash demos
   > C ommunity: latest news, forums, events, mailing lists

•NetBeans Wiki: http://wiki.netbeans.org/wiki/
   > Open-source documentation site for NetBeans

•P lanet NetBeans: http://www.planetnetbeans.org/
   > Aggregate for all NetBeans-related blogs

•S ource Code:
http://www.netbeans.org/community/sources/hg.html
   > Mercurial source code access for Netbeans platform + IDE




                                 57
 Need Help?
  • dev@openide.netbeans.org
  • http://platform.netbeans.org




http://blogs.sun.com/geertjan/ 58
    THANK YOU!

Gao Ang
       i            s
Sun M c r os ys t em , I nc .
Func t i onal Cam         bas
                   pus Am s ador

								
To top