In this video, we will learn the importance of functionality and why to reuse it in the Microsoft Power Platform.
We will also learn about how to handle long running functionality, how to use Azure Functions with Common Data Service (CDS) and how to use Azure Functions with Power Apps.
At 01:20, Lee Baker (Business Applications Technical Lead at MS) starts to explain why should we reuse functionality. The first benefit is to shorten the development time. This is one of the things we think about if we have spun up some code for building an app, then the shorter development time is great. That is because when we spin up the second app, we haven’t got to build that part of functionality again.
Let’s say if we think about small piece of validation that we could put in Azure function, for example a UK phone number. So, we give it a country code and say that +44 at the start and then if it’s a mobile number, we’ll have 07 at the start and will drop the zero. That kind of leads onto the next point of consistency.
At 02:00, he explains the second benefit of reusing functionality, consistency. Even within the little scenario, there are a bunch of little nuances of things that could go wrong. Things that could be different here, there or anywhere else. We don’t want our web app, our internal canvas app and our portal for our customers to be different. We don’t want the experience to be different in all those places.
Think about the mobile app as well. Customer shouldn’t go to the website and the mobile app and get different experience on even the smallest things like managing a phone number validation. This consistency also helps with the clean data and keeping everything good.
From 02:50, Lee explains the third benefit of reusing the functionality, the Easier Testing. The testing is probably taken as a given, but again, just with that small example of the phone number, there are lots of scenarios. If we are talking about automated tests, it takes a while to write those, to give it all the different scenarios to make sure we are in a good place to give out good quality, secure code. And if we are talking about manual tests, then that can take ages to get through all of these different scenarios.
So, if we think about the reuse from that point of view that once we have this thing set up and spun up in production once, then every time we test a new app.
At 03:40, he goes to explain the last benefit of the reusing functionality which is the Live Proven Code. If we have an app that has been deployed, it’s been sat in production, being used within our mobile app for six months. Where we then know that we don’t really have to think about this little bit of functionality or that little bit of functionality. It’s already in production, is already proven.
When we pushing out a new app, we just know that rest of the work in much more comfortable that all of these separate bits of functionality are all there and working properly. Which then gives a lot more buy in from the business to be able to get more out and get it out quicker.
From 04:45, Lee tells us how we can achieve this in the Power Platform. How could we bring this low-code platform and the scale of Azure, together and how can we bridge the gap? We can surely do so by Azure Functions.
Azure Functions are just ways of bringing our small pieces of code and setting them with our different business events and our data. We will mostly use Azure Functions triggered by HTTP request. Some of these work into an API but we can have all sorts of things triggered functions, whether it is Service Bus triggers, or we are binding to Cosmos DB and the same with outputs as well.
We have the whole authentication wrapper if we need different types of authentications. We can also write them in multiple languages. We also have the advantage of scalability here which is the main thing which comes out of serverless computing. This can also scale up to phenomenal levels and back down again as when we need it without us doing a thing which is indeed a great thing for us.