File:  [NeXTSTEP 3.3 examples] / Examples / EnterpriseObjects / DistributedEO / README.rtf
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:48:43 2018 UTC (8 years, 1 month ago) by root
Branches: NeXT, MAIN
CVS tags: NeXTSTEP33, HEAD
Sample Programs from NeXSTEP 3.3

{\rtf0\ansi{\fonttbl\f2\fswiss Helvetica;\f1\fmodern Ohlfs;\f3\fmodern Courier;}
\paperw11700
\paperh8660
\margl120
\margr120
{\colortbl;\red0\green0\blue0;}
\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f2\b\i0\ulnone\fs36\fc0\cf0 DistributedEO\

\b0\fs24\fc1\cf1 by Eric Noyau, NeXT Engineering
\fc0\cf0 \
\

\b\fs28 Overview\

\f1\b0\fs20 \

\f2\fs24 An example of how to use Foundation objects and Enterprise Objects with 3.x style Distributed Objects. The example uses the PEOPLE database that you can generate yourself by running the attached script 
\i installPEOPLE.sqlsybase
\i0 .\
Note that the EMPLOYEE Table has a new attribute named LOCK to prevent concurrent updates of the same record in the database.\

\fc1\cf1 \

\b\fs28 Program Organization\

\b0\fs24 \

\b Major Classes in the Application
\b0 \
 
\pard\tx2160\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fi-2140\li2140\fc1\cf1 \

\pard\tx2880\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fi-2880\li2880\fc1\cf1 AppManager	An object responsible for initializing all objects used in the program. It serves as a communication channel with EOF by becoming the delegate of EODatabaseChannel and EOAdaptorContex.  \
\
DEONotificationCenter	Works like an NSNotificationCenter. There is one DEONotificationCenter per entity. Encodes the enterprise objects that belongs to that entity over the wire. In this example, there is only one DEONotificationCenter that corresponds to the EMPLOYEE entity.\
\
DEOServerMonitor	Responsible for watching the communication between the server and all DEONotificationCenters in the client. If the connection between client and server becomes invalid, it broadcasts a NSNotification to inform the death of the server.\
\
DEOServer	Registers or unregisters clients. Dispatches messages to clients. \
\
\

\b\fs28  \

\pard\tx1340\tx2680\tx4020\tx5360\tx6720\tx8060\tx9400\tx10740\tx12080\tx13440\fs24\fc1\cf1 \

\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fs28\fc1\cf1 NOTES\
\

\b0\fs24 This program will not allow you to update the primary key. Update operations can only be performed on non-primary key fields of the records.\
\
This program can be extended with DELETE and INSERT operations, such as enhancing the AppManager to track added and deleted objects:\
\

\pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\f3\fc0\cf0 - (void)databaseChannel:channel didDeleteObject:anEO;\
- (void)databaseChannel:channel didInsertObject:anEO;\

\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f2\fc1\cf1 \

\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\b\fs28\fc1\cf1 WARNING\

\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\b0\fs24\fc1\cf1 \

\pard\tx520\tx1060\tx1600\tx2120\tx2660\tx3200\tx3720\tx4260\tx4800\tx5320\fc0\cf0 Due to race conditions, if you launch the application on two machines at the same time, you will end up with two servers running. And the notifications are not propagated correctly. To avoid this problem, you should: \
1- put the server on a known machine and remove all the server auto-lauching code from the client.\
2- remove the "*" in connectToName:onHost: and replace it by the name of the server host\

\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\fc1\cf1 \

\b\fs28  
\pard\tx1340\tx2680\tx4020\tx5360\tx6720\tx8060\tx9400\tx10740\tx12080\tx13440\b0\fs24\fc1\cf1 \

\b Valid for EOF Release Version 1.1 only
\b0 \
\
Last Edited:  Mai Nguyen, 02/17/95\
\

}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.