News

Microsoft Extends Low-Code Push with Power Fx Programming Language

Microsoft unveiled a new open source programming language for its low-code development push centered around the Power Platform and its Power Apps component.

At this week's big Ignite show focusing on Microsoft-centric IT pros, the company introduced Power FX, a low-code programming language designed to work with products such as the Power Platform that provides components for business intelligence (Power BI), automation (Power Automate) and so on. That includes Power Apps for creating simple applications typically connecting to various data stores and using Excel-like expressions for business logic, targeting the web, iOS and Android devices.

Power FX is described as a general-purpose, strongly typed, declarative and functional programming language that helps users create canvas-based apps as opposed to model-based apps.

The project's GitHub site indicates the language -- based on Excel-like formulas for working with data in spreadsheets -- originated with the canvas-app functionality provided in Power Apps (which was called the "Power Apps expression language" internally). "We are in the process of extracting the language from that product so that we can use it in more Microsoft Power Platform products and make it available here for you to use," Microsoft said.

What Is Power Fx?
[Click on image for larger view.] What Is Power Fx? (source: Rory Neary).

An announcement post lists the three main reasons to be excited about Power Fx (verbatim):

  1. Power Fx is open source. The future of programming is open. Microsoft has embraced the pace of open innovation that has accelerated the adoption of languages like C# and Typescript. With Power Fx, we're now bringing that same open approach to the low code world. Microsoft will open-source Power Fx, making the language available for open contribution by the broader community on GitHub.
  2. Power Fx is based on Microsoft Excel. Using formulas that are already familiar to hundreds of millions of users, Power Fx allows a broad range of people to bring skills they already know to low code solutions. Power Fx becomes a common ground for business users and professional developers alike to express logic and solve problems.
  3. Power Fx is built for low code. Power Fx is already the foundation of the Microsoft Power Apps canvas. We'll soon extend its use across Power Platform to Microsoft Dataverse, Microsoft Power Automate, Microsoft Power Virtual Agents, and beyond, making it even easier for everyone to get started with low code tools.

Getting started with low-code tools is something a lot of enterprises have been doing lately. In recent years the low-code/no-code, rapid application development market has exploded in the face of increased demand for enterprise applications amid a dearth of experienced professional coding talent able to harness the greater power of more advanced tools like Visual Studio and VS Code.

Power Fx in Animated Action in VS Code
[Click on image for larger, animated GIF view.] Power Fx in Animated Action in VS Code (source: Microsoft).

Microsoft is seeking to meet that demand, and the company may be seeing a slow-growing universe of professional coders to buy its dev tools, so it's expanding its entire approach in order to attract a new market of "ordinary business users" with low-code offerings.

For example, the company in late January announced that a new programming language called LAMBDA for use with Excel was deemed to be Turing complete, passing the litmus test of a full-fledged programming language by marking the ability to imitate a Turing machine, or the ability to "implement any possible algorithm with it."

And in November, we reported on a Redmond move to turn Teams collaboration software into a low-code dev tool.

The expanding movement to "democratize" app development uses a variety of DIY techniques, including wizards, templates, drag-and-drop functionality and model-driven development. As mentioned, Power FX is for canvas apps.

Power Fx is expressed in a human-friendly text," Microsoft explained in an overview. "It is a low-code language that makers can work with directly in an Excel-like formula bar or Visual Studio Code text window. The 'low' is due to the concise and simple nature of the language, making common programming tasks easy for both makers and developers. It enables the full spectrum of development from 'no-code' for those who have never programmed before to 'pro code' for the seasoned professional, with no learning or rewriting cliffs in between, enabling diverse teams to collaborate and save time and expense."

Some design principles behind Power Fx include (verbatim):

  • Simple: Power Fx is designed to target maker audience who is not trained as developers. Wherever possible, we use the knowledge that this audience would already know or can pick up quickly. The number of concepts required to be successful is kept to a minimum. Being simple is also good for developers. For the developer audience, we aim to be a low-code language that cuts down the time required to build a solution.
  • Excel consistency: The Power Apps language borrows heavily from the Excel formula language. We seek to leverage as much Excel knowledge and experience from the many makers who also use Excel. Types, operators, and function semantics are as close to Excel as possible. If Excel does not have an answer, we next look to SQL. After Excel, SQL is the next most commonly used declarative language and can provide guidance on data operations and strong typing that Excel does not.
  • Declarative: The maker describes "what" they want their logic to do, not exactly "how" or "when" it is to be done. This allows the compiler to optimize by performing operations in parallel, deferring work until needed, pre-fetching and reusing cached data, etc. For example, in an Excel spreadsheet, the author defines the relationships between cells but Excel decides when and in what order formulas are evaluated. Similarly, formulas in an app can be thought of as "recalcing" as needed based on user actions, database changes, or timer events.
  • Functional:We favor pure functions without side effects. This results in logic, which is easier to understand and gives the compiler the most freedom to optimize. Unlike Excel, apps by their nature do mutate state. For example, apps have buttons that save changes to the record in a database. Some functions, therefore, do have side effects, although we limit this as much as is practical.
  • Composition: Where possible, functionality is added that composes well with existing functionality. Powerful functions can be decomposed into smaller parts that can be more easily used independently. For example, a Gallery control does not have separate Sort and Filter properties. Instead, the Sort and Filter functions are composed together into a single Items property. User interface for expressing Sort and Filter behavior is layered on top of the Items property with a two-way editor for this property.
  • Strongly typed: The types of all the values are known at compile time. This allows for the early detection of errors and rich suggestions while authoring. Polymorphic types are supported, but before being used, their type must be pinned to a static type and that type must be known at compile time. The IsType and AsType functions are provided for testing and casting types.
  • Type inference: Types are derived from their use without being declared. For example, setting a variable to a number results in that variable's type being established as a number. Conflicting type usage results in a compile-time error.

Going forward over the next couple years, Microsoft said it will extend Power Fx as a singular consistent language offering for the entire Power Platform, providing for a progression in which app makers advance to being intelligent bot builders to automation experts.

Developers wanting to dig in further have a wealth of resources to consult, including (some links above are repeated here for convenience):

To dig even deeper, Microsoft has these links for individual components:

Microsoft Ignite started today (Tuesday, March 2) and runs through Thursday, March 4.

About the Author

David Ramel is an editor and writer for Converge360.

comments powered by Disqus

Featured

Subscribe on YouTube