how to send an email from a mobile app without creating an architecture violation

how to send an email from a mobile app without creating an architecture violation

  

Hi all,

I have to send an email from my mobile app. The solution for this is to create a mobile app and a web app for sending email. When I want to send an email from my mobile app I call a server action from the email espace to send the email. Since the email component is on the end user level this creates a side reference on the end user level and this is in violation of the OutSystems architecture guidelines.

How would you cirmumvent this violation but still keep the solution simple? My first thought is to create a microservice that exposes the SendEmail server action. What do you think?

Best regards,

Paul

HI Paul, this same question has already been stated and an answer has been provided. Check it out: https://www.outsystems.com/forums/discussion/22185/how-to-send-emails-from-mobile-application/

For the record, I agree with the solution stated, which is, as you mention, create a web application, create a core module in it (it does not need to be an end-user module), and wrap de send email action into a public action. You don't need to expose this action through a REST or SOAP service. You can call it directly.


Greetings,

pedro 

Hi Paul, you also have a Forge component exemplifying this: https://www.outsystems.com/forge/component/3326/how-to-send-emails-from-a-mobile-app/

Hi Pedro,

Thanks for your reply, my question is slightly different. We already have the solution in place. It's just to avoid a side reference on the ui-layer level. The Mobile App eSpace is in the UI layer so the question is: Do we classify the espace SendEmail containing the Send email server action a UI Layer or  a Core Service Layer?

I assumed it to be UI layer, hence my question. If we can classify it as a core services layer there is no side reference on UI level and the architecture is ok.

Best regards,

Paul

Solution

Hi Paul, it depends on what else you have in the SendEmail espace. If it is just this action I would classify it,, according to the 4 layer canvas, as a library espace. You don't have any business specific logic in it. It is just the ability to send emails and this is generic functionality.

What do you think?


Greetings, pedro


Solution

Hi Pedro,

The espace contains an email component in the email ui flow and a public server action SendEmail. I would clasify the email component the same as a web block and thus clasify the eSpace as a Core Services layer and now the references fit to the 4 layer canvas rules.

Greetings, Paul

Hi Paul, even it has a web block, and assuming there is no business specific logic within it, I would still classify it as a library espace and not a core espace. If the answer to the question "Can this espace be used by any other application?" is yes, then it is a library espace. Either way, it is definitely not a UI espace :)

Hi Pedro,

I agree. It is not a UI espace :-)