Confusion while extracting core module from End user module.
Question

Hi

I am new in Outsystems. We have a module (say X) with interfaces, business logic, site properties all in one module. I want to extract Core module from this module X through refactoring.

 Now i have two questions:

1.) Should i shift all the server actions from X to new Core module ? If No, then what should i shift in Core module ?

2.) Where should the Site properties live? In Module X which is end user module OR the Core module that i will be creating ?  If i keep site properties in End user module then there is one problem, these site properties are being updated in Business logic and business logic will be shifted in core module.. So if site prop and business logic live in different modules then how will these site properties be updated?

3.) Where should the timers live? End user module OR the core module ? 




mvp_badge
MVP

Hi Shilpa,

1) Should i shift all the server actions from X to new Core module ? If No, then what should i shift in Core module ?

If you already have one or more _CS modules for your core entities, than ensure you have set them as readonly public, and move all logic to add/create/update or delete to these entities to the _CS module, while ensuring to set the IsPlublic property to true. In the original module set the references to _CS module actions.

If you have business logic that uses entities from multiple _CS modules move it to a _BL module that consumes the entities and core actions from the _CS modules.


2) Where should the Site properties live? In Module X which is end user module OR the Core module that i will be creating ?  If i keep site properties in End user module then there is one problem, these site properties are being updated in Business logic and business logic will be shifted in core module.. So if site prop and business logic live in different modules then how will these site properties be updated?

I would suggest to create a <application>_Config module, where you define all the site properties. Create public actions to get and set the site property values. Ensure that these actions are public to so they can be consumed by all core service and end user layer modules.


3) Where should the timers live? End user module OR the core module ? 

The IT consultant answer is "It depends"

  • If you have entities in end user module (can still be valid if they are only used to support end user UI related functionality) and you want to bootstrap the data you would need a timer in an End User module.
  • If it is timer on core entities then the _CS module seems to be more logical. 
  • If the timer processes multiple concept defined in multiple _CS modules than a _BL module can be the best place. 
  • If you use a cache data sync patterns, you might consinder to use a _Sync module for the timer logic.

Kind regards,

Daniel 

Hi, Thanks a ton for your response. So it means that my End user module will have only the interfaces, rest Server actions, Entities will reside in (CS or BL) module and End User module will reference CS/BL module to execute the server actions.. Am I right ? Or you have anything else to add? 


Hi Shilpa,

you can follow below guided path, that is having details explanation to refactoring application and few nice use cases or common error we usually do while designing the architecture.

Please follow the extracting-elements-without-impacting-consumers Guided path. A example if your end user module having reusable components there are easy 7 steps to perform refactoring, similarly based on your requirement you can perform more steps to do the proper refactoring.



Hope it will give you a idea to thing about your scenarios.

Dileep

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