Best Practices for
Extending the User Interface Layer
When developing
extensions for the user interface layer of the
vSphere Client
,
follow these best practices.
- Create pointer node extensions on the Object Navigator home page only for major applications and solutions. This approach provides consistent and meaningful user experience for the customizedvSphere Client.
- When you create action set extensions for a particular type of vSphere object, you must use the extensions filtering mechanism. The defined action sets must be visible only when the user selects the relevant vSphere object type.
- Use the REST API for retrieving data from the service layer. Use proxies only for adding, editing, and deleting issued data requests.
- For better performance, avoid making proxy calls that require more than several seconds to return a response. A best practice is to design your extensions to submit a task that returns immediately, and to track the task progress.
- If you use proxies for data requests, verify that you receive the request response before sending another request through the proxy.
- If you use localization data for your plug-in package, follow these recommendations:
- Set thelocaleattribute in the<resource>element of theplugin.xmlmanifest file to the value{locale}. Using the{locale}value instructs thevSphere Clientto display the plug-in by using the currentvSphere Clientlocale.The following XML fragment shows how the<resource>element can be used in the plug-in module manifest file.<plugin id="com.vmware.samples.htmlsample" defaultBundle="com_vmware_samples_htmlsample"> <resources baseUrl="locales/"> <resource>com_vmware_samples_htmlsample</resource> </resources> .... </plugin>
- To avoid collisions with other localized plug-in packages, set a unique resource bundle name to thedefaultBundleattribute of the<plugin>element in the plug-in manifest file. Use your company name and product name as part of the resource bundle name to make it unique.
- Make sure that the filenames of your resource files end with_en_USinstead of-en_US