Consider the following recommendations when building a reusable library for your web
application.
- 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.
- 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.
- 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.