Ajax Refresh

I just ran through the HelloWorld tutorial from the Service Studio tutorials.

The essence of the project is to dynamically update an expression with the value of a text box.

It appears the by using the Ajax refresh widget the project does a round trip XMLHttpRequest back to the server to POST the data from the text box and then updates the expression with the result of the request.

I realize this is a simple tutorial but it has me wondering if, for bigger projects, when we simply want to do screen updates, the Ajax refresh should be used or we should jump down into the JavaScript layer to do our updates there.
Hello Tom

When developing your project applications, if you have the need to refresh a screen, totally or partially, you should always use the Agile Platform built-in features, and avoid coding in javascript for that purpose.

The reason is that the OutSystems development language was build to simply the maintenance of your applications, like the built-in True Change Engine, and coding in javascript will not give that advantage, decrease developer productivity.

If you're updating the entire screen, you can use a button to a screen action using the Submit method.

If you're updating just a part of the screen, then you can use an Ajax method action to refresh just that part of the screen.

More information about the different ways to interact with the screen at Interact in Web Flows. To know more about the internals of the different kinds of methods to submit data to the application, please refer to Behavior of the Button Widget.

Using these built-in features you shouldn't have the need to "jump down" into the Javascript layer, ever.

Hope this information is useful.


Miguel Simões João

Thanks for your response. 

Are there any plans to extend the Ajax refresh widget so that it does not do a round trip hit to the server if it is not needed (i.e. updating an expression with the value of a text box)?