In an environment of accelerating change and rising customer expectations, getting your latest, greatest applications out the door as quickly as possible is vital for staying competitive. But speed often comes at the cost of technical debt — that is, the time and resources spent having to rework a solution later due to actions taken (or not taken) today.
In the next few blog posts, we’re going to look at ways in which the OutSystems modern development platform can both reduce technical debt and make it easier to “pay back” your debt at a later time. In this post, we’ll focus on two methods for increasing development speed while preventing the errors (and technical debt) that speed can sometimes produce: Visual Merge and Debugging.
Visual Merge: When Two Heads Are Better Than One
With OutSystems, developers create modular application architectures that isolate the areas in which they work. These "multi-module solutions" eliminate many developer or development lifecycle conflicts. Multiple developers can work in separate modules with the confidence that their work will not be affecting others.
However, it is often the case that developers must work on the same module simultaneously — in which case you need to incorporate other people's changes to the module before publishing. If there are no conflicting changes, the OutSystems Service Studio can automatically integrate the differences. If Service Studio detects conflicts, however, you’ll have to resolve these manually before you can publish the module.
How It Works
Let’s say you and another developer — we’ll call her Developer 2 — are working on a module at the same time. The last version saved on the server is V.4. Developer 2 makes her changes and publishes them to the server, creating V.5. When you publish your changes, OutSystems tries to merge your new code with the changes that Developer 2 published in the meantime. After clicking the 1-Click Publish button, Service Studio will offer you three choices:
- 1. Merge and publish: Service Studio will try to integrate the differences. If the changes are in different parts of the module, it will publish the merged version successfully. If, however, you both made changes to the same element (let’s say you set a green background on the home screen and Developer 2 set it to red), you’ll have to compare the versions and resolve the conflicts.
- 2. Compare: This will open the “Compare and Merge” screen, which shows both versions side-by-side, indicating which elements are in conflict. You can drill down all the way to the code level, if necessary, to see how they differ. You can then select which elements from which version you want to publish.
- 3. Publish my version: Finally, you have the option to simply override your colleague’s changes with your own.
You don't actually have to wait for a conflict to happen to compare the versions. In Service Studio, you can compare changes of your local module with a previously published version of the module on the server.
Debugger: Stopping Broken Code in Its Tracks
While you’re working in Service Studio, you can check at any time to see if your app is working as expected by running it and seeing the results (such as data values) separately. The OutSystems debugging tool lets you pause the execution at breakpoints (specific points in a module you choose), and then run the logic step-by-step. If you’re working with familiar test data, this lets you find any issues in your logic design — for example, when a result is different from what you expected.
How It Works
The Debugger tab shows app information like variable and runtime values, as well as contextual information such as current thread, event name, UI flow, screen, and action, when applicable.
Breakpoints in Service Studio mark an element where you want the execution of a thread to be suspended for debugging. You can also choose to have the execution suspended on exceptions with or without breakpoints. When an exception occurs, the execution stops at the element that raised the exception.
Watches allow you to examine module elements in Service Studio while debugging your module. You can use watches to inspect Parameter values, Variables, and Screen widgets.
Reduce Your Technical Debt From Day One
As helpful as Visual Merge and Debugging are for you developers, they are just two of several tools that OutSystems offers to speed up the development process, resolve problems, and reduce or address technical debt. Stay tuned for more deep dives into the advanced toolset that helps you build applications fast, build them right, and build them for the future so you can innovate quickly and keep ahead of competitors.
To learn more about avoiding technical debt, visit StopTechDebt.com.