Wanted to gather thoughts about strong data typing in the “integration tool” context – advisable or not?
Programming principles state that strong data typing in the language can help avoid runtime errors by flagging data type mismatches at compile time.
Different languages have differing data type enforcement. And there are a couple of compelling schools of thought around strong vs weak typing.
Integration Server, and the FLOW services defined and used within, use weak typing for the most part. Everything is a string. When arithmetic is needed, conversions are done behind the scenes. For example, all the services in pub.math use string parameters, not integers, longs, etc.
For integration components, where the primary function is to get a payload from point A to point B (or points B, C and D) strong typing usually is not useful. Indeed, more often than not, it gets in the way. Because the “in the middle” components don’t really need to validate the data, they just need to move it along.
Of course there are areas in IS where strong typing has been introduced. The JSON services. The so-called REST Application Descriptors (RAD). These and other components automatically convert string representations (a number in JSON is a string, not a binary number) to their equivalent Java types (integer, float, etc.)
IMO, that’s a mistake for middleware. There are other ways to enforce data constraints when/if needed. Indeed, the support for XML shows one way – the data is in string variables but can be checked against XSD constraints.
Soliciting input from the community – what are your thoughts on strong data typing in IS? Should it do more by default? Or do weak typing with support for validation/conversion as desired by a developer?