Book Image

Microsoft Power Apps Cookbook, 2e - Second Edition

By : Eickhel Mendoza
3 (1)
Book Image

Microsoft Power Apps Cookbook, 2e - Second Edition

3 (1)
By: Eickhel Mendoza

Overview of this book

Power Apps is a low-code platform owned by Microsoft. With this platform, you can create solutions to solve your business needs while integrating with other components of the Power Platform, such as Microsoft Power Automate, Microsoft Power BI, and others. This book is a handy solution guide to meet many organizational requirements. Microsoft Power Apps Cookbook, Second Edition, takes a pragmatic approach where every business scenario is presented in a quick, practical, and action-oriented recipe. You will be able to use these instant solutions in your development environment and customize your business apps to meet challenging business needs. This will help you handle real-world scenarios and experiences to give you a head start in your Power Apps projects. You will discover various aspects of Power Apps, from building canvas apps, designing model-driven solutions, extending apps with custom connectors, and integrating apps with other platforms, to the pro-developer side including Power Apps Component Framework and creating website experiences for external users with Power Pages. By the end of this Microsoft Power Apps book, you will have gained experience in developing applications using the Power Apps platform and all its features.
Table of Contents (15 chapters)
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/