Interface oriented Object validation

By João Gonçalves on 10 Feb 2017

The new runtime offers a generic type Object that is able to reference any object on the platform, while this is powerful, there's still some unknowns when we want to integrate with third-party javascript code.

It would be neat to have the ability to define interface enforcement on Object parameter in a way that it would function theoretically like Java/C# interfaces. This information would be simply metadata and doesn't actually need to end up on the runtime object instance, it would be used solely for API validation within Service Studio.

Much like we currently have the ability to have Lists of specific types, the idea would be to have Objects that conforms to specific interfaces.

For example, a new panel under Logic would expose subgroup "API Interface" where the user can add new interface rules for that API, like it happens for Structures. 

Later, when creating a platform variable/ input parameter/ output parameter we would define for Object to which interface API it conforms to.

J.12 Feb 2017

Why do you want to go back to 3GL?

This only means more issues runtime and other stuff.

João Gonçalves13 Feb 2017

Interoperability with external javascript with development-time checks seems to me that it would result in actually less runtime errors. When passing data from the OutSystems context to external javascript context, and your only reference is a general purpose Object type, makes it more error prone.