New Designer and Other Modules

This document describes design document at module level, provides an interaction of new Designer module with supporting Embedded Browser module and its interaction to other modules using it. It also provides a design of Embedded Browser module API and SPI, and also Designer API.

Overview of the New Modules

The picture shows the interaction of the newly suggested modules. It is divided to couple of layers:

  • Browser Binaries (Mozilla/Firefox, IExplorer, Safari) The first level provides the various browser native binaries. For the moment we plan to use the Mozilla/Firefox only. Later, however, there might come also the others into attention.
  • Modules Embedding Specific Browsers (MozSwing) The next level consist of modules which provide the Java layer on top of the individual browser binaries and also implement Embedded Browser SPI in order to make that browser is available to the other NB modules. For now we plan to have MozSwing embedding only. Note, one of the most important tasks is to provide the browser component as a Java Swing component, i.e. to solve the heavyweight to lightweight issues.
  • Module Defining Embedded Browser API/SPI (Embedded Browser) This module defines both API which other modules including the new Designer will use in order to use the Browser capabilities, or as for the Designer, provide the editing layer on top of it. Also it defines SPI, which allow the modules like MozSwing to plug the specific binaries to the NB. This module will allow any potential browsers to be used by other NB modules in a generic way.
  • Modules Using Pure Browser Capabilities (Any Module Using Browser) Here are the modules which will use the Embedded Browser only for the browsing capabilities, i.e. without editing support. We are not going to focus at them, but we just need to keep in mind they also exist.
  • Module Providing Editing Capabilities on Top of Embedded Browser (Designer/Editing Layer) This module is the new designer, which will use Embedded Browser in order to enhance its functionality with the editing layer, and also provide new Designer API allowing the other modules needed the editing capabilities to use it.
  • Modules Using Ediging Capabilities of Embedded Browser (HTML/XHTML Support, JSF Support) Those are modules which will be consumers of the new Designer with the editing capabilities, as for the old impl the JSF module, maintaining the model (currently tight to insync), or the Winston's XHTML support module.

Picture No 1 Shows the interaction between the Embedded Browser and new Designer modules and also other relevant modules.

Overview of the new API's

Note, there are also new API's specified in the Picture No 1. Those are following.

  • Embedded Browser API This API defines a way how to retrieve browser component and interact with it in order to provide basic browsing capabilities for the interested modules; and also it provides enhanced support, currently to be used in the new designer in order to implement the editing layer on top of it.
  • Embedded Browser SPI This SPI provides interface to be implemented by individual module embedding specific browsers, like for now MozSwing module, which will allow such browser to be used by the other NB modules in generic fashion.
  • New Designer API This API will provide the interaction for the modules, which need to use the editing capability on top of the embedded browser.

Outstanding Issues

There are various obstacles on the way to successfully implement the editing layer on top of the browser component. There are two major approaches. We will need to decide which approach to undertake. Both of the approaches have their advantages and disatvantages. Those approaches are:

  • Heavyweight Browser Component Using the browser component directly. Major advantage: true browser component (with all dynamic effects); Major disadvantage: Coping with heavyweight vs. lightweight component problems, and impossibility to have transparent layer component on top of it.
  • Lightweight Browser Component Using the image of the browser component creating lightweight component (doppleganger). Major advantage: Smooth integration in Swing IDE; Major disadvantage: Static browser plus (at this moment) unreliable repainting, resizing, scrolling etc.

Table Summaries


Module/Binary Layer Module Name or Module Example Role of Module
Browser Binaries Mozilal/Firefox, IExplorer etc. binaries Platform specific binaries providing access to individual browser component implementations.
Embedded Browser Modules MozSwing Module Implements the Embedded Browser SPI (that way also the API), provides the browser component available to Java.
Embedded Browser API/SPI Embedded Browser API/SPI Module defining the embedded browser API and SPI, collector and provider of all implementations in a generic manner.
Editing Layer New Designer Module Enhances the embedded browser component by editing layer, and provides the editing capabilities to its clients.
Various Web Technologies XHTML, Old VW JSF Module Modules using the New Designer module, controlling and maintaining the model and changes made over the document.


API's and SPI's Description
Embedded Browser API Definition of Embedded Browser API for clients of the embedded browser.
Embedded Browser SPI Definition of Embedded Browser SPI for providers of the embedded browser.
New Designer API Definition of new Designer API for clients of embedded browser with editing capabilities.

Outstanding Issues:

Requirement Heavyweight Component Lightweight Component (doppleganger)
Type Explanation Problem Possible Solution Problem Possible Solution
Transparent Layer on Top of Component In order to provide the designtime feedback smoothly, like selection, inline editing etc. Not possible over the heavyweight component Manipulation of the designtime document directly Not a problem
Event Interception In order to control the browser component behaviour and script processing To be checked, should be possible Not a problem
Overlapping of other windows In order to be integrated in the Swing IDE Problems overlapping lightweight popups and sliding windows Should work in JDK 7 Not a problem
Repainting Not a problem Significant issue at this moment Needs to be fixed
Scrolling Not a problem Not implemented yetw Needs to be implemented
Real time changes Dynamic changes like animation, blinking etc. Not a problem Won't work, the image is static
Mapping locations to elements and vice versa The model to view, and view to model mapping Should be possible Now we have basic mapping of elements to locations To be checked, should be possible Now we have basic mapping of elements to locations
DnD Should be possible Now we have listening, but not Transferable yet Should be possible Now we have listening, but not Transferable yet

Tasks in NB Issuezilla

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo