Crestron Construct™ Best Practices for Project Design
Introduction
This topic will provide information on best practices when designing user interface projects in Crestron Construct™ for deployment on Crestron touch panels, as well as third-party devices.
Single vs Multi-page Projects
Unlike projects developed in Crestron’s VT Pro-e® application, where the best practice is to create Projects with single Pages and many subpages (Widgets in Construct), projects in Crestron Construct should utilize multiple Pages. This change is necessary due to the generation of the HTML DOM (Document Object Model) which is part of web technology.
Deeply nested DOMs do not perform well. When projects are created that contain Pages with many subpages (Widgets), this creates a deeply nested DOM. To avoid this, multiple Pages should be utilized.
Background Components
The Background Component should only be used when the project contains a Video Component. This component (Background) was developed to allow the video player service, running on Crestron touch panels and Crestron One, to “punch” through the Crestron Construct project. In relationship to performance, it is a “heavy-weighted” component.
If the Project requires a global Background Color for all Pages, use the Project properties to set the Color.
If the Project requires a custom background image, utilize the Image Component on every Page and/or Widget and place the component at the lowest z-order.
Note: If the Project is using a Video Component, do not use the Project level or Page/Widget level background color options. Use the Background Component.
Pre-Loading Pages
To reduce the time it takes a touch panel to initially load a Creston Construct Project, pages can be set to pre-load using the Preload Page option on the page properties dialog.
Note: This setting only applies if the Cache Page option is also set.
When the option is enabled along with Cache Page, the touch panel will load all pages into memory before allowing the user to interact with the touch panel. This will increase the time it takes to initially load a project but will ensure all pages are ready to be rendered when the user interface requests them.
Please see the section on Caching Pages for more information on this feature.
Caching Pages
To keep pages in memory, so they can be rendered as fast as possible, pages can be set to be cached using the Cache Page option on the page properties dialog.
Note: This setting can be used without the Preload Page option.
When the option is enabled, once a page has been visited the panel will cache that page into memory. Subsequent page loads will be much faster since the page will not need to be loaded from disk.
Notes:
On large projects, setting every Page to be cached may cause memory issues on the touch panel. On those larger Projects, only cache the Pages that are important to the end user.
Loading All Items in List Components
The default behavior for list-based components like the Button List and Widget List is to dynamically load items as the list is scrolled. This follows common practice for web-based user interfaces. This may not be desirable for smaller lists or lists that end users frequently use.
Crestron Construct exposes a property called Load Items for both the Button List and Widget List components. Setting the value of this property to All will force the component to load all the items and not dynamically load them while scrolling.