Set a module as Internal/Private relative to its application
537
Views
9
Comments
New
References

Hi!

The idea is:

Set a module as Internal/Private relative to its application so that its public elements can only be consumed by other modules in the same application.

When an element is set to public in a module it becomes available to be consumed by all other modules (with the exception of some rules that relate to the type of modules).
But sometimes the public elements of a module should only be consumed by other modules in the same application because that module is just a supporting/internal module; its public elements should not be consumed by other modules external to its application.
Being able to set a module as "Internal" or "Private" to its application to achieve the goal above would allow better control on the dependencies, improve on the architecture, and prevent incorrect consumption of public elements.

I give two examples to support this idea:

1) Integration Builder produces per integration two modules: An "IS" module and a "DRV".
To use the integration you should only consume actions from the "IS" module and not from the "DRV" module, even though the "DRV" exposes public actions.

This is even explicitly documented in Integration Builder.


2) The Forge component "Human Readable Change History" contains two modules: an extension AutoEntityDiff and a module DiffEntityDataToText.
Although of the extension AutoEntityDiff  exposes public actions they are only meant to be consumed by the module DiffEntityDataToText which in fact implements the intended functionality, but by mistake any developer can consume directly from the extension.

For the possibility of modules being moved from one application to another application, consumer modules would become with outdated dependencies and when republished they would be broken if they consumed public elements from an Internal/Private module that did not belong to its application.

--Tiago Bernardo

Hi Tiago, as always, your idea descriptions set the standard quality of a good idea description!

Thanks, Daniël!

In your projects/developments have you felt the need for this?

Currently the only way I see this being monitored/enforced is by using extra tooling, something like Discovery or Architecture Dashboard, where the module would be identified as Internal by:

  • Some convention in the name of the module (including for example "_Internal" or something similar);
  • Some convention of tag label in the description of the module, like for example "{{INTERNAL}}";
  • Some extension entity to the module entity that would have an attribute indicating if the module is Internal.

And then producing some reports of the violation by analyzing the consumer modules if they belong to the same application.

I liked your idea, so yes I agree with your idea

Hi @Rebecca, it is similar but not the same, that Idea is focussed on the individual elements in a module, the idea of Tiago is focussed on setting the scope at module level. But good to have a reference to the other idea.

We've needed more security around individual elements for a very long time.

Rebecca and Daniël,
I have read the other Idea and there the focus is on individual elements (entities, actions,structures, etc) so that individually they can have a new public state protected/friend, while my idea is focused on the scope of a module itself.
Although the first idea would give a more complete solution to the problem, I think that it will be more work to be implement by OutSystems, while my idea does not required any change at the individual elements and would just need some development at the module level.
And having an "intermediate" solution would be a benefit, although it is the not perfect, but that addresses the problem and could be more simple to implement, .
At least this my point of view.
Having said this, I don't mind that my idea is merged with the other one. Having everything centralized could beneficial to the discussion.

--Tiago Bernardo

Hi Tiago, as I said they are similar but not equal ideas, as such I don't think they should be merged, unless you prefer I do merge them.


2016-04-21 20-09-55
J.
 
MVP

To be fair, it is similar because we want scope-limitations.

It's a matter of how fine-grained you want it.

Bottomline is, we want it :D

(If modules can be done, the other idea is almost implemented as well)

on that note it is similar to https://www.outsystems.com/ideas/8378/limit-the-public-scope-of-a-module/