Skip to main content

10 min read

From low-code to AI-enabled development with Power Apps Code Apps

From low-code to AI-enabled development with Power Apps Code Apps

Low-code works well, but not for everything

One of the strengths of Power Apps is how quickly you can build something that works. For a request form, a simple registration application or an internal management application, for example, a Canvas App can often get you a long way in a short time. You don't have to build a complete front end from scratch, because things like connections to Dataverse, forms and controls are already available.

It gets harder once the requirements go further. For example, when a customer wants a very specific interface, or when a screen contains a lot of interactive elements. You can then end up with a lot of logic in Power Fx, several collections, or all kinds of workarounds to achieve the desired user experience.

That doesn't mean Canvas Apps can't be used for this. The question is whether it is still the most logical choice at that point. As a developer, I think you should increasingly look for the solution that best fits the requirement, instead of starting with one type of Power App by default.

Over the past few years, we have mainly worked from the idea of low-code within Power Platform. You build an application relatively quickly with Canvas Apps or Model-driven Apps, use Dataverse for the data and Power Automate for background processes. For a large share of business applications, that still works perfectly well.

Yet you see applications becoming more extensive. Users now expect the same experience from an internal business application as from a modern website or mobile app. Think of a good responsive interface, fast search and filter options, dashboards and an interface that truly fits the process.

There is something else, too: AI is increasingly becoming part of the development process. Tools that can generate code are now good enough to save a developer serious time, especially with familiar technologies such as React, TypeScript, JavaScript and CSS.

This creates an interesting combination within Power Platform. You no longer have to choose only between low-code and fully custom development. With Power Apps Code Apps, you can combine both worlds better and better.

AI mainly changes how we develop

AI-enabled development may sound as if AI will soon build the complete application for you, but in practice I see it differently. For me, the biggest gain lies mainly in speeding up work you would normally do yourself.

Say you want to build an overview page in React where users can view their expense claims. You can start with the components, types, filters and styling yourself, but you can also let AI generate a basis first.

For example, based on a prompt such as:

Build a React component for an expense claim overview. Show date, category, amount and status. Add filtering by status and make sure the screen is also usable on mobile.

That gets you a first version fairly quickly that you can build on. It doesn't mean that code is production-ready right away, though. You still have to check whether the component fits well within the existing architecture, how data is retrieved, whether error handling is in place and whether security is properly arranged.

So AI takes over part of the executive work, but not the responsibility for the solution. I think that distinction matters.

What are Power Apps Code Apps?

Power Apps Code Apps are intended for developers who want to build an application from code, while still making use of Power Platform. Instead of creating a Canvas App in Power Apps Studio, you work from Visual Studio Code with React and TypeScript, for example.

A simple setup might look something like this:

Opzet Visual Studio Code

On the front end, you therefore have much more freedom than with a traditional Power App. You decide how your components are built, how you manage state, how navigation works and what the application looks like.

At the same time, you don't build the solution completely detached from Power Platform. For me, that is exactly the interesting part of Code Apps.

A different way of developing

If you mainly build Canvas Apps, you will be used to Power Apps Studio and Power Fx. Code Apps are different. You work much more as you would with a regular web application, for example with Visual Studio Code, React, TypeScript, Node.js, npm, Git and the Power Apps CLI.

The project structure is therefore also familiar to developers who already have experience with web development. For example:

Projectstructuur

You can decide for yourself how extensive you make that structure. For a small application, it doesn't need to be complicated. For a larger solution, you can clearly separate components, services and business logic. That also makes things like code reviews, version control and automated testing a lot more natural.

Why not just a standalone React app?

That was one of the first questions that came to my mind as well. If you're using React anyway, why not create a regular React app and host it in Azure, for example?

You can, of course, but then there are more things you have to arrange yourself. Think of authentication, hosting, APIs and the connections to underlying systems.

With a Power Apps Code App, you stay closer to Power Platform. That is especially interesting when an organization already uses Dataverse and other Power Platform components. You can use Dataverse for your tables and security, Power Automate for background processes and a Code App for the user interface, for example.

So you don't build one big application that contains everything, but use different components for what they are suited to.

Dataverse remains important

Code Apps don't mean that Dataverse suddenly becomes less relevant. In fact, I find the combination especially interesting.

Suppose we build an expense claim application. We could then have tables for claims, categories, employees and approvals. Dataverse takes care of the data model and the security of that data.

