The Developers Guide to the Power Platform Galaxy

April Dunnam

0 comments

In this eBook companion to the video ‘The Developer’s Guide to the Power Platform Galaxy’, we will explore how full-stack developers can bring their skills and make the best use of skills and the Microsoft Power Platform. This will help developers to build connections, controls and leverage the application life cycle to deploy these across environments easily.

Microsoft is one of the major public cloud service providers. Microsoft public cloud services are available to anyone to use for their business. Each organization has unique business requirements. Microsoft public cloud platform is designed in such a way that each business can create their specific business application by extending it or on top of the platform.

Microsoft is known for its Azure cloud service, which provides developers with a platform that enables a business to develop custom apps.

Custom app development has advantages and disadvantages. Developing applications require specific skills, understanding of programming language, deployment in the platform, and more. It takes time to develop an application and get it to business users in time to use it.

Microsoft has developed and released a rapid application development platform, known as the Power Platform.

Microsoft Power Platform enables business users to build and develop business applications quickly and deploy them for business users.

In any enterprise, the business needs to understand how an organization can leverage this platform. The below scenario explains how the platform will assist in delivering the business applications.

Scenario:

Consider a business that loans different types of equipment normally held in stock to employees for limited amounts of time.

Power Apps allows us to build an app that has all equipment listed, the status of that equipment, and even important details such as user instructions. This way, employees can check out available equipment, walk to IT at a specified pick-up time where the equipment will be ready, and even access the use instructions or flag an equipment malfunction from their phone or tablet.

Power Automate can determine when equipment needs to be returned and send out reminder emails, or even a warning that the equipment is late being checked in. Users can see when equipment is booked through the app and request check out for a future date at which time Power Automate can send them a reminder to pick up the equipment and IT a reminder to have it ready.

Power BI can take all the data generated from the app and analyse it to help you understand what equipment is used most often and by whom. This way you can decide if you need additional equipment, if some users or departments need dedicated equipment, and when your equipment has reached the end of its usefulness.

Microsoft Power Platform

Microsoft Power Platform is comprised of four key products: Power Apps, Power Automate, Power BI, and Power Virtual Agents.

Why is it called a low code platform?

Microsoft also calls its Power Platform a low code/no-code platform. The Power Platform is an environment where applications are developed using declarative or drag-drop style without writing a full custom coded program.

A low code platform’s advantage is that it can take the workload away from the traditional developer and IT to enable Power Users to deliver the business application rapidly.

Microsoft PowerApps is an application development platform, Power Automate is a workflow and integration system, Power BI is the reporting and analytics, and Virtual Agent is declarative bot application development.

Microsoft PowerApps

Power Apps provides a rapid low code development environment for building custom apps for business needs. It has services, connectors, scalable data service and an app platform (Common Data Service) to allow simple integration and interaction with existing data. Power Apps enables the creation of web and mobile applications that run on all devices.

  • Build highly customized task and role-based canvas apps with data from one or multiple sources
  • Generate immersive model-driven apps, starting from your data model and business process
  • Consume fully accessible apps across web and mobile, embedded, or standalone on any device

Microsoft Power Automate

Power Automate lets users create automated workflows between applications and services. It helps automate repetitive business processes such as communication, data collections, and decision approvals.

  • Automate and model business processes across your apps and services
  • From simple automation to advanced scenarios with branches, loops, and more
  • Trigger actions, grant approvals, and get notifications right where you work
  • Automate legacy, on-premises, and cloud-based applications and service

Microsoft Power BI

Power BI (Business Intelligence) is a business analytics service that delivers insights for analysing data. It can share those insights through data visualizations in reports and dashboards to enable fast, informed decisions. Power BI scales across an organization, and it has built-in governance and security, allowing businesses to focus on using data more than managing it.

  • Connect to all your data and get a consolidated view across your business through a single pane of glass
  • Create ad-hoc analysis, live dashboard and interactive reports that are easy to consume on the web and across mobile devices
  • Build smart apps by infusing insights from your data and drive action

Microsoft Virtual Agent

