Project system APIs and Maven Project Type A case study on modular - - PowerPoint PPT Presentation

project system apis and maven project type a case study
SMART_READER_LITE
LIVE PREVIEW

Project system APIs and Maven Project Type A case study on modular - - PowerPoint PPT Presentation

Project system APIs and Maven Project Type A case study on modular design Agenda Project system APIs design Maven project type Platform application built by Maven Project system overview Abstraction over a set of resources


slide-1
SLIDE 1

Project system APIs and Maven Project Type A case study

  • n modular design
slide-2
SLIDE 2

Agenda

  • Project system APIs design
  • Maven project type
  • Platform application built by Maven
slide-3
SLIDE 3

Project system overview

  • Abstraction over a set of resources
  • Extensible
  • Constraints

> Based on folders, 1 project per folder > Files and folders belong always to 1

project

slide-4
SLIDE 4

Project system overview

slide-5
SLIDE 5

Base APIs

  • Project

> Management of projects

  • Project UI

> Display projects in UI

  • Queries

> Basic queries that delegate to projects

slide-6
SLIDE 6

Project API

  • ProjectManager maintains the list of

projects known to the system.

  • Project is the base project

abstraction.

> getProjectDirectory() > getLookup()

  • FileOwnerQuery finds project that
  • wns files and folders
slide-7
SLIDE 7

Project SPI

  • ProjectFactory identifies and creates

Project instances

> Implementations registered as global

services

  • FileOwnerQueryImplementation

defines strategy to find the owning project.

  • ... and various services to be

provided in project's getLookup()

slide-8
SLIDE 8

Project UI API

  • OpenProjects maintains a list of

projects opened and displayed in the UI.

> open(Project[]) > close(Project[]) > setMainProject(Project) > getMainProject()

slide-9
SLIDE 9

Project UI SPI

  • CustomizerProvider allows to create

a dialog to customize the project.

  • LogicalViewProvider creates logical

view of project's content

  • Defining file templates for project

> RecommendedTemplates > PrivilegedTemplates

slide-10
SLIDE 10

Queries API

  • FileBuiltQuery tells if a particular file

was built or not.

  • FileEncodingQuery returns the

encoding for files.

  • VisibilityQuery knows if file shall be

visible in UI.

  • SharabilityQuery checks if the file or

folder shall be shared.

slide-11
SLIDE 11

Domain specific APIs

  • Java ClassPath
  • J2EE deployment
  • Debugger, Profiler
  • Web, EJB, EAR specific contracts
  • WebServices
  • Module development
slide-12
SLIDE 12

Ant based projects

  • Additional APIs to simplify creation of

new Ant based project types.

  • Support classes to ease development
  • AntProjectHelper
  • Allow extending project from 3rd party

modules

  • AntBuildExtender
  • ProjectClassPathModifier
slide-13
SLIDE 13

Projects for non IDE use

  • Viable option if domain model and UI

workflow similar to IDE.

  • Create own project type
slide-14
SLIDE 14

Agenda

  • Project system APIs design
  • Maven project type
  • Platform application built by Maven
slide-15
SLIDE 15

Maven support overview

slide-16
SLIDE 16

Bridge modules

  • For functionality outside the “core

business”

  • Increased integration
  • Scales with the IDE
  • Gets downloaded and enabled based
  • n availability of bridging modules
slide-17
SLIDE 17

Base Support

  • Implements Project and basic queries
  • Uses spi support classes to make

project extensible

  • project's lookup
  • Nodes in logical view
  • Panels in project customizer
  • Defines own extension points
slide-18
SLIDE 18

J2EE Support

  • Adds J2EE domain specific SPI

implementations into project lookup

  • only if applicable (war, ear, ejb)
  • corresponding file templates enabled
  • Run/Debug project action maps to J2EE

deployment

  • Run configuration panel added
slide-19
SLIDE 19

Example: ActionProvider

  • Found in project's lookup
  • LookupProvider for additional sources
  • f lookup, registered in layer

filesystem.

  • LookupMerger<ActionProvider> to

define strategy to merge the implementations

slide-20
SLIDE 20

Spring framework

  • Project agnostic
  • Registers itself in projects' lookup

when Spring on classpath.

  • Configuration panel in customizer.
  • CompositeCategoryProvider in layers
  • AuxiliaryConfiguration from project for

storage

slide-21
SLIDE 21

Agenda

  • Project system APIs design
  • Maven project type
  • Platform application built by

Maven

slide-22
SLIDE 22

Apache Maven

  • Project management system
  • Build driven by plugins
  • Dependencies in repositories
slide-23
SLIDE 23

Module Development

  • NetBeans modules handled by nbm-

maven-plugin

  • Allows building modules, creating

NBM files

  • Generate update site content
  • Application branding
slide-24
SLIDE 24

Dependency management

  • Transitive vs. direct
  • Modules vs. libraries
  • Remote repository at

deadlock.netbeans.org

slide-25
SLIDE 25

Project templates

  • Single NetBeans module
  • Suite setup for platform based

application

slide-26
SLIDE 26

IDE Support

  • Most File templates available
  • Layers browsing
  • Public packages marked
  • Javadoc, source available in remote

repository

slide-27
SLIDE 27

What's missing?

  • Final application packaging
  • Installer
  • MacOSX Application bundle
  • JNLP
  • Project customization panels
slide-28
SLIDE 28

Demo

  • Maven based NetBeans platform

development

slide-29
SLIDE 29

Questions & Answers