Dear Michael,

FileMan version 22 was originally suppsed to include extensible data types, including typing of functions, which would have taken us halfway to real methods. There was discussion of sub- and super-types, but we were going to wait to decide whether to include it in 22 or wait for 23 depending on how quickly the extensible data types work proceeded. Michael Ogi demoed his code to us, and it was beautiful, even including multi-field datatypes like blood pressure.

Unfortunately, VA management at the time (1994? 5?) pulled the plug because we would be leaving FileMan within the next year or two, something none of the technical folks believed was possible. Time has proven the management of that time wrong, and the technical folks correct. With Rob Kolodner and other pro-VistA managers at the helm now, VA may support us in resurrecting this work; we could take Michael Ogi's work back off the shelf, update it for the current version of FileMan, and release it.

In the meantime, FileMan will let you do sub-typing and super-typing manually, by coding all the logic to support it in MUMPS and weaving it into FileMan through programming hooks. Also, mechanisms such as that Greg has described, along with certain package-specific features, can be leveraged to speed things up for you.

Yours truly,
Rick

Greg Woodhouse wrote:

Well, no, not exactly. Fileman doesn't have inheritance in the way a
language like Java does, but I think it does have subtypes. Think about
it this way: Many files have POINTERS for .01 fields. What does this
mean? Well, if there is a RADIOLOGY PATIENT file, the .01 field of
which points to the PATIENT file, then a RADIOLOGY PATIENT is a kind of
PATIENT, and it is relatively easy to retrieve attributes of that
patient stored in the PATIENT file. In fact, you could create computed
fields to do this if you really wanted to, but this is seldom done.
There is another strategy you sometimes see, and that is configuring
one file (using a technique known as DINUM) to use the same internal
entry numbers as another file. This saves a level of indirection
because you can always use the same index (at the record level) into
the global representation of each file if you wish to use direct global
reads, and you can use the same DA or IENS in Fileman calls).
Unfortunately, though, this comes at a cost: namely, increased
coupling. Though there is a small gain in programming convenience, your
code becomes more difficult to maintain, so I don't recommend doing
this.

Returning to the issue of subtypes, Fileman doesn't really support
"methods" in the way object oriented languages generally do. Instead,
you typically write functions that accept the IEN of a file entry as a
parameter. Actually, it was quite an eye opener to me when I realized
that I was consistently writing extrinsic functions taking an IEN as
the first parameter without cconsciously thinking about WHY I was doing
this. Of course, my file was a class, records were objects, and these
extrinisc functions were methods. I was doing object oriented
programming without even realizing it! Now, in object oriented
languages, method dispatch is typically handled internally: That is, a
table lookup occurs "behind the scenes" to determine where the method
was defined, and then execution of the method is delegated
appropriately. When programming Fileman applications, you basically end
up doing this delegation manually rather than relying (or, if you will,
being able to rely) on the language to handle the mechanics.

When diagramming file structures using UML, I generally represent both
pointer-valued .01 fields and DINUMed files using the open broad arrow
used to represent class/subclass rpresentation. Variable pointers
(which are generally rare) can be used to implement multiple
inheritance, but are more often used to support a kind of polymorphism.


--- Michael Zacharias <[EMAIL PROTECTED]> wrote:

i have been working through the fileman and kernel literature trying
to glean
as much as i can, but have been unable to determine if i can define
supertype
and sub-type file definitions in fileman.  for example, if i define a
case
supertype, i would like to define a tb subtype or food poisoning
subtype.  the
subtypes would inherit the supertypes data items...


thanks...


michael




===
Gregory Woodhouse  <[EMAIL PROTECTED]>



"Without the requirement of mathematical aesthetics a great many discoveries would 
not have been made."

-- Albert Einstein











-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Hardhats-members mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hardhats-members






-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Hardhats-members mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/hardhats-members

Reply via email to