Power Virtual Agents enables anyone to create powerful chatbots using a guided, no-code graphical interface, without the need for data scientists or developers. It minimizes the IT effort required to deploy and maintain a custom solution by empowering subject matter experts to build and maintain their own conversational solutions.

Power Virtual Agents is part of Power Platform, therefore integration into existing systems is streamlined with out-of-the-box integration with Power Automate and its ecosystems of hundreds of connectors.

Users can enable chatbots to perform an action by simply calling a Power Automate flow.

  • Enable subject matter experts to easily create powerful virtual agents using a guided, no-code graphical interface – all without the need for data scientists or developer
  • Enable the virtual agent to act on the customer’s behalf. Easily integrate your virtual agent with 100+ services and systems out of the box.
  • Keep an eye on how your virtual agent is performing by using conversational metrices and dashboard.

NB: Some of the text of the definitions is taken from Microsoft Learn course – https://docs.microsoft.com/en-us/learn/modules/introduction-power-platform/2-what-is- power-platform

A Platform for All

Power Platform provides capabilities for each maker, whether it is a citizen dev, IT admin, or professional developer.

Challenge with full development cycle

In traditional app development, there is a process to be followed to deliver any application. This requires more than just the developer to deliver the business outcome from the time investment.

In comparison, the following chart shows the quick return of time and resources investment over the traditional app development cycle.

Why should you invest in low code platform?

In recent times, many organisations are finding it challenging to move from the idea to the implementation stage due to the time it takes and also to justify the business value from the total cost.

By looking at the following facts, it will be obvious that any organisation, either as a customer or partner/ISV, should give importance to Power Platform as this will help get the work done quickly.

  • Low code market is projected to reach $6.7B in 2020, up8% from last year.
  • The automation software market grew 62.9% in 2019 to $1.4B.
  • Modern App Dev opportunities are continuing to grow.
  • There will be requirements of 500M new apps in next 5 years which is more than the number of apps built in the last 40 years.
  • There is 5x faster demand for mobile apps than IT can deliver.
  • 37% of organisations are still using paper to manage critical business processes.

Three pillars for full stack developer

As discussed earlier in the book, traditional development takes time and delivers the same business value which Power Platform can deliver quickly with more iterations and is easy to deploy across the business.

The question that code-based developers will ask themselves is how to use my existing skills and build using Power Platform?

So, the answer will be that as a full custom developer, we can still use Connectors, Components and leverage the Application Life cycle, aka ALM capabilities.

Let us explore them as below what are these components.

Connector

A connector is a wrapper around an API that allows the underlying service to talk to Microsoft Power Automate, Microsoft Power Apps. It provides a way for users to connect their services and leverage pre-defined actions and triggers to build their workflows.

The connector can be a public connector (available for all users) or a custom connector (build for a specific purpose).

Why should I build a custom Connector?

Enterprise developers can build one custom connector for making connectivity to a service that is not available in the public store for use or needs to connect an internal service within the organisations.

If you are in the System Integration or ISV world of Microsoft, you should create a connector for your service or for your service offering for customers. This will help you to expand the services integration which you can offer to the customer. Also, this depends on the need at the time. For example – Microsoft Graph API does not have a direct connector in Power Platform, through many public connectors like people, email, and more are powered by Graph in the backend. Building a connector with Graph API will help you solve many problems like Teams creation, AD management and more. This will help you to reach more customers and adopt and use your custom connector.

But there is an HTTP connector already?

There are various reasons why you should build a custom connector over an HTTP connector.

  • Simple – It will make it easy to make a call to your service and integrate from any of the Power Platform components.
  • Reusability – There is no way to templatize the HTTP connector with pre- defined settings. Custom connector allows to manage the application registration and reuse the same connector for multiple purposes at multiple places and save time.
  • Fill Gap in PowerApps – You can use the HTTP connector in Power Automate but not in PowerApps as PowerApps does not have any way to call HTTP requests. You end up writing a Power Automate. Custom Connector save you doing ad-hoc work and makes it easy to manage one connector than multiple automate processes.
  • Better Analytics – By looking at custom connector usage and analytics in the Power Platform Admin center, you can easily troubleshoot and improve the user experience.

