Hit The Ground Running on Your Next Power Apps Project

Tom Ashworth
Capgemini Microsoft Blog
4 min readSep 1, 2021
Photo by Braden Collum

Starting a new project can go one of two ways: (1) Immediately begin developing features or (2) Spend some time setting up an ALM process to support the project. When it comes to enterprise projects, I hope we can all agree that the latter is preferable despite the additional upfront cost. This is where our latest tool comes in — Power Apps Project Generator.

Our Power Apps Project Generator is a command line tool built using Yeoman, a popular NPM package for scaffolding new projects and is used by Google, Microsoft and Facebook. Once a project has been generated, it has no ties to the generator although you might still want to keep it around to extend your solutions with plugins, web resource scripts and data.

Why did we build it?

Speed. Setting up ALM for a Power Apps project can be a laborious process depending on the complexity of the project (e.g. number of solutions, configuration data, server-side/client code). To improve this, we developed a generator which given a few parameters would create a complete Git repository with the option to also configure an Azure DevOps project.

Familiarisation. Our team is large (120+) and growing, with projects starting and ending constantly. With this in mind, another aim for this generator was to develop a centralised way of working for all our projects so that as resources moved around, they would be familiar with project structure and development process. Consistency is key.

Standardisation. Developing a system is not just about delivering working features but producing a high-quality solution. The generated repo comes pre-installed with our other tooling including Power App Specflow Bindings, Power App Package Deployer Template and CDS Data Migrator. Additionally, the Power Apps Solution Checker and code analysers/linters are pre-configured, reducing the effort and decisions of each project.

Collaboration. New components, changes to best practices and new tooling are just some of the reasons why this generator will never be ‘done’. As our projects learn and experiment with new standards, they can be contributed back to the generator providing a central repository for other projects to learn from. Although existing projects can’t automatically apply these updates, new projects will gain the benefits.

What does it generate?

We started with the repository generation, since this is the heart of an ALM process — how else would you track the changes of a project’s development? When constructing the ‘base’ repo, we were conscious that not every project needs the complete package with bell and whistles and instead components such as plugin code, web resources and data are optional add-ins that can be added at any time after the base repo has been generated.

The CI/CD pipelines are as important to the repository itself when it comes to rapid, agile delivery, which many of our projects practice. As a Microsoft Team, our preference is Azure DevOps which the generator can also optionally configure. This includes a PR validation, build, and release pipeline with supporting variable groups and service connections.

At this point, development can begin and we can start extracting solutions in VS Code, raise PRs in Azure DevOps and deploy to CI/Test automatically! To support developers working with VS Code, the project is also configured with some frequent development tasks powered by Nuke Build.

Development tasks available in VS Code.

When you come to extending your solutions with plugin code, web resources, or configuration data, these are all separate sub-generators which can be run at any point during the projects development and come with their own set of standards built in.

How to get started?

As mentioned earlier, the generator is built using Yeoman. Our generator is another NPM package, which both need to be install globally.

npm install --global yo @capgeminiuk/generator-powerapps-project

The generator can then be run in an empty directory.

yo @capgeminiuk/powerapps-project
Installing the NPM package

For full details, please read the documentation available on NPM here.

Working with Functional Consultants that aren’t comfortable with using VS Code or a terminal?

This generator has been designed to integrate with Development Hub seamlessly. Development Hub allows Functional Consultants and Developers to configure their own features which can be merged into a release solution without the need for any local solution exports, Git commits or pushes, all while source controlling changes.

Note: The project must still be generated via a terminal before non-developers can use it with Development Hub.

Thanks for reading — you can learn more about Development Hub here.

If you enjoyed this article, you may be interested in joining our team and working on projects like this day to day. Here are our current open roles.

--

--

Tom Ashworth
Capgemini Microsoft Blog

Tom Ashworth is a professional working within the IT industry as a Software Engineer (Apprentice). Outside of Programming he is loves exploring and photography.