Leveraging the Power Platform, and more specifically Power Apps, yet helping them scale and extend their Power Apps with Azure services.
For example, a pro developer who works for a manufacturing company would need to build a line-of-business (LOB) application to help warehouse employees track incoming inventory.
That application would take months to build, test, and deploy. Using Power Apps, it can take hours to build, saving time and resources.
However, say the warehouse employees want the application to place procurement orders for additional inventory automatically when current inventory hits a determined low.
In the past that would require another heavy lift by the development team to rework their previous application iteration.
Due to the integration of Power Apps and Azure a professional developer can build an API in Visual Studio (VS) Code, publish it to their Azure portal, and export the API to Power Apps integrating it into their application as a custom connector.
Afterwards, that same API is re-usable indefinitely in the Power Apps’ studio, for future use with other applications, saving the company and developers more time and resources.
To learn more about possible scenarios with LCAD on Azure go through the self-guided tour.
Azure Functions Reusability
Why should you reuse functionality? There are four key reasons: shorter development time, consistency, easier testing, and live proven code.
The shorter development time is driven by not having to build code again.
For example, if you’re validating a phone number with your application you don’t want to have to re-write the code for each nuanced small scenario, such as rebuilding a web app, then a portal, etc.
Not re-writing code even if it is being plugged into a new app enables shorter development time.
Additionally, this ties into greater consistency in your code creating a much cleaner user experience across platforms and devices.
Reuse of functionality also enables easier testing.
When reusing functionality you can automate tests, however if you write new code each time, for each iteration you must manually test the code, subsequently increasing development time.
However, if you reuse functionality, once set up and spun up, every time you test apps down the line, all you need to do is check the Azure Function connection rather than starting from scratch.
Lastly, is the advantage of live proven code, which can’t be overstated.The separate aspects of functionality are already proven to work, therefore speeding up the application development lifecycle.
Durable Functions are an extension ofAzure Functions, that let you write stateful functions in a serverless environment. The durable extension manages state, checkpoints and restarts out of the box.
Durable Functions allow the creation of workflow activities like Logic Apps but are completely customizable and scalable.
Durable Functions can be called both synchronously and asynchronously. Output from Functions can be saved to local variables and used later in execution.
State and executions are managed within an Azure Table using the Event Sourcing Pattern and can be queried if needed.
For example, if you want to fill in a field on a form andneed to check input information across multiple databases, the orchestration capabilities of Durable Functions enable that functionality.
Moreover, if you need all the tasks to happen at the same time or need them to happen in different patterns, you could build that functionality in Power Automate or Logic apps.
Leveraging Durable Functions enables greater detail and options for functionality.
Lastly, these Functions scale rapidly to meet demand levels, however when inactive they rest until called upon again.
Functions Integration across the Power Platform
Second, are Power Component Framework controls (PCFs). They are a web packet that you can put in both model-driven app forms and canvas apps. The code can be called from either place, if used to call out an Azure Function it creates a double layer of reusability and can separate deployment for use across your business.
Third, are Power Apps Portals. These scripts are very similar to Dataverse forms and can be embedded into a portal to call any web API and call an Azure Function from the portal. Security will have to be handled differently for public facing portals than internal applications.
In the webinar Lee Baker covers the stages of when and how to connect a Power Automate flow to an Azure Function.
When? You can start when a record is selected in a model driven app, hitting the on-demand flow button, pushes those records to Power Automate. Or you can use standard Dataverse triggers when creating, reading, updating, and deleting (CRUD).
How?HTTP request actions from Power Automate or Logic Apps, can put data or URLs incorporate and get payloads back to use in Azure Functions, or you can build a custom connector.
You would build a custom connector because HTTP requests are often blocked by data loss policies in Power Platform environments butcan circumnavigate policies.
Custom connectors can be created in accordance with data loss policies but pull the HTTP request directly into the canvas application via Azure Functions for a secure and streamlined approach.