Clearing the Clutter: Tackling Unused Dependencies in OutSystems

Search for a command to run...

No comments yet. Be the first to comment.
How to Fix a GitHub Push Protection Error.

Balancing security and development speed in role-based access design

The XY problem is a communication issue that often arises in software development. It occurs when someone seeking help focuses on their attempted solution (Y) rather than the actual problem (X) they’re trying to solve. It often plays out like this: ...

Encryption is the foundation of secure communication and data storage. At its core, it scrambles information with a cryptographic key so that only authorized parties can read it. Decryption then reverses this process, restoring the original data. But...

How to Use JSON for Better Site Property Management in OutSystems

While migrating one of our UI components, I discovered a dependency on an outdated version within one of our modules. This realization highlighted an important aspect of software development: unused dependencies, or "dead code."
Dead code refers to sections that are no longer executed or used. These remnants can stem from outdated features, experimental code, or debugging utilities. Over time, they bloat software, reduce efficiency, complicate maintenance, and increase the size of OutSystems modules—ultimately prolonging 1-Click Publish durations.
Often, developers leave behind temporary or "just-in-case" code, believing it may be useful later. In reality, these assumptions create unnecessary complexities, violating the YAGNI principle ("You Aren’t Gonna Need It"):
Key takeaway:
Only include what’s needed now, not what might be needed in the future.
Avoid : Large, bloated dependencies.
Prefer : Smaller, specific modules with only the elements you actually use.
This aligns with the Interface Segregation Principle, where code depends only on relevant, smaller interfaces rather than massive, unwieldy packages.

OutSystems offers two key tools to address unused dependencies:
Detects unused aggregates, SQL queries, and module actions. However, it doesn’t detect referenced elements without usage, so manual checks may still be required.
Automatically identifies and removes unused dependencies from your module.
Open Service Studio and navigate to each application layer (Interface, Logic, Data, Process).

Right-click the module name.
Select Remove Unused Dependencies.
Repeat for all layers.

By following these practices, you can simplify your modules, improve performance, and ensure clean, maintainable code. Don’t let unused dependencies weigh your application down!