458
Views
4
Comments
How to use Modules the right way?
Question

I am new to Outsystems and have some problems to gasp the idea of modules. I hope someone could help me or show that I understand it the right way. 

I will start with an easy example. I would like to build an applikation for a gar charging station. The user can park and charge the car and can enter the time of charging to block tha slot. 

The easiest way would be to build everything in one module, but that is a bad solution.

Therefore I would split is logically in multiple modules. The first one would be the UI for the user who park the car. I would also add some logic in it like: If he enter 1H charging time, the Display should showcase 1.5H to give some time to get pack to the car.
The second module would be the "server" part to store the data of charging and the user to send a bill to. At this point it is some kind of unclear if it is best practice to integrate the server admin panel in that module or switch the server admin panel in a new module.

The next module would be some dashboard for the Marketing team.

Now I see a common start page for all users. Everyone had to use a log in and a passwort reset side. This would be a logical start point to enter. Should I also start with that in an extra module an then link to each module? Is that possible and best practise or how should I start?

Normally I would only split the UI and the server side.

2023-01-19 15-05-03
Sirajeddine Bouasker

Hi,
The default Login page is enough, no need to duplicate it per module, but you need to implement your logic on the login action (for example inside the client action within the Login button, or you add a common home Screen and you add widgets to it, and in this one you implement your logic).
Regarding your app architecture, it all depends on your business requirements, so I can't help you there, but for better reuse and maintainability, you ought to split each feature in a separate module.

Kind regards,
Sirajeddine 

2022-12-09 04-50-17
Shubham Doshi

Hello,

You should divide the modules as per the architecture canvas as shown below:

You can find more information on the below documentation:

https://success.outsystems.com/Documentation/Best_Practices/Architecture/Designing_the_Architecture_of_Your_OutSystems_Applications/The_Architecture_Canvas

Also, if you want you create a login platform, you can do it within the same UI module, no need to create separate module for it. 

You can redirect the users depending on the roles assigned to them to the different accessible screens.


UserImage.jpg
Nils Witznick

Hello,

I have also considered
https://success.outsystems.com/Documentation/Best_Practices/Architecture/Designing_the_Architecture_of_Your_OutSystems_Applications/Translating_business_concepts_into_application_modules

and 

https://success.outsystems.com/Documentation/Best_Practices/Architecture/Designing_the_Architecture_of_Your_OutSystems_Applications/Validating_your_application_architecture

but I did not get the idea how to split the modules. Do I combine all UI related work in one module even if some parts like the Admin stuff has different Databases they can analyse?
I could use some kind of role to block user from seeing or interacting with such things, but isn`t that kind of chaotic? 

If I just think of the login page. If a user will log in he should only acess the timer, but if he log in wia web he should also access the user data. Where the marketing team should never be allowed to access any kind of data beside the dashboard. 

This is why I would split up that kind in different modules. First the login page and then forward the user to either the pure user interface, the web interface, the dashboard or the admin board. And each sub module has its own read or write rights. If I want to change the dashboard or the user interface I do not have to consider other roles. 

If I think of the log in. I could also add a 2FA or different types of security add ons without handling the roles or sides of the next pages. 

2023-01-19 15-05-03
Sirajeddine Bouasker

You can implement screen role based access control by adding roles and choosing which role can see the screen and which can't.

https://www.outsystems.com/evaluation-guide/role-based-access-control-for-outsystems-applications/

You have to make separate screens/Flow per role of users: 1-admin, 2-marketer, 3-other users (default registered role) and implement the relevant logic for each.

Kind regards,
Sirajeddine

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.