Is there a way to use internal api's to avoid dependencies?

Since our start with Outsystems (1,5 years ago) we developed around 15 apps.
The underlying core modules are re-used in dependencies over those apps.

Everything is working fine, especially re-using data layers and server actions.

But there is a problem that becomes bigger. That is the time it cost to refresh dependencies and migrating to test and production environment. It is caused by the dependencies and re-using of entities. When we make minor changes, it hurts to see how much time it costs before the migration process is completed.

I was visited the NextStep 2019 in Amsterdam. There I heard from "internal OutSystems API's" to communicate with modules without using dependencies. But I can't find back clear information about this functionality. Also I couldn't find the answer by myself in this doc: https://success.outsystems.com/Documentation/11/Reference/OutSystems_APIs

I'm curious if there is a good solution for using internal apps or other methods to prevent dependencies. Please note. Most of our core entities are used over all the apps. So, the underlying problem are the bigger core entities.

Thank you for your help.

Hi DDK,

If I remember correctly they where talking about, among others, the Service Actions. These are loosely coupled dependencies and as long you don't change the APIs contract (input and output parameters) you don't need to update all your references before publishing. This come with a cost of some performance loss, mainly in latency between calls.

But if you need to update your core modules a lot and you therefor need to republish a lot of applications then you can ask yourself if your architecture is good enough. Perhaps you need to split some modules and/or applications so that these modifications don't lead to a large deployment. There is a good architecture course in the Learn section, perhaps this can help you solve your issues.

Greetings,

Vincent

Thank you for your Post Vincent.
As for the service actions, we are looking at the opportunities of those and we using already some indeed. 


Vincent Koning wrote:

But if you need to update your core modules a lot and you therefore need to republish a lot of applications then you can ask yourself if your architecture is good enough. Perhaps you need to split some modules and/or applications so that these modifications don't lead to a large deployment. There is a good architecture course in the Learn section, perhaps this can help you solve your issues.

We are working mostly with Reactive web apps. In those apps, we use aggregates directly in the application if we want to use it for one-time unique data fetches to avoid dependencies.
But at the same time, we use server actions from other logic modules in the same app. In our architecture setup, we implemented the Outsystems principles as you suggest. And of course, it could always better.

Are there any other tips and tricks that could handle dependencies better?

Hi DDK,

Yes, I can understand how minor changes can lead to ha huge task of refresh depedencies in all the consumer modules. But there are ways to reduce that manual efforts, specially for minor and non breaking changes. Which just need depedency updates in the condumers and no mendatory code change.

For example you can go to the modules details page (which you have updated) and use publish al consumers button to update depedencies and publish all direct/ indirect consumers in one go.


Another way of doing this is using solution package. You can create a solution package and add all your module in the package. When you want to update depedencies in all your consumer modules just publish current version oprion available under versions tab of solution details screen.

But you have to keep in mind that if you have any changes which may create error in consumer module like adding new mendatory input parameter in block/ action then manual efforts are needed.

Nikhil Gaur wrote:

Hi DDK,

Yes, I can understand how minor changes can lead to ha huge task of refresh depedencies in all the consumer modules. But there are ways to reduce that manual efforts, specially for minor and non breaking changes. Which just need depedency updates in the condumers and no mendatory code change.

For example you can go to the modules details page (which you have updated) and use publish al consumers button to update depedencies and publish all direct/ indirect consumers in one go.


Another way of doing this is using solution package. You can create a solution package and add all your module in the package. When you want to update depedencies in all your consumer modules just publish current version oprion available under versions tab of solution details screen.

But you have to keep in mind that if you have any changes which may create error in consumer module like adding new mendatory input parameter in block/ action then manual efforts are needed.

Thanks for your help. It decreases the pain of publishing a bit with passing your tricks. 


Hi DDK,

Glad, I could help!

Please consider to mark the answer as solution if it helped you to solve your problem.

Hi DDK, 

The internal API you are speaking about is basically a REST API that you create to expose your functionality. Setting it to Internal Access Only only ensures that your internal network can call this rest service and not everyone else.

https://success.outsystems.com/Documentation/11/Managing_the_Applications_Lifecycle/Secure_the_Applications/Configure_an_Internal_Network


By using that method, it will cut off dependencies to that module, and its use case is to prevent a looping dependency (module A depends on module B which depends on module A), though it is not the best option to implement. 

If you do not have scenarios of loops, it would be easier to go with Service Actions as mentioned by Vincent Koning


Would recommend you go through the below guide to learn more :)

https://www.outsystems.com/learn/lesson/1229/refactoring-an-application