I want to create a Core widget module to use those widget from any where, But I realize that I will have to fetch the data from Server action exposed from Core service, Is that invalid for architecture rule?
No, your approach of fetching data from a Core Service's server action in a Core Widget module is valid and adheres to the OutSystems Architecture Canvas rules.
The Core Widget module, as described in the Architecture Canvas and related best practices, is designed to hold reusable UI components (e.g., web blocks) specific to business concepts. It is expected that such components may need to fetch data from the Core Service layer, which provides business services, entities, and business rules. This hierarchical relationship ensures no upward dependencies or cyclical references, following key architecture rules:
As long as your Core Service modules encapsulate the business logic and expose public server actions for Core Widgets, your design is sound and compliant.
For further insights on best practices for Core Widget modules and their interaction with other sublayers, check related guidelines in Different OutSystems Applications Architectures and Validation Tools.
Hi @Huy Le ,
Building on the AI’s response: from an architectural standpoint, it’s completely fine for the CW module to consume the CS module, and in some cases, it’s even beneficial.
As for your question “How to use the Common UI module”, here are a couple of points the AI didn’t mention:
The CW module belongs to the Core Layer, so it should be created as a Blank module.
By convention, its name should end with the _CW suffix.
As for the naming conventions here you have a table with that: