How to architect for reuse in OutSystems

architect for reuse

If you’ve wondered what you can do with an enterprise-class low-code platform, then this series is for you. OutSystems creates five 29-minute demo’s on some of the most useful and functional apps and use cases for a low-code platform. This blogpost is about how to architect for reuse in OutSystems.

Everyone knows code reuse is the key to a well-architected portfolio of apps. This session shows how you can discover, reuse, and share UI, data, and logic in OutSystems.

Glenn Michiels, OutSystems developer at Providit, gives his view on the subject.

“Outsystems promotes a component-based architecture, meaning that you compose an app (mobile or web) of a number of independent components. One can compare it a bit with Lego blocks where the components, also called “modules” in OutSystems are the building blocks with which you built your application.”

This architecture has a number of important advantages. First of all, you only have to develop everything once. If you need a functionality, just reuse it. Second, in case of code changes, you only need to do it in one place since. Third, in a development team with multiple people, each can be responsible for a specific module, thus avoiding conflicts of more than one person working at the same time on the same code base.

But how can we, as developers, get the most of this architecture?

Fortunately, OutSystems has described best practices to follow. Below, I have listed some of those I find most important:

  1. Put the data tables of your application in a separate module. If you need to develop a web and a mobile application, both can, and should, use the same database module
  2. Make use of component libraries whenever possible. If somebody already developed a component you need, just reuse is. The best know component library is the “Forge”.
  3. Make use of web blocks. Web blocks are reusable visual building blocks. If customization is required, try to fit it in into the original component. Otherwise you’ll create as second code base.

Reuse the code

Once we have our modules built based on the above rules, we only need to select the ones we need and reuse the code. This is done by referencing the module and selecting the web blocks, actions, tables you want to use in your application.

Now we have created a solid, maintainable architecture for the application. We can now with confidence built the application specific code. If you put in place the right foundations from the start, you’ll benefit from it during the rest of the development.

The recording can be found here: https://www.outsystems.com/webinars/architect-reuse-demo-series/

Wanna know more about the Outsystems Platform? Check here!