Consuming API Layer Architecture

Hi, I am new to OutSystems and have a question about the 4 Layer Architecture. If I need to consume API from 2 external systems:

1. HR module (GET/POST/PUT) 

2. Sales Module (GET)

Assuming that I don't need any data sync to my Entity, should I create 2 modules as Core Module  (HR_CS, SALES_CS) + server logic, or should create a module as Integration Service Library? (HR_IS, SALES_IS). 


Thanks


Solution

Hi Henry,

Following good practices you should name the modules as  '_IS', since they are mudulos that will consume external services.

If you already using Outsystems 11, i also advise that these modules are of the service type. and the actions that expose the consumption of services to be service actions to avoid strong dependencies.

Regards,

James

Solution

Hi Henry,

Since both APIs are coming from external systems and assuming no business logic is added to the module in which the APIs are consumed, then yes I would say it belongs in the Integration/Library layer of the 4LC. Best practice is indeed to suffix the module names with _IS in those cases.
With regard to naming the modules, you should consider thinking in concepts. Meaning, it depends on what kind of data you are going to be consuming from both APIs and how you would ‘translate’ that data into concepts which you will integrate in your OutSystems applications.

I would recommend you to go through this article about Service-Oriented Architectures for OutSystems Applications in order to get a better understanding of different service levels and see examples of application architectures that use concepts for names of integration modules.

Regards,

Nordin


Nordin Ahdi wrote:

Hi Henry,

Since both APIs are coming from external systems and assuming those external systems contain no business logic, then yes I would say they belong in the Integration/Library layer of the 4LC. Best practice is indeed to suffix the module names with _IS in those cases.
With regard to naming the modules, you should consider thinking in concepts. Meaning, it depends on what kind of data you are going to be consuming from both APIs and how you would ‘translate’ that data into concepts which you will integrate in your OutSystems applications.

I would recommend you to go through this article about Service-Oriented Architectures for OutSystems Applications in order to get a better understanding of different service levels and see examples of application architectures that use concepts for names of integration modules.

Regards,

Nordin


Hi, thanks for the answer


But what if one of the external API contains business logic? For example, the external HR API might have a CreateLeaveRequest API which includes complex business process logic by their side. Does it still belong to the Integration/Library layer, or does it belong to Core Business Layer?


Thanks


Hi Henry,

I have edited the beginning of my above post because it did not make sense what I was saying, sorry about that :).

Of course the external system could contain business logic. What I meant to say is you should not add any business logic to a module that exists in the integration/library layer. So yes, even though the HR API contains business logic, since it exists in the external system you should still keep the module that consumes the API in integration/library layer in my opinion.

Regards,

Nordin

Hi James and Nordin, thank you for the answers, really appreciate it.