Which API can I connect with?

You can connect any RESTful API. This can be public APIs from Spotify, Yelp, or more. When you build APIs on Azure PaaS (Azure Functions, Web Apps, API Apps, and more), these can be published as public APIs. You can also connect with Azure APIs, which you manage.

If you have a legacy API on-premises, you can use Data Gateway to connect with on- prem APIs.

What security standards are supported in connector?

Custom connector support following security methods for authentication and authorization –

  1. Generic OAuth2.0
  2. OAuth 2.0 (Azure AD, Github, Salesforce and more)
  3. Basic Auth
  4. API Key

What components make a Connector?

For defining your API in the custom connector, you can use OpenAPI 2.0 (Swagger file), Postman collection, or build from scratch.

  • Name
  • Logo
  • Description

Info

  • Endpoint and their visibility
  • headers
  • definitions and more

Actions

  • Timed or event- driven
  • Webhook action

Triggers

  • Reusable input
  • output object

References

  • Templates for runtime

Policies

Actions

Actions are operations that are available to be performed on the service by the user. For example, you would use an action to look up, write, update, or delete data in a SQL database. All actions directly map to operations defined in the service API Swagger definition.

Triggers

A trigger is a condition that invokes the connector to start processing the triggering condition. For example, the file upload connector can have the OnUpdatedFile trigger. You can build either a Logic App or a flow that listens to this trigger and performs action whenever the trigger fires.

Note: Triggers are not supported in Power Apps.

Where can I use custom connector?

Custom connectors can be used in Power Apps, Power Automate for connecting to that specific scenario.

The Power Platform already has 300+ publicly available connectors.

By building a custom connector you can bring your own RESTful API to life by allowing Power Platform to connect with it and build applications. For example, if you have a custom RESTful API that performs an operation on a custom HR system. You will need custom devs to build the application, but when you enable API via the custom connector, business users can perform the same operations from Power Platform allowing you to build applications faster.

One can build and use a custom connector by following step by step guide and publishing the custom connector either in the local environment or in the public gallery.

The lifecycle of a custom connector will be as below –

Develop

  • Build, secure and define API

Test

  • Validate API call

Share

  • Allow users to use connector

Certify (Optional)

  • If you are an ISV, this will be your dream.

We will learn to build a custom connector to connect an OAuth2.0 supported API in the next chapter.

Components

Components are reusable building blocks that include the definition of a set of controls. You can import components in other apps. This has a master-child relationship with a solution.

For example – the built-in calendar control does not provide options on date format selection, colour and more. Using PCF developer can create the custom control with all options as required.

Power Apps component framework licensing requirements are in line with existing connectors and components and is based on the type of data and connections used in your app.

There are classic components that are created by citizen dev in Power Apps Studio with low/no-code and Code components that are built by pro dev and created in VS Code with full code.

PowerApps Component Framework

One unified framework across model-driven and canvas driven applications to provide a standard experience and richer set of common controls

  • Field Data
  • Dataset Data
  • Unbound controls

Visualize

  • Metadata driven
  • Configurable
  • Reusable

Extend

  • Solution aware
  • Controls and configs
  • Responsive

Portable

Why use PCF Controls?

There are various reasons as to why one should prefer building and using the PCF controls.

  • This has power of full HTML/JS to create custom UI.
  • PCF controls allow re-usability, accessibility, and performant UI components development.
  • Heavy lifting of solution embedding, and usage is managed by the platform.
  • As end user, you can fully configure them.
  • Multiple form factor support
  • Responsive
  • Adaptability
  • Reusability
  • Accessibility
  • Performance

Breakdown of Code Components:

Code components consist of three elements:

Manifest

Manifest is the metadata file that defines a component. It is an XML document that describes:

    • The name of the component.
    • The kind of data that can be configured.
    • Any properties that can be configured in the application when the component is added.
    • A list of resource files that the component needs.
    • The name of the TypeScript function in the component implementation library that returns an object that applies the required component interface.

