Quantcast
Channel: OutSystems Community
Viewing all articles
Browse latest Browse all 1476385

[Ideas] Improving readability of Events and Event Handlers

$
0
0

In this screenshot you can see a block that has an event handler

The block throws an Event called Event_NavToPerson that has an input called PersonId

The screen the block is in also has an input called PersonId

The event handler also has an input called HandlerArg_PersonId


My question is what PersonId is being passed through HandlerArg_PersonId?

Is it the one on the screen or the one on the event?

The answer is the one on the Event, but thats because since they have the same name, the one on the screen is not shown for some reason.

If I change one of the PersonId's both show up.

Notice that I've added the prefix "EventHandler_" to the Handler actions and normally I add "EventArg_" to event inputs to minimize the risk of selecting the wrong one.


A Visual Distinction can be made this way.


So my Idea is this:

1- Once an Action is selected to be an Event Handler, the Action's icon changes or a prefix is forced

2- And most important, Event inputs should also have a visual difference, for example Event_NavToPerson.PersonId or a forced prefix


Junior Devs have a hard time understanding the patterns for using Events for this reason and even experienced Devs can make mistakes if they forget to pay attention.


Hope the explanation is understandable! 



Viewing all articles
Browse latest Browse all 1476385

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>