On the front end, a Code App can be responsible for the user experience. Think of a dashboard, adding a claim, an overview of your own claims, filters, totals and a clear status display. Power Automate could then be used for the approval process.

That way, you use each component for what it does best.

Where AI and Code Apps fit well together

In my view, this is one of the most interesting parts. AI models are strong in widely used programming languages and can produce usable code for React and TypeScript fairly quickly. That works well when creating a component, modifying an existing function or writing a first unit test, for example.

If you have to type everything yourself, a first version like that takes time. With AI, you can get to a working basis faster and then spend your time on things that need more attention.

Think of questions such as:

  • Is the architecture right?
  • Is the solution maintainable?
  • How is the data retrieved?
  • Is the security right?
  • How do we handle errors?
  • What happens with large numbers of records?
  • How is the application promoted to test and production?

That is ultimately also where the difference lies between simply generating code and truly AI-enabled development.

AI doesn't automatically know your environment

That is also something you have to take into account. An AI tool can write a piece of code just fine, but it doesn't automatically know all the agreements within a customer environment.

For example, AI doesn't automatically know which security roles exist, which naming conventions are used, which DLP policies are active, which solution structure has been agreed, which integrations already exist, or where certain business logic belongs according to the architecture.

That remains work for the developer.

A simple example is filtering. In React, you can perfectly well write:

React

For the interface that can be useful, but it doesn't mean security has been taken care of. If a user is not allowed to view certain records, that shouldn't be solved only with a filter in the front end. Security must also be properly set up at the data level.

You have to keep assessing this kind of thing, regardless of how much code AI writes for you.

When would I choose a Code App?

I wouldn't reach for Code Apps right away with every new request. For simple applications, Canvas Apps are often faster and simpler. A Code App becomes more interesting when, for example, there are many demands on the user experience.

Think of complex dashboards, extensive tables, a lot of filtering, specific responsive layouts, custom components, a lot of interaction on a single screen, or existing React components that can be reused.

For a simple registration with a few fields, I would still look at Canvas or Model-driven first. The technology has to fit the problem.

Canvas, Model-driven or Code App?

As far as I'm concerned, there is no winner among these three. They solve different problems.

For a strongly process- and data-driven application, a Model-driven App can be a logical choice. If you want to quickly build a flexible business application, a Canvas App is often suitable. If you need a lot of freedom on the front end and want to work the way you're used to from modern web development, a Code App comes into view sooner.

In practice, it will often be a combination. For example:

Code app

And perhaps there is also a Model-driven App for administration. They don't have to get in each other's way.

The role of the Power Platform developer is changing

What I find especially interesting about this development is that the work of a Power Platform developer is becoming broader. A few years ago, the focus may have been mainly on building screens, Power Fx and flows.

That remains important, but you increasingly also deal with TypeScript, APIs, ALM, Git, Azure and now AI tooling too. As a result, the role is shifting from someone who just builds an app to someone who determines how the complete solution should fit together.

Which technology do we use where? Which business logic do we put in Dataverse and which in the front end? Do we need Power Automate or is something else more suitable? When do we choose a Canvas App and when a Code App? And which parts can we responsibly let AI speed up?

Those are ultimately more interesting questions than just: how much code can AI write for us?

In conclusion

I find Power Apps Code Apps especially interesting because they narrow the gap between low-code and traditional development. Within the same Power Platform environment, you can build an application with technologies such as React and TypeScript, while still making use of components such as Dataverse and Power Automate.

AI makes that combination even more interesting. Not because AI will soon automatically deliver perfect applications, but because as a developer you can build faster and spend more time on architecture, security and the quality of the solution.

I therefore don't expect Code Apps to replace Canvas Apps or Model-driven Apps. We will probably end up using different forms side by side more often.

The question then is no longer:

Do we build this low-code or with code?

But rather:

Which combination best fits this application?

And that is exactly where AI-enabled application development gets interesting.

Are you convinced and do you want to get started with Power Platform and AI-enabled development yourself? Then e-mergo is the right place to be. We help you from idea and architecture to a working, scalable solution.

Stay up to date

Don't want to miss a blog? Sign up for our newsletter. That way you will receive all the latest content directly in your inbox every month. You can sign up via the button below.

Stay up to date

Written by

Mohamed Ellabbari

Mohamed Ellabbari

Low-Code consultant