Why we can create a lot of modules when making a new application?

Why we can create a lot of modules when making a new application?

  

can we just use 1 module for the application? and whats the difference between home and not set as a home for the module?

Hey Calvin,

You can create multiple modules, so you can seperate logic, screen and data.

This way you can have 1 module which contains your data model and some logic (though you might even choose to seperate these also). And 1 module for your screens, this way of building is also featured in the lessons.

Besides that it is a general principle in programming.

The up side of this is that you can easily reference your logic and data in other modules, without having to expose your screen module (so that your screen module might consume data or logic from other modules), this is all to prevent cyclic references.

A module set to home will be the default module for this application, in ServiceCenter, when you open your application, there is a button that says, open in browser. This button will open the module that you selected as home.


Cheers,


Joey.

Joey Moree wrote:

Hey Calvin,

You can create multiple modules, so you can seperate logic, screen and data.

This way you can have 1 module which contains your data model and some logic (though you might even choose to seperate these also). And 1 module for your screens, this way of building is also featured in the lessons.

Besides that it is a general principle in programming.

The up side of this is that you can easily reference your logic and data in other modules, without having to expose your screen module (so that your screen module might consume data or logic from other modules), this is all to prevent cyclic references.

A module set to home will be the default module for this application, in ServiceCenter, when you open your application, there is a button that says, open in browser. This button will open the module that you selected as home.


Cheers,


Joey.

so, if I'm comparing like Java, the modules is like classes in java?


Hi Calvin,

Application modules should separate concerns as defined by OutSystems four layer canvas.

For examples and more insights you can take a look into this document:

https://success.outsystems.com/Support/Enterprise_Customers/Maintenance_and_Operations/Designing_the_architecture_of_your_OutSystems_applications/02_Translating_business_concepts_into_application_modules

Regards,


Shashi kant Shukla wrote:

Hi Calvin, 

Please go through the below 4 layer canvas for more detail 

https://success.outsystems.com/Support/Enterprise_Customers/Maintenance_and_Operations/Designing_the_architecture_of_your_OutSystems_applications/01_The_4_Layer_Canvas


Regards

-SK-

whats the difference if I make the 4 layers to 1 module? no difference right? I can make a lot web screen in 1 module


Calvin Adi wrote:

Joey Moree wrote:

Hey Calvin,

You can create multiple modules, so you can seperate logic, screen and data.

This way you can have 1 module which contains your data model and some logic (though you might even choose to seperate these also). And 1 module for your screens, this way of building is also featured in the lessons.

Besides that it is a general principle in programming.

The up side of this is that you can easily reference your logic and data in other modules, without having to expose your screen module (so that your screen module might consume data or logic from other modules), this is all to prevent cyclic references.

A module set to home will be the default module for this application, in ServiceCenter, when you open your application, there is a button that says, open in browser. This button will open the module that you selected as home.


Cheers,


Joey.

so, if I'm comparing like Java, the modules is like classes in java?



Yeah pretty much and the application would be the namespace.
But creating a module for every class might be a bit overkill. Outsystems is a low code platform after all.

Calvin Adi wrote:

whats the difference if I make the 4 layers to 1 module? no difference right? I can make a lot web screen in 1 module

Hi Calvin,

Modularity is the reason needed for large applications architectures. 

A very small app could be inside a single eSpace ofcourse, but eventually with growth you'll need code organization.

Regards,

Hi Calvin


In fact there isn't one unique answer to your question. That will depend deeply of the application complexity.


But I suggest  you learning session about architecture:


for example: hhttps://www.outsystems.com/learn/paths/8/architecting-sustainable-applications/


Best Regards