Tips For App Makers - Power Apps

 




Tips for Microsoft Power Platform App Makers

Thing to keep in mind while building a Power App 


1: Using a Component Library

If you are building a Power App from scratch the most important thing to keep in mind is to use component.

What is a Component?

Components are reusable building blocks for Canvas Apps. A user can create custom controls to use inside the App or across Apps using a Component Library.

What is a Component Library?

Component Libraries are containers of components that a user can use to easily share and update one or more component to other App Makers

When to use a Component?

You are using the same control on every screen of the app? Building a component is the best approach. It saves you a lot of time and makes the app easier to maintain and modify. You can assign different Custom Properties to a component according to your needs. 

You can use a component for almost anything for your App. Header, Navigation Menu, Buttons and much more.

Note: Components also has its limitations. Be sure to understand them before using.

2: Tabular Forms

There are two types of Form Controls, View Form and Edit Form. Here we are talking about Edit Form.

If your app consists of large forms, consider using Tabular Forms. A tabular form can enhance the user experience. It saves space on the app. A tabular form is a simple form that is divided into pieces.
For Example:



I'll be sure to upload a blog on how to make Tabular Forms.

3: Using Collections 

Use a Collection to store data that users can manage in your app

A collection is like a table. It is a group of item that are similar. For Example: Products in a Product List. If your app is taking too long to transact data from the database. You should consider Collecting the data into a Collection on App Start. Then use the collection everywhere in the App. It makes the processes of the app much more reliable and efficient. No need to fetch data from the database every time you need to perform a data transaction.



4: Leave Comments inside the code

If you are an App Maker. You should be responsible while making the App. The app should be easy to maintain and easy to understand for other developers. You can leave comment in the code explaining the purpose of the code so that any other developer who configures your app can understand the code. 

Use // before typing the comments 

For Example:



5: Set Variables

Setting a variable for your app configurations is a good approach. The app will be easier to modify and configure.
There are two types of variables.
Global Variable: Which is assessable across the whole app.
Context Variable: Which is only assessable on the current screen. 

You can set a Variable for almost any property. For Example;

Font-Type
Font-Name
Font-Size
Padding
Margins
Width
Height
Background-Color

For Example:



6: Naming your Controls

Renaming your controls to something meaningful is a good approach. This makes the app easier to configure. The app maker wont have to find a certain control by looking at each and everyone of them. It saves a lot of time and headache trust me.

You can name your controls according to your client's requirements, your company's requirements or your own. 

Note: The name should be meaningful so that anyone can understand it

For Example:

Naming a logo image "img_logo"
Naming a heading label to "lbl_heading"

Naming the variables and collections to varVariableName & colCollectionName is also a good approach that way you wont be confused between a Table and a Collection. Or a global or context variable

7: Saving Your App right after creating it

Power Apps auto-save saves the app after every 2 minutes. But in order to enable the auto save you have to save the app first. Imagine working on an app for 2 or maybe 3 hours. All of a sudden your light goes off or your Network has occurred some issue or for any case you lost all of your work because you didnt save it as soon as you started creating me. It happens to the best of us. So always remember to save your app as soon as you start building it before doing anything so the Auto-Save can do its work.


8: Using Flexible Height Gallery

If different items in your data set contains different amount of data in the same field, you can completely show items that contain more data without adding empty space after the items that contain less data. You can use a flexible height gallery so that you can configure label controls to expand or shrink based on their contents. You can also position each control so that it automatically appears just under the control above it

This is an example of flexible height gallery:



9: Turn off Snap to Align and Snap to Column

Power Aps drag and drop feature is what makes it so easy for beginners to start creating apps. If you drag a control or a column in a form too close to another control or column you will notice that it snaps to the border of the other object. This is not desirable when you want to leave little space between the controls or columns in a form. You can turn of Snap to column from the property menu on the right hand side of the screen.


10: Use inline CSS to make your app UI friendly


Use the HTML Text control to add inline CSS to your HTML code,

To add an HTML Text control,

Go to, Insert > Text > Html Text

Have a look at this UI that I worked on. I used inline CSS to achieve this:







That's it for today. I'll be sure to upload another blogs on more tips soon. Stay tuned.

I hope this Blog was useful for you. Be sure to subscribe to the Blog.

Feel free to ask questions and give suggestions in the comment box down below:

Comments