While the Internet contains an infinite supply of blogs and youtube videos focused on PowerApps, there’s not much content that answers the essential question. How do I ensure that I’m building my canvas app correctly? It’s up to you to learn how to organize and structure your canvas app so it is more maintainable and easier to extend over time.
Two weeks from now I will be in Amsterdam at Power Platform Summit presenting a preconference workshop titled Building Business Solutions with PowerApps and Flow. I have designed this workshop for technical specialists and citizen developers that need to learn how to build canvas apps and flows using standard guidelines and best practices. This workshop includes several hours of hands-on lab exercises in which attendees learn the following.
- Using standard naming conventions for screens, controls, variables and collections
- Nesting controls within groups for better organization and maintainability
- Delegating filtering and sorting work to the backend data source
- Tracking application state using variables and collections
- Implementing a canvas app with a shopping cart
Why should you learn to use standard naming conventions for the screens and controls you add in your canvas apps? The screen names you pick are important because they are read out loud by screen readers for people that are visually impaired. Therefore, you should create screen names that are readable such as Browse Customers Screen and Add Customer Screen. It’s also important to use a standard naming convention for the controls you add to your screens. This makes your canvas apps much easier to understand and to maintain over time.
There’s a very helpful whitepaper titled PowerApps canvas app coding standards and guidelines written by fellow MVP Todd Baginski and Pat Dunn from Microsoft. I really like this whitepaper because it spells out how to name controls using prefixes for greater readability. For example, a button should be named with a prefix of btn resulting in button controls names such as btnAddNewCustomer and btnNavigateToBrowseCustomers.
I highly recommend reading this whitepaper to anyone that’s building canvas apps because it defines standard naming conventions for all control types as well as naming conventions for global variables, context variables and collections. The whitepaper also examines best practices such as grouping controls, tracking application state with collections and global variables and using delegation to optimize backend data access.