252
Views
6
Comments
How to move things to another module without creating sideways dependencies

Outsystems shows dependencies (if you look), most of mine are just normal Outsystems UI which I could have specified directly in each module if I had known, but some have been created as vicarious sideways dependencies. 

That is, they are really dependent on the normal UI, but because they were copied from another module they are using that module's use of the UI rather than using the UI directly.)

For example I have added items to a menu in one module and then copied that menu block to another thereby creating a sideways dependency.

It occurred to me, a bit late, that the screen layout, headers, footers and static pages could have been in a single module that all the others could use. But I didn't set-it-up like that.

Is there a simple way to extract those pages into a new module (free of dependencies on where they came from)? 

To solve this does it mean going through manage dependencies  note where they originate and then add those dependencies directly in the module that is currently using it vicariously through the other module?




UserImage.jpg
Kay Lun

Hi Adams,

First thing to know is that, you need to know what's your module is consuming, cuz only the UI copy from the other module shouldn't make it a sideway dependent, I suspect there's some UI blocks that you copied are using structure from the other module, or might be other client action. 

Once you know what's exactly your module is consuming, try to copy those actions / structure or even blocks as a service module inside the same application of your End User module.

Then uncheck the dependency from the original provider module and check the new service module you have created.

This might solve your problem.

Hope this help.


2022-11-02 07-18-33
Nicholas Campbell

You may need a more complex solution, but sometimes when you copy things between modules it creates a link/dependency between them even though that link is not needed or even used... so try and delete the dependency and see if it gives you errors or not - if no errors then there was no real dependency.

2023-08-28 09-08-29
Venkatesh Sundarajan

Hi Greg, 

Find out the list of elements your module is consumed, then move those common elements to the common service module. 

Now you will need to remove the dependency from another UI module which gave sideways dependency, then replace all your errored ones with the elements from your common module.

If there are no errors then as mentioned by Nicholas there is no real dependency.

This is the way we can rectify your issue. 


2023-01-26 16-03-24
Ana Agostinho

Hello Greg Adams,

When I was studying for the Architecture exam, I found the guide path (Architecture Guide Path) very interesting and with a huge amount of examples regarding the rules and how to do this without impacting consumers. 

Due to that, and as a "plus", I would recommend you to give a closer look at the following links:

     By the end of this course, you will be able to:

  • Validate an application’s architecture using the 3 validation rules.
  • Use the Discovery tool to view and analyze an application's architecture.
  • Refactor application architectures to improve flexibility and maintenance.
  • Prioritize the changes that should be made during refactoring.
  • Extract elements from a module without impacting consumers.

Best regards and happy coding, 
Ana

UserImage.jpg
Greg Adams

Thanks Ana,

That is one of the training courses that was on my to do list, but which I assumed was about converting between web & mobile so one for the future, which is now more relevant.

There are so many things that would have been useful to have known before building anything.


UserImage.jpg
Greg Adams

In some drag and drop website building systems a template is a dependency. (If you create a new page of the website using a template, any later change to the template changes all the web pages that used it.)

In Outsystems a screen built from a template is just a starting point, an independent copy of an old design. If the template is later changed it has no effect on the new screen.

A block in Outsystems is like a template in those other systems. Copy a block and you don't really have a copy, you have a dependency. Later changes to the original block change your screen.

In a spreadsheet you can copy a cell and paste it. That isn't really a copy, it is a dependency. Any later change to the original changes the copy. But you can also Paste As.. and choose 'Value' in which case you have copied the value at that moment. Any later change to the original makes no change to the new cell.

I wonder why when copying a block or other items there is no option to paste it as a dependency or choose to make a one time copy that is then independent. When copying and pasting there could even be a warning "Creating dependency"

I think that would reduce the number of times we get unexpected dependencies.   

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.