[
Lists Home |
Date Index |
Thread Index
]
Quoting Elliotte Harold <elharo@metalab.unc.edu>:
> david.lyon@computergrid.net wrote:
>
>
> > Usually there's no source code, and these days the programmers
> > are in India and the call centre is in a difference province
> > entirely. And all you want to know is why your payment hasn't
> > been processed....
> >
> > So keeping the logic in the code isn't very attractive in 2005..
>
> You missed my point completely. The logic is in your code *now*. The
> only thing that knows that ? is a boolean or @ is a date is your code.
> This is a convention you have adopted, and which you have implemented in
> your code. You seem to believe that you have somehow added data types to
> XML, but you haven't. All that's in your document is text, which is
> assigned types by code. You are keeping your logic in your code.
Partially true. There is some logic in the code to read out an
element. And the logic is able to determine what validation to
do on the data based upon the type of data found.
Embedding of the data type is done. And it is used at runtime
to tell the code what type of data is coming instead of the
traditional method of insisting that the 'code' knows what
to do with every single element.
When reading, the read_number(.. api or whatever it is
can read from boolean types (giving a 1 or a 0) or from
a string type if there is a number in it.
Conversely, the read_string api can read anything and
render it as text, be it a number, text, boolean or date.
> And this business analyst magically knows that ? is a boolean and @ is a
> date? I tend to doubt that.
Correct. They tend to have no idea and are not interested. But
they are able to more easily see the data content because it
is less cluttered.
Regards
David
----------------------------------------------------------------
|