Can OutSystems support complex business logic?
Table of contents
- Programmatic constructs
- Data source manipulation
- Code reusability and modularity
- Asynchronous logic
- Business process orchestration
- Why is it better with OutSystems?
Enterprise-grade systems invariably have a business or domain logic layer that encodes - usually on the back-end - the real-world business rules that determine how data can be created, displayed, stored and changed.
Business logic can be simple, like writing into a single database table. It can also be very complex, such as writing into multiple tables simultaneously, while checking user permissions and calling multiple external systems for validation and additional data entry. For example, in a traditional or classic three-layer web application architecture, much of the business logic resides at the database level typically enclosed in stored procedures that can be difficult to maintain.
OutSystems is designed to address such complexity and enable high productivity in the processes of creation and maintenance of complex logic in systems. A number of features and constructs simplify complex business logic coding:
- Programmatic constructs: The fundamentals needed to create complex logic
- Extensibility: The ability to use custom code to bring in more functions and constructs
- Data source manipulation: Simplification of database connection and exposing web services with visual data aggregation or writing plain SQL
- Code reusability and modularity: Logic that can be reused anywhere
- Asynchronous logic: Actions that periodically synchronize customer information or enable scheduling
- Business process orchestration: Long running transactions that orchestrate human collaboration and back-end activities.
- Visual point-and-click, debugging and monitoring: Why writing complex logic is better with OutSystems
Along with the visual point-and-click model for coding, OutSystems has all the fundamental programmatic constructs to create complex logic: if statements, cycles, case switch, variables, arrays and complex data types. A complete expression language with formatting, conversion, mathematical, text manipulation functions and others provides the required flexibility to help compute any complex logic.
More programmatic functions and constructs can be easily be brought in using custom code; for example, hash tables and regular expressions.
Data source manipulation
Connecting to databases, or exposing and consuming SOAP web services or REST APIs is easy. With visual data aggregation, data retrieval is very simple. And, the ability to write plain SQL is always available .
Combined with programmatic constructs, data sets can be iterated in memory in several levels of nested loops, and can also be easily handled with typical list manipulation functions such as insert, append, and remove.
Code reusability and modularity
All logic written with OutSystems can be reused anywhere inside an application or exposed to any application in the software factory. This capability allows the creation of comprehensive modules and APIs, which leads to a sound architecture and true modularity.
For example, a classic programming pattern such as recursion is easily implemented using OutSystems.
There are situations where the complexity and time needed to complete certain processing routines is just too long to wait for after the click of a button. OutSystems allows you to easily run any logic asynchronously. Here is an example of an action that periodically synchronizes customer information:
Additionally, you can configure the schedule of operations and monitor them:
Business process orchestration
Long-running transactions, commonly referred to as business processes, are another type of complex logic. Orchestrating a collaborative workflow with human activities or a back-end orchestration triggered by specific events is easy with OutSystems.
From a single tool, development teams can automate the design, deployment, execution, feedback gathering, monitoring and optimization of both processes and applications, It can all be done without the burden of complex and costly integration—because when change happens, it happens both in the application and the process.
Learn more about OutSystems Business Processes here
Here's a order fulfillment process and its approval sub-process:
Why is it better with OutSystems?
Writing complex logic with OutSystems is actually better than using traditional coding languages because:
- The visual nature of the point-and-click model makes knowledge transfer extremely easy, compared to going through thousands of lines of code.
- Complex logic is...complex! A full-fledged visual debugger allows developers to dive into the visual code and understand how it is behaving, making troubleshooting a breeze.
- The monitoring capabilities enable teams to troubleshoot performance bottlenecks but they also are available for audits. It is possible to configure different levels of verbosity to trace complex scenarios and complex message exchanges.