Component implementation

Component implementation is important as to how components will work and interact with the Power Apps component framework. Developers can implement a component using TypeScript. Each code component must have an index.ts file that includes the definition of a function, which returns an object that implements the methods described in the code component interface. This file is autogenerated via CLI tooling with the main stub methods.

The object implements the following methods:

    • init (Required)
    • updateView (Required)
    • getOutputs (Optional)
    • destroy (Required)

These methods control the lifecycle of the code component. Resources

Resources can be of various types to support the control to function properly. This includes

    • JavaScript files
    • CSS
    • Localization files
    • Images and more

Application Lifecycle Management (ALM)

As developers, we use Azure DevOps to manage the application lifecycle or some other tools to manage CI/CD process. ALM is the lifecycle management of applications, which include governance, development, and maintenance. ALP tools provide a standardized system for communication and collaboration between software development teams and related departments such as tests and operations.

ALM provides

  • Support for moving assets across environment using solutions
  • Full developer isolation with access to authoritative source management in GitHub
  • Agile process governance and team collaboration
  • Fully automation of repeatable processes for test and pipeline supporting any CI/CD framework.

As part of the Power Platform Admin Center, you can use auditing and governance capabilities with ALM capabilities.

Please visit the Power Platform Admin Center for more options to support you in governance and admin operations.

Sample reports from Power Platform Admin Center:

Key areas of ALM

  1. Governance includes requirements management, resource management, data security, user access, change tracking, review, audit, deployment control, and rollback.
  2. Application development includes identifying current problems and planning, design, building, and testing the application. This area includes the traditional developer and app maker roles.
  3. Maintenance includes the deployment of the app and the maintenance of optional and dependent technologies.

Plan & Track

Monitor & Learn

Develop

Application

lifecycle

Operate

Build & Test

Deploy

ALM for Power Platform

The following concepts are important for understanding ALM using the Microsoft Power Platform.

  • Solutions are the mechanism for implementing ALM; you use them to distribute components across environments through export and import. A component represents something that you can potentially customize. Anything that can be included in a solution is a component, such as site maps, apps, entities, fields, charts, or plug-ins.
  • Common Data Service stores all the artifacts, including solutions.
  • Source control should be your source of truth for storing and collaborating on your components.

How-to?

Now, we have understood how developers can bring their skills to develop on the Power Platform. Let’s learn how we can use these capabilities to deliver the solution.

Connector

In this connector example, we will be learning how we can use a RESTful API that supports OAuth2.0 authentication.

We will use a ready to use Microsoft Graph API and build a connector to extend it and use it in Power Automate.

Either navigate to the Power Apps portal or Power Automate portal to navigate to the custom connector page.

Click on the new custom connector and select create from blank

Give a name to the connector.

Update the general tab information as per the screenshot.

Click on Security to configure the next tab.

There is no security required directly here. Click on the Definition arrow to move to the next tab.

Under the definition tab, update the Actions section by clicking on the + New Action button and creating a new action as per the screenshot

Under Request, click on + Import from the sample link and fill in the sample information as per the screenshot.

For sample return of items, please visit the link – https://untappd.com/api/docs#beersearch

Copy the sample return data and paster that under the output default section. On importing the data, the screen will look as per the screenshot.

Now, click on the create connector option at the top of the page. This will also validate the connector configuration.

When you move to the test tab, click on + New Connection, which will complete the connection process.

This will redirect to the connections page. Come back to the custom connector by editing it and you will see the three parameters available for use and testing.

*Above steps do not define how you create client id and client secret with the Untapped API platform. Please visit the link https://untappd.com/api/docs#beersearch for more information about the use of Untapped API.

Now, the connector is ready.

The next step is to test the connector.

Go to the Power Apps portal and create a new Power Apps.

Use the Data tab to search and add the connector.

On the Power Apps screen, please add controls as defined below.

Add a text box input, a search button, and a gallery to hold return items.

Modify the OnSelect Property of the search button as per the screenshot.

