Tech Bites - Why you shouldn't be using CRUD actions everywhere

< Back to Blog

One common architecture issue when people start learning OutSystems is using entities' CRUD actions in multiple places.


Using our Order Management application as an example, we have a form to create, update and check the status of customers ' orders.


In this case, the Approve and Submit buttons in the save action do not invoke the CRUD action, as you can see.

We use a "server action" as a wrapper between the client-side and the database.

That action, implemented on a core module, makes all the validations needed before committing changes to the database.

Every one of those validations aborts the create or update action if the data is invalid.

For example: trying to approve or submit an amount lower than zero.


This way, when handling orders, we have a server action, which only accepts valid input data!


There are many things to grasp about software development architecture and, in particular, OutSystems architecture layers. Join us in one of our programs to learn more about it and other advanced topics.



Turn Up Academy

Apply to our Turn Up Boot Camp

AND BECOME THE NEXT OUTSYSTEMS CERTIFIED DEVELOPER
(
Instructor
)

Latest Articles

How to download Excel files in OutSystems

How to download Excel files in OutSystems

Learn how to download Excel files using the OutSystems platform in this simple tutorial!

DevZone
Mastering Email Integration with OutSystems: A Step-by-Step Guide

Mastering Email Integration with OutSystems

In OutSystems Reactive Web Applications, we can configure the Service Center and implement logic in the Service Studio to send emails to our peers or contacts. Follow this step-by-step guide to learn how to!

DevZone
How to use WebAssembly inside OutSystems - Part 2

How to use WebAssembly inside OutSystems - Part 2

WebAssembly (WASM) is a new technology that is getting a lot of attention. We continue the use of Go compiled to WASM to show how we can use WASM inside OutSystems.

DevZone