Home | The Company | Publications | Products | Links | Tips |
---|
Web
Last update: 22 June 2004
Client ServerDCOM Expressions (OO vs NAT) |
Peter Thorn wrote in October 1999:I know it is probably too early to find anyone out there who has actually used NaturalX but the documentation is available on SAGNet for Natural 3 under NT.I downloaded it the other day and suddenly felt very old when it started talking in terms like 'class' and 'method' and other dirty words. I have 'THE BOOK' (somewhere) so I am sure I will figure it out eventually, but as a basically Mainframe Natural person, it is aggravation I can do without. What I need is for someone (SAG?) to publish a 'Mainframe Dummy's Guide to DCOM' where it is explained in NATURAL terms rather than trendy OO garbage. For example when they talk about a 'Method' it could say something like 'this is essentially the same as calling a Natural Subprogram and passing it an action code telling it what you want it to do, only instead of passing a one digit field with (say) 'G' to get a record from the file you use a 'method' named 'Mary had a little lamb' and ....etc Wolfgang Winter, Software AG Germany, respondedAs the 'O' in DCOM stands for 'Object', we won't get around without 'OO garbage', but anyway, I'll try to summarize what NaturalX mean from a NATURAL point of view:Basically there is ONE new NATURAL Object type - CLASS. And a new data type, HANDLE OF OBJECT. As an example, take the following small CLASS definition: define class cEmployees
local using EMPLOYL1 id guid-Employees
interface iEmployees
end-property
property Name
method storeEmployee
parameter using EMPLOYA1 method getEmployee
parameter using EMPLOYA2 end So, what does this tell us ?
So all in all the 'CLASS' really simply defines another view to well know NATURAL constructs. Very straightforward - no need to 'feel very old'. In the above example you would first (now speaking NaturalX)
then, assuming you want to add a new employee, you can either
SEND METHOD storeEmployee is simply a CALLNAT 'EMPLOYN1' in 'OO garbage'. EMPLOYN1 noe would take property or parameter data, assign them to database variables and store the record. Same thing with getEmployees, EMPLOYN2 reads the database record and assigns database variables to property-variables which can be queried. In NATURALese: Assign database variables to GDA/PDA variables, the calling program does whatever it needs to do with those. Well, I guess I have messed up things even more (again), but I hope this explains it at least a little bit. If it doesn't please let me know and I'll give it another try. |