Table Of Contents

Recommendations for Building a Web Application Library

Last Modified: November 16, 2020

Consider the following recommendations when building a reusable library for your web application.

  1. Use VIs (.gvi) instead of WebVIs (.gviweb)—Use a WebVI as the top-level VI in your web application and VIs with the .gvi file extension for all other VIs and libraries. Using VIs with the .gvi file extension enables you to use your libraries across targets.
  2. Wrap JavaScript Library Interface (JSLI) nodes in VI (.gvi) files and uncheck Export for JSLI documents—Rather than exporting nodes defined in the JSLI document, wrap the nodes in VI (.gvi) files and ensure they are not accessible outside of the library. The wrapper VI isolates the JSLI nodes from the library user, giving you the flexibility to add functionality, such as supporting additional data types or having multiple outputs.
  3. Put JavaScript resources and JSLI in a support namespace—Use a separate namespace for JavaScript resources, such as CSS, and JSLI documents to organize web application specific resources.

If you want to add custom visual elements to your web application library, refer to Adding a Custom UI Palette to Your Web Application Library.


Recently Viewed Topics