Architecture
What the Architecture domain tests
The Architecture domain tests how you structure an OutSystems application so it can be reused, deployed, and changed safely. Expect questions on module types, dependency direction, public elements, solution packaging, and the performance consequences of where logic lives.
Core rules
- End-user modules (Reactive Web, Traditional Web, Mobile) sit at the top of the dependency graph. They can reference library and service modules, but other modules cannot reference them.
- Put shared entities, business rules, and reusable server actions in a Library module. Use a Service module when the contract must be exposed as REST or SOAP.
- Only public elements are visible to consumers. Exposing an entity shares its schema and CRUD surface; exposing a server action gives you a controlled contract.
- Avoid circular dependencies. If A needs B and B needs A, extract the shared piece into a lower module.
- A Solution groups modules for deployment. LifeTime builds a deployment plan from dependencies, so lower-level modules deploy before consumers.
- Extension modules wrap C# code and external libraries; they are not the place for OutSystems business logic.
Worked example
Six apps need the same Customer entity and a 'GetActiveCustomers' query. Putting the entity in one app's module fails because end-user modules cannot be referenced. The correct design is a Library module that owns the Customer entity and exposes a public server action returning the active list. Each app references the library. If external systems also need the data, add a Service module that calls the library and exposes a REST endpoint. Reasoning: the library gives one schema and one deployment unit; the service module keeps the external contract separate from internal consumers.
Traps
Exposing entities directly to every consumer creates tight coupling and a wide CRUD surface. Putting shared logic in an end-user module blocks reuse. Ignoring deployment order causes failed publishes. Using an Extension for business rules loses TrueChange analysis and portability.