Now, go and select Gallery control and set Data Source property as

beerResults (from the ClearCollect collection)

Then, select Gallery and modify the Items mapping to display the required information.

Edit item mapping according to your demo

Component

We will build a linear slider code component that enables users to change the numeric values using a visual slider instead of typing the value in the field.

The following steps are required to build a linear slider code component:

Get tooling for Power Apps Component Framework

Use Microsoft Power Apps CLI (command-line interface) to create, debug, and deploy code components using the Power Apps component framework. Power Apps CLI enables developers to create code components quickly. In the future, it will be expanded

to include support for additional development and application life cycle management (ALM) experiences.

Link – https://docs.microsoft.com/en-us/powerapps/developer/common-data- service/powerapps-cli

Graphical user interface, text, application, email  Description automatically generated

Create a component

Refer to the Microsoft Doc Link https://docs.microsoft.com/en- us/powerapps/developer/component-framework/create-custom-controls-using-pcf to create linear input control.

Look at this link if you would like to directly look at the sample code or reference any other publicly published ones. – https://github.com/microsoft/PowerApps- Samples/tree/master/component-framework/TS_LinearInputControl

Example

To create a project and open in VS Code–

To modify any code and then save it back in the solution –

Once you have completed any code change, do an npm start command execution, this will load the PCF test framework and you can do a unit testing of your control

Text  Description automatically generated

The Testing screen should display like this:

Once testing is complete, you can package it up and import it to another solution for use.

Application Life Cycle

Microsoft Power Platform Build tools are used to automate common build and deployment tasks related to solutions/apps built on the Power Platform. These tasks include:

  • Synchronization of solution
  • Generate build artifacts
  • Deploy to environments
  • Provisioning or de-provisioning new/existing environments
  • Perform analysis checks by using the Power Apps checker service

The Microsoft Power Platform Build Tools tasks can be used along with any other available Azure DevOps tasks to compose your build and release pipelines. Pipelines that teams commonly put in place include Initiate, Export from Dev, Build, and Release.

What are Microsoft Power Platform Build Tools?

The Microsoft Power Platform Build Tools are a collection of Power Platform-specific Azure DevOps build tasks that eliminate the need to manually download custom tooling and scripts to manage the application lifecycle of apps built on the Power Platform. The tasks can be used individually to perform a simple task, such as importing a solution into a downstream environment, or used together in a pipeline to orchestrate a scenario such as “generate a build artefact,” “deploy to test,” or “harvest maker changes.” The build tasks can largely be categorized into four types:

  • Helper
  • Quality check
  • Solution
  • Environment management

Get Microsoft Power Platform Build Tools – Microsoft Power Platform Build Tools can be installed into your Azure DevOps organization from Azure Marketplace.

After installation, all tasks included in the Microsoft Power Platform Build Tools will be available to add to any new or existing pipeline. You can find them by searching for “Power Platform.”

Administrators can use the Admin portal of Power Platform to manage various environment-related elements, which also contributes towards managing the ALM of the Power Platform.

For more information on administrative activities available in Power Platform, please visit the document available at link https://docs.microsoft.com/en-us/power- platform/admin/admin-documentation

App Checker

The App checker helps you debug errors with formulas, rules-based errors, build & run time errors, accessibilities, and performance issues, and more.

Monitor tool

This will help us troubleshoot any performance issues or identify bugs. You can run the app and it will log all steps for debug.

You can use the below steps to run the monitor tool and debug apps.

  1. Click on Monitor.
  1. It connects to the session, and then you can run an app to check the details.
  1. When you run the app, the following type of log will be generated and shows detailed info.

Testing

Testing also helps build automated testing. You can use a record option for verifying your applications.

  1. Start testing
  1. Record
  1. On finishing the testing scenario, complete by clicking the ‘Done’ button.
  1. Now you can save this or play back.

NB: Some of the terms and definitions within this session and this eBook have been taken from the Microsoft sites to ensure clarity.

0000-00-00 00:00:00


Leave a Reply

Your email address will not be published. Required fields are marked

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}