9 Perspective Module Tips for Ignition Developers

Ignition 8.0 with the Perspective module was first released on April 8, 2019, and we have made heavy use of Perspective ever since. Even if you are already somewhat familiar with Inductive Automation Ignition, it’s important to understand the differences in the Perspective environment in terms of the Vision module. Perspective has many of the same features as Vision implemented in a slightly different way given the new web-based architecture. The Ignition Perspective module also has some improvements on Vision to make development easier.

Let's dive into our 9 Perspective Module Tips for Ignition Developers, and please let us know if you have any questions about Perspective! We have built many applications already with plenty more on the docket. We have also worked closely with Inductive Automation to fully understand the current implementation, and where they are headed.

 
9 Perspective Module Tips for Ignition Developers - decorative intro graphic
 

You probably use some form of Software as a Service (SaaS) application now, or have used a web browser to access your email before. If you think of Perspective as a web-based version of a Vision client you will be in the right ballpark. But instead of accessing your email, you are interacting with Ignition, and the same concepts as any SaaS application apply here.

1. Security

A major difference between Vision and Perspective is that we can use Identity Providers in Perspective. This allows Perspective to be more in line with a typical web-based system. The options include OpenID and SAML providers, which are currently in use in many SaaS applications. These Identity Providers are in addition to the built-in Ignition and Active Directory user sources you are already familiar with. Here’s our introduction post for using Identity Providers in Perspective. Learn how to set up an Identity Provider using SAML, or how to use OAuth with Ignition.

2. Sessions

The concept of a client in Perspective is known as a Session. When you navigate to a Perspective page in a browser or in the Perspective Mobile app, you are using a Session. Each session is made up of individual web pages similar to any SaaS application. You load pages by navigating to them with buttons, links, tabs or other forms of navigation. Each page is made from various views—each of which are populated with components. This is very similar to how windows are structured in Vision. For more information on Sessions in Perspective, check out the Ignition documentation.

3. Pages

Pages in Perspective are analogous to windows in a Vision client. Each page will contain the various views and components you will interact with in your application. You navigate to pages similarly to how you would navigate to a window in a Vision client. Each page—accessible via a URL in a web browser—forms the basis of everything you will build in Perspective. More information on Pages is available here in the Ignition documentation.

4. Views

In the Perspective module, Views are similar to a hybrid of windows and templates in Vision. Views can be the foundation of an entire page in the Perspective application—as a primary, docked, or popup View—or you can embed them inside of other Views, similar to how you might use Templates in a Vision application. Each View has a root container similar to a window in Vision, and allows you to place components in the view to build your application. Views—like root containers in Vision—have custom parameters you can use for all the components in the view. You can also set up properties to manage the appearance of the View, and parameters for interacting with pages or other Views. Views and containers cannot be covered completely in a post like this, especially since they are the meat of what you will develop in Ignition Perspective. Learn more about Views in the Ignition documentation.

5. Containers

Containers are a special type of component in Perspective. They handle the various layout strategies available to you, allowing you to create a responsive mobile application in Perspective. With containers, it’s possible to build a single page that can be viewed on any device without having to reconfigure everything for different display sizes. Of course you still have the option to include different views according to display sizes, but Perspective can automatically manage what the user sees based on their device. Containers make Perspective a truly mobile friendly experience, much as you would expect from any modern web-based system. Find more info on Containers in the Ignition documentation.

6. Styles and Themes (CSS)

In addition to Containers, one of the most powerful additions to Perspective is the inclusion of cascading style sheets (CSS) for styling. CSS is a very powerful tool for web development. It allows you to build a global style for your entire application. Cascading Style Sheets allow you to design beyond well beyond just color palettes and style tags—you can create a global setting for any and all styles on any components, views, pages, and more. Perspective also allows you to apply styles globally using Style Classes, as well as on a per-component basis with in-line styles. These options give you a very flexible way to design and style anything you might want to build into your Ignition Perspective application. Learn more about CSS and styles in Perspective in this section of the Ignition documentation.

7. Message Handling

If there is a "killer app" function in the Ignition Perspective module, it is the Message Handling system. Basically, you can build messages and the components to listen for these messages. You can also execute code when these components receive messages from other components. You can then execute the messages similar to executing code in a Vision action on a component, and can build very complex systems with these simple building blocks. By executing code on a component directly, you can keep scripts simple—instead of updating it all from another component.

For example, imagine a table displaying data from a database. In the Vision module, you would write a script on a button to refresh the table when it is clicked. If you want to see what is happening on the table, you would need to look at the button scripts. This approach can be complicated for developing and maintaining applications. In Perspective, you would simply execute a "RefreshData" message when you click the button, and then have a "RefreshData" Message Handler on the table. Now you can simply look at the table's scripts to see what is happening. Message Handling streamlines development and troubleshooting immensely. Read more about Message Handlers here in the Ignition documentation.

8. Session Properties

Session properties are the Perspective module’s equivalent of Vision's Client Tags. They allow you to set global variables to use across all the pages and views in a session. Session properties are important in a Perspective project, since web-based systems are usually "stateless" and require you to send any relevant information as part of the request when accessing a page. Session Properties are very useful to have in Perspective when bridging the gap from standard Ignition programming to a more web-centric mindset with Perspective. Dive into the Session Properties in the Ignition documentation.

9. URL Navigation

You can navigate to any page in your Perspective application with a URL in a browser. Since Perspective is a web-based platform, you can also use the standard concept of URL parameters. By using parameters as part of a URL, you can pass values into a page when opening it. Passing URL parameters is useful with a standardized architecture, and allows you to specify a particular equipment ID to view many pieces of equipment—all using a single page similar to how a template operates in Vision. Using URL Navigation, you can also easily build links into other systems to load relevant Perspective pages directly.

Wrapping Up: Perspective Module Concepts

We’ve shared the major differences when moving from the Vision module to the Perspective module in Ignition. But, if you have used Vision before, Perspective will feel very familiar. While you will have to think of a few concepts in different way, you will pick it up quickly. If you have experience with web development, the concepts in Perspective will gel even more quickly. You will recognize the essence the web-based development methodology in Perspective, and notice how it seamlessly integrates with the platform as a whole.

The Perspective module is a powerful tool in the Ignition arsenal, and will enable powerful solutions when integrating plant floor systems with other web-based systems like ERPs and warehouse management systems.

We are very excited to see Perspective gain wide adoption across the Ignition landscape, and are happy to help you learn how to get the most out of it once you start rolling it out yourself!

Learn More About Ignition and Perspective:

Updated - 3/3/2023

Previous
Previous

The High Performance HMI Handbook and You - Part 1

Next
Next

Ignition Explained Series Recap