Understanding Extensibility in the vSphere Web Client
You extend the vSphere Web Client by creating plug-in modules. Each plug-in module extends either the user interface layer or the service layer of the vSphere Web Client. The user interface plug-in modules and service plug-in modules together form a complete solution to add new capabilities to the vSphere Web Client graphical user interface.
In general, you extend the vSphere Web Client for one of the following reasons.
You extended the vSphere environment in some way. You can extend vSphere by adding a new type of object to the environment, or by adding more data to an existing object. If you extend vSphere in this way, you can extend the vSphere Web Client with new user interface elements that allow users to observe, monitor, and control these new objects.
You want to view existing vSphere data in a different way. You can extend the vSphere Web Client without having added new objects or data to the vSphere environment. For example, you might want to collect existing vSphere data on a single screen or location in the user interface. Shortcuts, global views, and object navigator inventory lists are examples of extensions that you can use for these purposes. You can also create a new second-level tab, portlet, or other data view that displays existing vSphere data, such as performance data, as a custom graph or chart.
Extending the vSphere Web Client can involve creating both user interface plug-in modules and service plug-in modules.
User Interface Plug-In Modules
A user interface plug-in module adds one or more extensions to the vSphere Web Client user interface layer. Extensions to the user interface layer can include new data views, either in the virtual infrastructure or as global views. When you create a data view extension, you must also create the actual GUI objects in Adobe Flex or in HTML and package them in the plug-in module. These GUI objects rely on data from the vSphere Web Client service layer. You can use the libraries included with the vSphere Web Client SDK to enable communication between your GUI objects and the service layer.
Other user interface extensions can include new workspaces for custom objects, shortcuts added to the object navigator or home screen, new relations between vSphere objects, and new actions associated with vSphere objects.
For a complete discussion of the types of extensions you can add to the vSphere Web Client user interface, see vSphere Web Client User Interface Layer.
Adding Java Services
You can add new Java services to the vSphere Web Client service layer. The Java services you add can perform any of the functions of a typical Java Web service. In general, however, Java services you add to the vSphere Web Client service layer are used to retrieve data from the vSphere environment for display in the user interface layer, or to make changes to the vSphere environment in response to actions in the user interface layer.
Getting Data from the vSphere Environment
Service plug-in modules that gather data from the vSphere environment usually extend the native services on the vSphere Web Client application server, such as the Data Service. You can create standalone custom Java services for data gathering, but a best practice is to extend the built-in services in the vSphere Web Client SDK. Extensions to the built-in services in the vSphere Web Client SDK are often simple wrappers around existing Java services that you create.
In general, you must extend the vSphere Web Client Data Service if your extension solution meets any of the following criteria.
Your extension provides new data about existing vSphere objects. If your extension provides a GUI element to display data that the vSphere Web Client services do not already provide, you must extend the Data Service to provide this data.
You want to add a new type of object to the vSphere environment. If you are adding a new type of object to the vSphere environment, you can extend the Data Service to provide data for objects of the new type.
The service extensions you create can access data from any source, either inside or outside of the vSphere environment. For example, you can create an extension to the Data Service that retrieves data from an external Web server, rather than from vCenter Server.
Making Changes to the vSphere Environment
Service plug-in modules that make changes to the vSphere environment are standalone Java services that you create. These services are used when the user starts an action in the vSphere Web Client user interface. If you create an action extension, you must also create the Java service that performs the action operation on the vSphere environment as a service plug-in module.
Web Client Extensions Service Architecture
Plug-In Modules in a Complete Solution
The plug-in modules you must create for your solution depend on the features your solution provides for the user. Most extension solutions include at least one user interface plug-in module, to add a new feature to the vSphere Web Client user interface. Depending on what types of extensions your user interface plug-in module contains, you might also need to add a service to the service layer to support your user interface extensions.
Some common extension solutions for the vSphere Web Client are:
Global Views
A global view is a custom data view that appears in the vSphere Web Client main workspace. You can use a global view to display any data from inside or outside the vSphere environment. Typical uses for global views include dashboard applications that display information on vSphere objects, or complex monitoring or management applications that are separate from the virtual infrastructure.
To add a global view to the vSphere Web Client, you must create a user interface plug-in module that contains the following extensions.
If your global view requires data from the vSphere environment that the vSphere Web Client Data Service does not already provide, you must also create a Data Service Adapter to extend the Data Service.
Adding Data Views to Existing Virtual Infrastructure Object Workspaces
You can add data view extensions to the object workspace for any existing object in the vSphere Web Client. The vSphere Web Client provides extension points to let you add custom elements to the existing Getting Started, Summary, Monitor, Manage, and Related Objects tabs for each type of vSphere object, such as a host, virtual machine, or cluster. These data view extensions are displayed as second-level tabs or tab views in the object workspace hierarchy.
To add a data view to an existing object workspace for a vSphere object, you must create a user interface plug-in module that contains a data view extension. The data view extension specifies the visual component that appears in the main workspace in the object workspace hierarchy.
If your data view extension requires data from the vSphere environment that the vSphere Web Client Data Service does not already provide, you must also create a Data Service Adapter to extend the Data Service.
Adding Actions to Existing vSphere Objects
You can create actions associated with existing vSphere objects, such as hosts, clusters, or virtual machines. When you create an action extension, your actions are added to the vSphere Web Client Actions Framework. The Actions Framework displays the available actions for a given object to the user with toolbars and context menus in the vSphere Web Client main workspace.
To add an action to an existing vSphere object, you must create a user interface plug-in module that contains an action extension. The action extension specifies the details of the action, including when the action is available and how the action is handled.
You must also add a Java service to the vSphere Web Client service layer. The service layer code that handles the action execution must import the new Java service. The Java service is responsible for performing the action operation on the vSphere environment.
Adding a Custom Object Type to the vSphere Environment
You can add new object types to the vSphere environment, and extend the vSphere Web Client to display information about the new objects. The vSphere Web Client SDK includes templates that you can use to create the standard object workspace, including the Getting Started, Summary, Monitor, Manage, and Related Objects tabs, for your custom object type.
To add support for a custom object type to the vSphere Web Client, you must create a user interface plug-in module that contains the following extensions.
In addition, you must create the following service plug-in modules for your custom object.
Plug-In Packages
The plug-in modules you create for your extension solution, for the user interface layer and the service layer, are deployed to vSphere in plug-in packages. A plug-in package bundles together one or more plug-in modules. Each plug-in package represents a complete solution for the vSphere Web Client. The package contains at least one user interface plug-in module, that adds new elements to the vSphere Web Client user interface, and might contain one or more Java services that are required to provide the new elements with data.
You deploy plug-in packages to a vCenter server by registering with the server’s ExtensionManager API. When the vSphere Web Client connects to a vCenter server, the vSphere Web Client downloads and deploys any plug-in packages that are currently registered with the vCenter server.