Wednesday, February 6, 2019

PowerApps vs Custom Mobile Development

Overview

Recently did an evaluation on when to use Microsoft PowerApps vs making a Custom mobile Application. Below are the findings from that study. A caveat is that I have just developed a couple Model Driven App and did a Udemy Course for an overview and am not an PowerApps developer into this work. As there is no such article till date which guides through this topic, I thought of creating one. If you happen to be an expert in PowerApps and finds something is wrong, please do send a comment and I will update the Article so that someone can benefit.

What is PowerApps?

PowerApps is a suite of apps, services, connectors and data platform that provides a rapid application development environment to build custom apps that connect to your business data stored either in the underlying data platform (Common Data Service for Apps) or in various online and on-premises data sources (SharePoint, Excel, Office 365, Dynamics 365, SQL Server, and so on).
Apps built using PowerApps provide rich business logic and workflow capabilities to transform your manual business processes to digital, automated processes. Further, apps built using PowerApps have a responsive design, and can run seamlessly in browser or on mobile devices (phone or tablet). PowerApps "democratizes" the custom business app building experience by enabling users to build feature-rich, custom business apps without writing code.
PowerApps also provides an extensible platform that lets pro developers programmatically interact with data and metadata, apply business logic, create custom connectors, and integrate with external data.
[This above section was copied from Microsoft documentation. My analysis is in below sections]

When to Build using React Native (or Xamarin etc.)?

  1. You need your application to be searched within Apps Store and Play store directly.
    • PowerApps run in Microsoft PowerApps program and does not come with standalone application as such in Apps Store or Play Store.
  2. When you need Native performance (5 to 10 seconds compared to 2 to 3 seconds)
    • PowerApps is based on open source version of the software called Apache Cordova
  3. When you want to have users outside your Organization
    • You can't share an app with a user or group outside your organization.
  4. When you need to use Native capabilities, e.g. open Camera within a section of UI with custom buttons or a different looking date picker or open multiple images from mobile Gallery
    • PowerApps provide access to Camera, Geo Location, Video, Barcode scanner, Microphone, Audio, etc, but experience cannot be customized beyond a level.
  5. When you have unlimited users or PowerApps cost is prohibitive

When to Build using PowerApps?

PowerApps shines when Business Users can create their own apps without or with little developer intervention for there day-to-day needs and can connect to back-end data in Dynamics/SharePoint/Salesforce/Excel Online, etc. This allows for Innovation within firm and increased Productivity. Actions on PowerApps App can also trigger any Workflow created in Microsoft Flow to Automate sending emails, create event in EventBrite, set a flag in SharePoint, etc. for Automation of manual processed being done by Business.
PowerApps is a platform that offers a pre-defined set of Features which cannot be extended beyond a certain degree. Before building PowerApps, recommendation is to draw the full UI/UX and confirm that all features will be met by PowerApps. Without this analysis done, there can be major road-blocks in development.
Refer to Power App Ideas for type of requests which are being requested by users to include in Product.

Build PowerApps when:
  1. When points mentioned in section "When to Build using React Native" is not applicable
  2. When a "Citizen Developer" in Business/Data wants to quickly demonstrate a proof-of-concept Application without developer involvement. When Application requirements cannot be met via PowerApps alone, then it can call for a new Build in ReactNative.
  3. When app is to be distributed across people in Organization only
  4. When accessing Organization only assets, using PowerApps with built-in connectors can speed-up the development, e.g. Excel Online / Building SharePoint forms / Salesforce / PowerBI etc.
  5. Also, refer to PowerApps Use Considerations section below. 

PowerApps Use Considerations

  1. To retrieve data from On-Premises, e.g. SQL Server, VMs, etc., need to install Gateway Software. The query is routed via Azure Service Bus. Gateway cannot be installed on Linux machines. Also, requires a machine with 8GB RAM. Also, need to open outbound ports.
  2. Cannot create Custom Controls: PowerApps provides lots of Controls including Rating Control, Video, Charts and they can be Customized. However, if there is a need for a Custom Control which is not provided, then it cannot be built. Its important to have full visibility of UI/UX and see if requirements can be met with out-of-the-box Controls or not.
  3. Role based security Supported and can be applied to UI to show / hide / disable controls by either integrating with Microsoft Graph API or else by calling Custom API to get user roles and setting Visible property = If(“Administrator” in MyGroups.displayName, true, false)
  4. Notifications Supported: Powerapps Notification connector you can to send various notifications that directly target your apps. 
  5. Maps Supported with a Caveat: No in-built Map control, but Image Control can load the Maps that provide Static Map Images via API. E.g. Bing Map / Google Map and OSM Maps have API which can return png images as output of their API. Zoom In/Zoom out thus have to be coded as there is no in-built map control. Advance feature of Map if required needs to be evaluated further if they are supported by map API or not. As an example look at functionality provided by Static Map API from MapBox here - https://docs.mapbox.com/api/maps/#static. Google and Bing Map APIs also support returning image files. The map is displayed as a image, so there is no interactivity, i.e. you can paint a marker or a geojson layer via API, but on click of a particular Marker if something should happen then it cannot be coded.
  6. Pagination is in-built for few controls and few data sources. For those where it’s not supported by default involves writing API and calling via Connector for API.

Other No/Low Code Implications
  1. Mostly, if we are to build apps which connects with Complex database with multiple joins, it will require API level coding. No code can only be useful when consuming / updating sources like SharePoint Lists, Excel Online, OneDrive, etc.
  2. Editor Nuances - As there is no code and if you have 10 screens for which you need to change Styles, you cannot do a find replace, but have to go to each control and update Style property in Properties window.
  3. As there is no code, a UI cannot be changed at same time by two developers as it’s not possible to merge the changes. The platform however can maintain versions of Applications and the versions can be reverted. Its also possible to export entire Application as a zip file and these files can be placed in Source Control.
  4. Excel like language e.g. to Navigate to another screen - Navigate(ProductsScreen, ScreenTransition.Fade, { selectedSection: Dropdown1.Selected.Value })

Overview of creating Applications in PowerApps

How to connect PowerApps to Custom API?

PowerApps DevOps Activities

Source Control - PowerApps are version controlled as a whole. i.e. you cannot revert a single screen change, but need to revert whole Application to previous version. The entire PowerApps App can be exported as Zip and committed to a Source Control environment if required which may be of little use.

Continuous Deployment - [A Proof-Of-Concept needs to be done to validate this as not enough documentation] Package Deployer Tool can be used to Export PowerApps as a zip and then Import into another environment. It can be scripted using Powershell and thus can be included in Azure DevOps pipeline. 
Monitoring - PowerApps and Flow can be monitored manually from there Admin Consoles. In addition, Custom Monitoring can be coded in PowerShell. Refer this for some thoughts.
Automated Testing - "Easy Repro" is the tool which is developed by Microsoft on top of Selenium to perform Automated Testing for PowerApps. There are not many articles at present describing its use or limitations. Refer this.

Conclusion


PowerApps is a Rapid Application Development platform which shines when Business Users can create their own apps without or with little developer intervention for their day-to-day work Automation providing them access to Organization data. This allows for Innovation within firm and increased Productivity.