Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Microsoft Power Apps Cookbook, 2e - Second Edition

You're reading from  Microsoft Power Apps Cookbook, 2e - Second Edition

Product type Book
Published in Aug 2022
Publisher Packt
ISBN-13 9781803238029
Pages 414 pages
Edition 2nd Edition
Languages
Author (1):
Eickhel Mendoza Eickhel Mendoza
Profile icon Eickhel Mendoza

Table of Contents (15) Chapters

Preface 1. Building Pixel-Perfect Solutions with Canvas Apps 2. Building from Data with Model-Driven Apps 3. Choosing the Right Data Source for Your Applications 4. Automating Processes with Power Automate 5. Extending the Platform 6. Improving User Experience 7. Power Apps Everywhere 8. Empowering Your Applications with No Code Artificial Intelligence 9. Discovering the Power Platform Admin Center 10. Tips, Tricks, and Troubleshooting 11. Advanced Techniques with Power Apps Component Framework 12. Reaching Beyond the Organization with Power Pages 13. Other Books You May Enjoy
14. Index

Discovering best practices when building canvas apps

Setting up data sources, defining business process flows, creating user interfaces; all these tasks are pieces of an application-building process. These pieces come together to accomplish one main goal: to build a solution that solves a specific need.

One of the things you need to consider is the maintainability of your app. Whether fixing bugs or adding new features, using best practices is always a good idea. No matter your technology, well-documented code is easier to maintain.

Even though Power Apps is a low-code platform, you must consider certain things before building applications. Like any other developer team, you need to establish code standards. These standards allow your team to be more productive by setting predefined patterns for variable naming, control usage, and coding methodology.

Variable naming

Proper naming gives your developers instant insight into the scope of your variables. For example, if a variable name prefix starts with lcl (short for local), it means its value will only be available on the current screen. On the other hand, using gbl (short for global) means that this variable is accessible across the whole application.

These examples might seem trivial, but if another developer needs to maintain your app or if your app serves as a template for other apps in your organization, setting these patterns from the start can help the application-building process and maintainability.

Control usage

One of the vital elements of an application’s success is performance. If an application is slow to start or takes several seconds to perform a task, it hurts user adoption.

Here are a couple of examples of this:

  • A great-looking app that uses many controls to build its user interface but hurts performance each time the screens get rendered.
  • Displaying data to the user using a gallery inside a gallery. This approach might be tempting to present master-detail data, but this would be a significant slowdown in your application.

To avoid this, you need to learn the performance points of your platform. In Power Apps, one of the main recommendations for improving responsiveness is to reduce the number of controls.

Coding methodology

This concept describes a set of rules to regulate the development process in a low-code team. Your solution infrastructure can also help you make an informed decision on how to build your application:

  • If you have data that rarely changes, you can create collections to avoid round-trips each time data is required. Even more, if you have data that never changes, you can import this as static data inside your app for speedier access.
  • Taking advantage of the features available in your data source can significantly improve your application performance. For example, when using Dataverse or a relational database, there is a significant difference when querying data if you use data source views instead of building the actual query in your application logic, especially if it needs complex relationships. Using these views gives you cleaner code while also enhancing performance. This improvement relies on the data source engine as it is the one that executes the data processing instead of the application itself.

These are examples of practices you can coordinate with your team when building apps. For a detailed list of best practices, please refer to https://powerapps.microsoft.com/en-us/blog/powerapps-canvas-app-coding-standards-and-guidelines/

You have been reading a chapter from
Microsoft Power Apps Cookbook, 2e - Second Edition
Published in: Aug 2022 Publisher: Packt ISBN-13: 9781803238029
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}