Blog Search Results for

Introducing the Template Library

Dylan Schuster
Dylan Schuster 4 minute read

Today’s platform update introduces the Template Library–a collection of common UI components, sample workflows, data simulators, and tutorial examples–for all Losant users. With just a few clicks, the resources found in the Library can be integrated into any existing application to improve the usability, security, and speed to market for projects of all shapes and sizes.

What are Library Templates?



Unlike the full Application Templates we introduced in March 2020—which are more suited to be learning tools or starting points for specific use cases—Library Templates can be integrated into any application at any stage of development. Their purpose is to significantly speed up development within Losant by providing out-of-the-box functionality that is common to all types of applications.

Types of Templates

Library Templates come in many forms and serve a variety of purposes, but at a high level, they fall into one of a few categories:

  • Data Simulators: Application builders rarely have their hardware in hand and ready to report in the early stages of development. In those first few weeks, when still vetting services for building out your solution, the ability to simulate the data your devices will ultimately output is crucial to making decisions that will affect the project. To that end, we’ve included simulators for simulating GPS asset trackers, camera data, and more to make the proof-of-concept stages of your project that much easier.
  • Experience Resources: This includes everything from entire user management flows to granular UI components for building out your End-User Experience. Each is built with usability and security in mind, and any one of them will shave hours, if not days, off of your development time.
  • Custom Nodes: Our entire Custom Node catalog is now available within the Template Library, making it easier than ever to utilize third-party integrations, data conversions, and advanced calculations within your application workflows.

appTemplate_banner-1

Using Library Templates

Library Templates are available today for all users. In the Losant interface, visit any of your applications and click the “Template Library” link within the navigation. This will take you to a page where you can:

  • Browse all available templates.
  • Search for entries that fulfill one of your use cases.
  • Read more about each template and how to use it.
  • Add a copy of the template to your application.

There’s no limit on the number of templates you may add to any application, though the assets added by each template are subject to your organization’s resource limits.

Each template comes with a detailed README with instructions on how to implement and customize the included assets. The templates are built to be used with little to no configuration, though many will require a bit of configuration post-installation, such as:

While templates are designed with out-of-the-box usage in mind, you are free to make any desired changes to the resources added by the template and even re-add another copy of a template at a later date.

What’s to Come

By and large, the initial Template Library entries come from user suggestions—both implicit in the applications we see built on Losant, and explicit via requests in our forums. We see “how do I…?”-type questions as opportunities for new templates, for if one user tells us they are struggling with a particular task, it’s a safe bet that many more are burning development hours on that same issue. To that end, we encourage our users to reach out in our forums with suggestions for new Template Library entries.

Alternatively, if you’ve built a template and would like to contribute to the library, you can submit your work as a pull request to our public Library Templates GitHub repo. After your entry is reviewed and published, don’t be surprised if your efforts are rewarded with some free Losant gear and an opportunity to show off your work in our forums.

Additional Updates

  • There is now a “defaultTo” Handlebars format helper, which allows users to render a default value in the absence of a value at the given path. Many users implement default behavior by writing something like:
myDefaultValue

With this new helper, users only need to use:

defaultTo
  • There is another new format helper for normalizing GPS coordinates. It is possible to report GPS data in a number of formats, and when querying that data, it’s returned in the same format as when it was reported. With this new helper, you can define how to render a GPS point regardless of its input format.
  • Position Chart dashboard blocks now support context variables for defining reference points when building your coordinate plane. This is useful if, for example, you wish to change the image within the block based on a different context variable value and your alternate image follows a different coordinate system.
  • It is now possible to clone and reorder graph segments in the Time Series Graph, Pie Chart, and Bar Chart dashboard blocks.
  • Baud rates in our Serial and Modbus Nodes can now be any positive integer, instead of just one of the standard baud rates. While rare, certain hardware can transfer data at a non-standard baud rate. This change allows for such cases in Edge Workflows.
  • Additional encoding options have been added to the Serial Trigger.
  • Recipients can now unsubscribe from dashboard email reports directly from the report email.

What’s Next?

With every new release, we listen to your feedback. By combining your suggestions with our roadmap, we can continue to improve the platform while maintaining its ease of use. Let us know what you think in the Losant Forums.

Dylan Schuster

Dylan is the Director of Product - Platform at Losant. When he’s not breaking his fingers playing vintage baseball, he designs and builds the user interface of the Losant platform.