From: <sr...@us...> - 2006-07-06 06:00:34
|
Revision: 685 Author: srmitch Date: 2006-07-05 23:00:08 -0700 (Wed, 05 Jul 2006) ViewCVS: http://svn.sourceforge.net/instantobjects?rev=685&view=rev Log Message: ----------- - Added a 'Performance Hint' note to the 'External Storage of Attributes" topic. The note relates to indices for external attribute linking tables. - Added a compressed CHM help file option. - Further clean-up of typos and spelling mistakes, etc. Modified Paths: -------------- trunk/Help/IOHelp.cnt trunk/Help/IOHelp.hlp trunk/Help/IOHelp.hsc trunk/Help/IOHelp.rtf Added Paths: ----------- trunk/Help/IOHelp.chm Added: trunk/Help/IOHelp.chm =================================================================== (Binary files differ) Property changes on: trunk/Help/IOHelp.chm ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: trunk/Help/IOHelp.cnt =================================================================== --- trunk/Help/IOHelp.cnt 2006-06-07 15:39:31 UTC (rev 684) +++ trunk/Help/IOHelp.cnt 2006-07-06 06:00:08 UTC (rev 685) @@ -100,7 +100,7 @@ 2 Functions 3 InstantCharSetToStr=327SI7S>MAIN 3 InstantCheckConnection=327SI7X>MAIN -3 InstantCheckConnector=327SI7X>MAIN +3 InstantCheckConnector=327SI8Y>MAIN 3 InstantClassNameToName=327SI8R>MAIN 3 InstantCompareObjects=327SI8U>MAIN 3 InstantCompareText=327SI8X>MAIN Modified: trunk/Help/IOHelp.hlp =================================================================== (Binary files differ) Modified: trunk/Help/IOHelp.hsc =================================================================== --- trunk/Help/IOHelp.hsc 2006-06-07 15:39:31 UTC (rev 684) +++ trunk/Help/IOHelp.hsc 2006-07-06 06:00:08 UTC (rev 685) @@ -181,11 +181,11 @@ \par \pard\sb25\sa25\fs18 This user guide contains \f1 practical\f0 guidelines for building InstantObjects\lang1033\f1 \lang1040\f0 based applications. The intention is to give an overview o\f1 f\f0 the classes, components and tools that make up the InstantObjects framework. Although the guide is very detailed, it has not been the intention to cover all aspects of the framework. If more information is needed, \lang1033\f1 please\lang1040\f0 refer to the Symbol Reference. \par Th\lang1033\f1 is\lang1040\f0 guide \lang1033\f1 contains\lang1040\f0 three parts \lang1033\f1 that\lang1040\f0 constitute almost any InstantObjects based development process. \par \f2\fs10 -\par \pard{\pntext\f3\'B7\tab}{\*\pn\pnlvlblt\pnf3\pnindent0{\pntxtb\'B7}}\keep\fi-200\li295\sb25\sa25\tx280\lang1033\f1\fs18 \lang1040\strike\f0 Creating the Business Model\strike0\{linkID=70>main\} -\par \lang1033\f1{\pntext\f3\'B7\tab} \lang1040\strike\f0 Creating the User Interface\strike0\{linkID=280>main\} -\par \lang1033\f1{\pntext\f3\'B7\tab} \lang1040\strike\f0 Programming with Persistent Objects\strike0\{linkID=340>main\} +\par \pard{\pntext\f3\'B7\tab}{\*\pn\pnlvlblt\pnf3\pnindent0{\pntxtb\'B7}}\keep\fi-200\li295\sb25\sa25\tx280\lang1033\f1\fs18 \cf2\lang1040\strike\f0 Creating the Business Model\cf3\strike0\{linkID=70>main\}\cf1 +\par \lang1033\f1{\pntext\f3\'B7\tab} \cf2\lang1040\strike\f0 Creating the User Interface\cf3\strike0\{linkID=280>main\}\cf1 +\par \lang1033\f1{\pntext\f3\'B7\tab} \cf2\lang1040\strike\f0 Programming with Persistent Objects\cf3\strike0\{linkID=340>main\}\cf1 \par \pard\sb25\sa25\f2\fs10 -\par \pard\keep\li95\sb25\sa25\lang1033\f1\fs18 There is also a section on \lang1040\strike Learning the Primer Demo\cf3\strike0\{linkID=460>main\}\cf1\lang1033 .\lang1040\f0 +\par \pard\keep\li95\sb25\sa25\lang1033\f1\fs18 There is also a section on \cf2\lang1040\strike Learning the Primer Demo\cf3\strike0\{linkID=460>main\}\cf1\lang1033 .\lang1040\f0 \par \pard\sb25\sa25 \par } 60 @@ -202,13 +202,13 @@ FALSE 10 {\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fswiss Arial;}{\f1\fswiss\fcharset0 Arial;}} -{\colortbl ;\red0\green0\blue0;\red128\green0\blue0;} +{\colortbl ;\red0\green0\blue0;\red0\green128\blue0;\red128\green0\blue0;} \viewkind4\uc1\pard\sb25\lang1040\b\f0\fs24 Us\lang1033\f1 er Guide\lang1040\f0 \cf1\b0\fs16 -\par \strike Using InstantObjects\strike0\fs18\{linkID=50>main\}\cf2\{keepn\}\cf1\fs16 -\par \pard\keep\li95\sb25\sa25\strike\fs18 Creating the Business Model\strike0\{linkID=70>main\} -\par \strike Creating the User Interface\strike0\{linkID=280>main\} -\par \strike Programming with Persistent Objects\strike0\{linkID=340>main\} -\par \strike\f1 Learning the Primer Demo\cf2\strike0\{linkID=460>main\}\cf1\strike\f0 +\par \cf2\strike Using InstantObjects\cf3\strike0\fs18\{linkID=50>main\}\{keepn\}\cf1\fs16 +\par \pard\keep\li95\sb25\sa25\cf2\strike\fs18 Creating the Business Model\cf3\strike0\{linkID=70>main\}\cf1 +\par \cf2\strike Creating the User Interface\cf3\strike0\{linkID=280>main\}\cf1 +\par \cf2\strike Programming with Persistent Objects\cf3\strike0\{linkID=340>main\}\cf1 +\par \cf2\strike\f1 Learning the Primer Demo\cf3\strike0\{linkID=460>main\}\cf1\strike\f0 \par \strike0 \par } 70 @@ -225,36 +225,36 @@ FALSE 33 {\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fswiss Arial;}{\f1\fswiss\fcharset0 Arial;}{\f2\fnil Arial;}} -{\colortbl ;\red0\green0\blue0;\red128\green0\blue0;\red0\green128\blue0;} +{\colortbl ;\red0\green0\blue0;\red0\green128\blue0;\red128\green0\blue0;} \viewkind4\uc1\pard\lang1040\b\f0\fs24 Creating the Business Model\cf1\b0\fs16 -\par \pard\sb25\tx1435\strike Group Topics\strike0\{linkID=80>nav\}\tab\strike Using InstantObjects\strike0\{linkID=50>main\}\cf0\b\fs24 \cf1\b0\fs16\{keepn\} +\par \pard\sb25\tx1435\cf2\strike Group Topics\cf3\strike0\{linkID=80>nav\}\cf1\tab\cf2\strike Using InstantObjects\cf3\strike0\{linkID=50>main\}\{keepn\}\cf1 \par \pard\sb25\sa25\tx1435\fs18 Object Oriented applications are based on models. This section covers the definition of the InstantObjects business\lang1033\f1 \lang1040\f0 model, which is \lang1033\f1 \lang1040\f0 the initial step in the creation of an InstantObjects based application. The InstantObjects Model Explorer is the central tool in this process. \par \lang1033\f1 T\lang1040\f0 he InstantObjects business\lang1033\f1 \lang1040\f0 model\lang1033\f1 consists of a collection of user designed classes, many of which are related through inheritance or association. Most if not all of the data controlled by these classes is required to be persisted or stored in such a way that the relationships among this data are retained. In addition to the simple class attribute types, which provide persistence for the \lang1040\f0 Object Pascal equivalent simple type\lang1033\f1 s (eg string or integer)\lang1040\f0 \lang1033\f1 , the InstantObjects framework provides several class attribute types to facilitate the persistence of instances of related classes. These attribute types are known as relational or complex attributes. \par \pard\sb25\sa25\f2\fs10 -\par \cf2\fs18\{target=RelationalAttributeTypes\}\cf0\b\fs22 Re\lang1040 lational \lang1033 Attribute T\lang1040 ypes\cf1\b0\f0\fs18 +\par \cf3\fs18\{target=RelationalAttributeTypes\}\cf0\b\fs22 Re\lang1040 lational \lang1033 Attribute T\lang1040 ypes\cf1\b0\f0\fs18 \par The relational types are\lang1033\f1 :\lang1040\f0 Reference, Part, References and Parts.\lang1033\f1 It is important to understand the nature of the relationship that each of these attribute types provides so that the desired behaviour is reflected within the \lang1040\f0 business\lang1033\f1 \lang1040\f0 model\lang1033\f1 . \par \f2\fs10 \par \lang1040\b\f1\fs18 Container attributes \b0 is the collective name for the subset of relational types consisting of Parts and References type attributes.\lang1033\b \par \b0\f2\fs10 \par \lang1040\b\f0\fs18 Reference\b0 \par Reference is the simplest object relation supported by InstantObjects. A reference defines a unidirectional relation from one object to another. The object referred to lives outside the referring object and knows nothing about the relation itself. -\par See \strike TInstantReference\strike0\{linkID=9510>main\} for more information. +\par See \cf2\strike TInstantReference\cf3\strike0\{linkID=9510>main\}\cf1 for more information. \par \f2\fs10 \par \b\f0\fs18 Part\f1 \par \b0\f0 Objects in Part relations are tied together more closely. A Part relation is bi-directional, meaning the object at each end of the relation knows about the object at the other end. The object referred to in a Part relation is considered to be a part of the owning object and as such can only be reached via the owning object. In addition, an object referred to in a part relation is disposed along with its owner. -\par See \strike TInstantPart\strike0\{linkID=9240>main\} for more information. +\par See \cf2\strike TInstantPart\cf3\strike0\{linkID=9240>main\}\cf1 for more information. \par \f2\fs10 \par \b\f0\fs18 References\b0 \par Like its singular counterpart, Reference, the References relation is unidirectional. But instead of just referring to a single object, a References relation can refer to any number of objects and thereby defining a one-to-many relation to objects outside of the referring object. -\par See \strike TInstantReferences\strike0\{linkID=9770>main\} for more information. +\par See \cf2\strike TInstantReferences\cf3\strike0\{linkID=9770>main\}\cf1 for more information. \par \f2\fs10 \par \b\f0\fs18 Parts\f1 \par \b0\f0 Parts is the one-to-many counterpart of the equivalent one-to-one relation type, Part. A Parts relation can refer to any number of objects that are all considered to be part of the referring object. -\par See \strike TInstantParts\strike0\{linkID=9380>main\} for more information. +\par See \cf2\strike TInstantParts\cf3\strike0\{linkID=9380>main\}\cf1 for more information. \par Parts and References are known as container attributes. When defining an attribute of one of these types, a corresponding array property and optional methods to access the container attribute \lang1033\f1 are\lang1040\f0 added to the class. For any of the relational types, the class of the related object(s) must be specified as the Object Class of the attribute. \par \f2\fs10 \par \f1\fs18 Notes: -\par \pard\sb25\sa25\tx200 For \i "External Storage support"\i0 of the Part, Parts and References attribute, refer to \cf3\strike External Storage of Attributes\cf2\strike0\{linkID=220\}\cf1 . +\par \pard\sb25\sa25\tx200 For \i "External Storage support"\i0 of the Part, Parts and References attribute, refer to \cf2\strike External Storage of Attributes\cf3\strike0\{linkID=220\}\cf1 . \par \pard\sb25\sa25\tx1435\f0 \par } 80 @@ -273,13 +273,13 @@ {\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fswiss Arial;}{\f1\fswiss\fcharset0 Arial;}} {\colortbl ;\red0\green0\blue0;\red0\green128\blue0;\red128\green0\blue0;} \viewkind4\uc1\pard\sb25\lang1040\b\f0\fs24 Creating the Business Model \cf1\b0\fs16 -\par \strike Creating the Business Model\strike0\{LinkID=70>main\}\{keepn\} -\par \pard\keep\li95\sb25\sa25\strike\fs18 The \lang1033\f1 InstantObjects \lang1040\f0 Model Explorer\strike0\{linkID=90>main\} +\par \cf2\strike Creating the Business Model\cf3\strike0\{LinkID=70>main\}\{keepn\}\cf1 +\par \pard\keep\li95\sb25\sa25\cf2\strike\fs18 The \lang1033\f1 InstantObjects \lang1040\f0 Model Explorer\cf3\strike0\{linkID=90>main\} \par \cf2\lang1033\strike\f1 Declaring Model Units\cf3\strike0\{linkID=110>main\}\cf1\lang1040\f0 -\par \strike Defining Classes\strike0\{linkID=120>main\} -\par \strike Adding Business Rules\strike0\{linkID=240>main\} -\par \strike Building/Evolving the Business Model\strike0\{linkID=270>main\} -\par +\par \cf2\strike Defining Classes\cf3\strike0\{linkID=120>main\}\cf1 +\par \cf2\strike Adding Business Rules\cf3\strike0\{linkID=240>main\} +\par \cf2\strike Building/Evolving the Business Model\cf3\strike0\{linkID=270>main\} +\par \cf1 \par } 90 327SA3S @@ -295,29 +295,29 @@ FALSE 27 {\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fswiss Arial;}{\f1\fswiss\fcharset0 Arial;}{\f2\fnil Arial;}{\f3\fnil\fcharset0 Arial;}{\f4\fnil\fcharset2 Symbol;}} -{\colortbl ;\red0\green0\blue0;\red128\green0\blue0;\red0\green128\blue0;} +{\colortbl ;\red0\green0\blue0;\red0\green128\blue0;\red128\green0\blue0;} \viewkind4\uc1\pard\lang1040\b\f0\fs24 The InstantObjects Model Explorer \cf1\b0\fs16 -\par \strike Creating the Business Model\strike0\{LinkID=70>main\}\{keepn\} +\par \cf2\strike Creating the Business Model\cf3\strike0\{LinkID=70>main\}\{keepn\}\cf1 \par \pard\sb25\sa25\fs18 The first step in building an application with InstantObjects is to define the classes and relations that make up the business model. The business model\lang1033\f1 for the application\lang1040\f0 is created\lang1033\f1 and managed\lang1040\f0 in the \lang1033\f1 InstantObjects \lang1040\f0 Model Explorer, which can be opened via the View\lang1033\f1 \lang1040\f0 menu in the Delphi IDE.\lang1033\f1 T\lang1040\f0 he \lang1033\f1 InstantObjects \lang1040\f0 Model Explorer\lang1033\f1 window is non-modal and can be docked, if desired, in the Delphi IDE. This allows the \lang1040\f0 Explorer\lang1033\f1 window to remain open while working in other areas of the IDE. \par \lang1040\f2\fs10 -\par \cf0\b\fs22 Th\lang1033\f3 e \lang1040\f2 InstantObjects Model Explorer \lang1033\f3 (\lang1040\f2 with \f3 "\f2 Inheritance\f3 "\f2 view of classes\lang1033\f3 )\cf2\lang1040\b0\f0\fs18 +\par \cf0\b\fs22 Th\lang1033\f3 e \lang1040\f2 InstantObjects Model Explorer \lang1033\f3 (\lang1040\f2 with \f3 "\f2 Inheritance\f3 "\f2 view of classes\lang1033\f3 )\cf3\lang1040\b0\f0\fs18 \par \{bmc ModelExplorerInheritance.gif\} \par \cf1\f2\fs10 \par \lang1033\f1\fs18 T\lang1040\f0 he \lang1033\f1 InstantObjects \lang1040\f0 Model Explorer\lang1033\f1 window has two main areas of interest. \par \f2\fs10 \par \pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent0{\pntxtb\'B7}}\fi-200\li200\sb25\sa25\tx200\f1\fs18 The toolbar that holds the action speed buttons. \f3 The speed buttons display mouse-over, pop-up hints. These speed buttons provide access to the configuration aspects for model code units, persistence broker connections and type of class view presented in the tree view pane;\cf0\lang1040\b\f2\fs22 \par \pard\sb25\sa25\cf1\b0\fs10 -\par \pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent0{\pntxtb\'B7}}\fi-200\li200\sb25\sa25\tx200\lang1033\f1\fs18 The tree view pane that displays the model's classes.\cf0\b\f3\fs22 \cf1\b0\fs18 The tree view pane has a mouse right button click, \cf3\strike pop-up menu\cf2\strike0\{linkID=100>main\}\cf1 that is used to access the procedures for managing the model.\cf0\lang1040\b\f2\fs22 +\par \pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent0{\pntxtb\'B7}}\fi-200\li200\sb25\sa25\tx200\lang1033\f1\fs18 The tree view pane that displays the model's classes.\cf0\b\f3\fs22 \cf1\b0\fs18 The tree view pane has a mouse right button click, \cf2\strike pop-up menu\cf3\strike0\{linkID=100>main\}\cf1 that is used to access the procedures for managing the model.\cf0\lang1040\b\f2\fs22 \par \pard\sb25\sa25\cf1\b0\fs10 \par \cf0\lang1033\b\fs22 Class Views -\par \cf1\b0\fs18 A\f3 useful feature of the \f1 InstantObjects \lang1040\f0 Model Explorer\lang1033\f1 when creating or managing the class model is the ability to toggle \f3 the tree view pane \f1 between inheritance and relational type views. This is done using the 'View [Type]' speed button on the toolbar. The button has a context sensitive glyph, \cf2\{bmc ModelExplorerViewRelationsButton.gif\} \cf0 or\cf1 \cf2\{bmc ModelExplorerViewInheritanceButton.gif\}\cf0 ,\cf1 and pop-up hint. +\par \cf1\b0\fs18 A\f3 useful feature of the \f1 InstantObjects \lang1040\f0 Model Explorer\lang1033\f1 when creating or managing the class model is the ability to toggle \f3 the tree view pane \f1 between inheritance and relational type views. This is done using the 'View [Type]' speed button on the toolbar. The button has a context sensitive glyph, \cf3\{bmc ModelExplorerViewRelationsButton.gif\} \cf0 or\cf1 \cf3\{bmc ModelExplorerViewInheritanceButton.gif\}\cf0 ,\cf1 and pop-up hint. \par \f2\fs10 \par \pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent0{\pntxtb\'B7}}\fi-200\li200\sb25\sa25\tx200\f3\fs18 Inheritance View - The tree view is based on the class inheritance structure; \par \pard\sb25\sa25\f2\fs10 \par \pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent0{\pntxtb\'B7}}\fi-200\li200\sb25\sa25\tx200\f3\fs18 Relations View - The tree view is based on the relationships between the classes. \par \pard\sb25\sa25\f2\fs10 \par \f1\fs18 The Relations view for the above example Inheritance view is shown below.\cf0\lang1040\b\f2\fs22 -\par The InstantObjects Model Explorer \lang1033\f3 (\lang1040\f2 with \f3 "Relations"\f2 view of classes\lang1033\f3 )\cf2\lang1040\b0\f0\fs18 +\par The InstantObjects Model Explorer \lang1033\f3 (\lang1040\f2 with \f3 "Relations"\f2 view of classes\lang1033\f3 )\cf3\lang1040\b0\f0\fs18 \par \{bmc ModelExplorerRelations.gif\}\cf1 \par \par } @@ -356,14 +356,14 @@ FALSE 11 {\rtf1\ansi\ansicpg1252\deff0\deflang3081{\fonttbl{\f0\fnil Arial;}{\f1\fswiss Arial;}{\f2\fswiss\fcharset0 Arial;}{\f3\fnil\fcharset0 Arial;}} -{\colortbl ;\red0\green0\blue0;\red128\green0\blue0;\red0\green128\blue0;} +{\colortbl ;\red0\green128\blue0;\red128\green0\blue0;\red0\green0\blue0;} \viewkind4\uc1\pard\b\f0\fs24 Declaring Model Units -\par \cf1\lang1040\b0\strike\f1\fs16 Creating the Business Model\strike0\{LinkID=70>main\}\{keepn\} +\par \cf1\lang1040\b0\strike\f1\fs16 Creating the Business Model\cf2\strike0\{LinkID=70>main\}\{keepn\}\cf3 \par \pard\sb25\sa25\lang1033\f2\fs18 It is good practice to keep an application's business classes encapsulated and separated from other classes such as the user interface classes. The convention when using InstantObjects is to create separate code units within the application's IDE project solely for the purpose of containing the \lang1040\f1 business \lang1033\f2 classes that constitute an InstantObjects model. \lang1040\f1 Th\lang1033\f2 is\lang1040\f1 model can be placed in one or more \lang1033\f2 code \lang1040\f1 units in the project. These units are referred to as model units. \par \f0\fs10 -\par \lang1033\f2\fs18 The InstantObjects Model Explorer needs to know which of the application project's units are intended to be model units. This is done using\lang1040\f1 the \cf2\{bmc ModelExplorerSelectUnitsButton.gif\}\cf1 Select Units button on the toolbar of the InstantObjects Model Explorer. \lang1033\f2 T\lang1040\f1 he Select Units button\lang1033\f2 \lang1040\f1 will open a dialog showing all the units of the current project. The left side of the dialog shows the model units and the right side shows the other units included in the project. Use the buttons between the two lists to move one or more units from one side to the other. \lang1033\f2 Select the OK or Cancel button to close the dialog and save or cancel, respectively, any changes. \lang1040\f1 When \lang1033\f2 the \lang1040\f1 model unit(s)\lang1033\f2 has been declared \lang1040\f1 the business model\lang1033\f2 can be created or maintained using the \f3 tree view pane's right button click, \cf3\strike pop-up menu\cf2\strike0\{linkID=100>main\}\cf1 \lang1040\f1 . +\par \lang1033\f2\fs18 The InstantObjects Model Explorer needs to know which of the application project's units are intended to be model units. This is done using\lang1040\f1 the \cf2\{bmc ModelExplorerSelectUnitsButton.gif\}\cf3 Select Units button on the toolbar of the InstantObjects Model Explorer. \lang1033\f2 T\lang1040\f1 he Select Units button\lang1033\f2 \lang1040\f1 will open a dialog showing all the units of the current project. The left side of the dialog shows the model units and the right side shows the other units included in the project. Use the buttons between the two lists to move one or more units from one side to the other. \lang1033\f2 Select the OK or Cancel button to close the dialog and save or cancel, respectively, any changes. \lang1040\f1 When \lang1033\f2 the \lang1040\f1 model unit(s)\lang1033\f2 has been declared \lang1040\f1 the business model\lang1033\f2 can be created or maintained using the \f3 tree view pane's right button click, \cf1\strike pop-up menu\cf2\strike0\{linkID=100>main\}\cf3 \lang1040\f1 . \par \f0\fs10 -\par \cf2\f1\fs18\{bmc ModelUnitSelector.gif\}\cf1 +\par \cf2\f1\fs18\{bmc ModelUnitSelector.gif\}\cf3 \par \pard\lang3081\f0 \par } 120 @@ -382,7 +382,7 @@ {\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fswiss Arial;}{\f1\fswiss\fcharset0 Arial;}{\f2\fnil Arial;}{\f3\fnil\fcharset2 Symbol;}} {\colortbl ;\red0\green0\blue0;\red0\green128\blue0;\red128\green0\blue0;} \viewkind4\uc1\pard\lang1040\b\f0\fs24 Defining Classes \cf1\b0\fs16 -\par \strike Creating the Business Model\strike0\{LinkID=70>main\}\{keepn\} +\par \cf2\strike Creating the Business Model\cf3\strike0\{LinkID=70>main\}\{keepn\}\cf1 \par \pard\sb25\sa25\fs18 Classes can be added\lang1033\f1 , deleted\lang1040\f0 and edited\lang1033\f1 as follows (note that keyboard short cuts are also available): \par \lang1040\f0\fs10 \par \pard{\pntext\f3\'B7\tab}{\*\pn\pnlvlblt\pnf3\pnindent0{\pntxtb\'B7}}\fi-200\li200\sb25\sa25\tx200\fs18 Add a new class to the model by right-clicking in the empty area of the \lang1033\f1 tree view pane in InstantObjects \lang1040\f0 Model Explorer\lang1033\f1 . This will launch the \cf2\strike pop-up menu\cf3\strike0\{linkID=100>main\}\cf1\lang1040\f0 . Select New Class from the menu\lang1033\f1 to\lang1040\f0 bring up the Class Editor with an empty class definition\lang1033\f1 ;\lang1040\f0 @@ -439,7 +439,7 @@ \par \cf2\f2\fs18\{bmc ClassEditor\lang1033\f3 Class\lang1040\f2 .gif\} \par \cf1\f1\fs10 \par \lang1033\f3\fs18 The \b class name \b0 can be any valid Object Pascal class identifier.\lang1040\f2 -\par The default \b base class \b0 of any business class is \strike TInstantObject\strike0\{linkID=7380>main\}, the class from which persistence capabilities are inherited. When classes are present in your model, you can choose any of these as the immediate base class instead. +\par The default \b base class \b0 of any business class is \cf3\strike TInstantObject\cf2\strike0\{linkID=7380>main\}\cf1 , the class from which persistence capabilities are inherited. When classes are present in your model, you can choose any of these as the immediate base class instead. \par The \lang1033\f3 model \lang1040\b\f2 unit \b0 in which \lang1033\f3 a\lang1040\f2 new class \lang1033\f3 will\lang1040\f2 be placed can be selected from the list of available model units.\lang1033\f3 This entry is read only when editing an existing class.\lang1040\f2 \par The class\lang1033\f3 \b persistence\lang1040\f2 \b0 can be defined as either \lang1033\i\f3 stored\lang1040\f2 \i0 or \i embedded\i0 . Instances of \lang1033\i\f3 stored\lang1040\f2 \i0 classes can be \lang1033\f3 independently \lang1040\f2 stored in and retrieved from \lang1033\f3 the database\lang1040\f2 . \lang1033\f3 An i\lang1040\f2 nstance of \lang1033\f3 an \lang1040\i\f2 embedded \i0 class can exist in the database only as \lang1033\f3 an attribute\lang1040\f2 of \lang1033\f3 its owner, which is \lang1040\f2 another \i embedded \i0 or \lang1033\i\f3 stored\lang1040\f2 \lang1033\i0\f3 class instance. In practice this means that the attribute values of an \lang1040\i\f2 embedded \i0 class \lang1033\f3 are stored in the database in a BLOB type field.\lang1040\f2 \lang1033\f3 Therefore, i\lang1040\f2 f you want instances of a class to be \lang1033\f3 independently \lang1040\f2 retrievable or available by query, define the class\lang1033\f3 persistence as\lang1040\f2 \lang1033\i\f3 stored\lang1040\i0\f2 . \par \f3 S\i tored \i0 persistence is also required for those classes used by Reference attributes or other \cf3\strike attributes with \i external \i0 storage\cf2\strike0\{linkID=220>main\}\cf1 . A class, used only for objects that are owned by other objects, should be defined with \i embedded \i0 persistence if the owning objects use \i embedded \i0 storage for the attribute. If, however, the owning objects use \i external \i0 storage kind for the attribute, define the owned class with \i stored \i0 persistence.\f2 @@ -513,7 +513,7 @@ {\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fswiss Arial;}{\f1\fswiss\fcharset0 Arial;}{\f2\fnil\fcharset0 Arial;}{\f3\fnil Arial;}{\f4\fnil\fcharset2 Symbol;}} {\colortbl ;\red0\green0\blue0;\red0\green128\blue0;\red128\green0\blue0;} \viewkind4\uc1\pard\lang1040\b\f0\fs24 Attribute Editor \cf1\b0\fs16 -\par \strike Creating the Business Model\strike0\{LinkID=70>main\}\tab\lang1033\f1\tab\lang1040\ul\f0 See Also\ulnone\{linkID=180\}\{keepn\} +\par \cf2\strike Creating the Business Model\cf3\strike0\{LinkID=70>main\}\cf1\tab\lang1033\f1\tab\cf2\lang1040\ul\f0 See Also\cf3\ulnone\{linkID=180\}\{keepn\}\cf1 \par \lang1033\f2\fs18 The Attribute Editor is used to manage an attribute's properties. It contains the tabbed pages as follows: \par \f3\fs10 \par \pard{\pntext\f4\'B7\tab}{\*\pn\pnlvlblt\pnf4\pnindent0{\pntxtb\'B7}}\fi-200\li200\tx200\cf2\strike\f2\fs18 Definition Page\cf3\strike0\{linkID=190>main\}\cf1 - This is where the attribute's properties are defined;\lang3081\f3 @@ -537,10 +537,10 @@ FALSE 7 {\rtf1\ansi\ansicpg1252\deff0\deflang3081{\fonttbl{\f0\fswiss Arial;}{\f1\fnil Arial;}} -{\colortbl ;\red0\green0\blue0;} +{\colortbl ;\red0\green0\blue0;\red0\green128\blue0;\red128\green0\blue0;} \viewkind4\uc1\pard\sb55\sa25\lang1040\b\f0\fs24 See Also \par \pard\sb25\sa25\cf1\b0\f1\fs10 -\par \pard\li60\sb25\sa25\strike\fs18 External Storage of Attributes\strike0\{linkID=220>main\} +\par \pard\li60\sb25\sa25\cf2\strike\fs18 External Storage of Attributes\cf3\strike0\{linkID=220>main\}\cf1 \par \pard\lang3081 \par } 190 @@ -633,11 +633,11 @@ FALSE -32 +33 {\rtf1\ansi\ansicpg1252\deff0\deflang1040{\fonttbl{\f0\fswiss\fcharset0 Arial;}{\f1\fswiss Arial;}{\f2\fnil Arial;}{\f3\fnil\fcharset2 Symbol;}} {\colortbl ;\red0\green0\blue0;\red0\green128\blue0;\red128\green0\blue0;} \viewkind4\uc1\pard\b\f0\fs24 External Storage of Attributes\cf1\b0\f1\fs16 -\par \pard\sb25\sa25\cf2\lang1033\strike\f0 Example\cf3\strike0\{linkID=230>example\}\cf1\tab\tab\lang1040\strike\f1 Creating the Business Model\strike0\{LinkID=70>main\}\{keepn\} \f0\fs18 +\par \pard\sb25\sa25\cf2\lang1033\strike\f0 Example\cf3\strike0\{linkID=230>example\}\cf1\tab\tab\cf2\lang1040\strike\f1 Creating the Business Model\cf3\strike0\{LinkID=70>main\}\{keepn\} \cf1\f0\fs18 \par \lang1033 The E\lang1040\f1 xternal \lang1033\f0 S\lang1040\f1 torage\lang1033\f0 option\lang1040\f1 \lang1033\f0 for \cf2\strike relational attributes\cf3\strike0\{linkTarget=RelationalAttributeTypes>main\}\cf1\lang1040\f1 \lang1033\f0 was introduced to resolve several shortcomings and issues in earlier versions of InstantObjects. These include the following: \par \f2\fs10 \par \pard{\pntext\f3\'B7\tab}{\*\pn\pnlvlblt\pnf3\pnindent0{\pntxtb\'B7}}\fi-200\li200\sb25\sa25\tx200\f0\fs18 the \lang1040\f1 inability to fully query the database from a SQL-enabled (non-IO) interface; @@ -663,6 +663,7 @@ \par \pard\sb25\sa25\lang1033\f0\fs18 IMPORTANT\lang1040\f1 NOTE\lang1033\f0 S: \par \pard{\pntext\f3\'B7\tab}{\*\pn\pnlvlblt\pnf3\pnindent0{\pntxtb\'B7}}\fi-200\li200\sb25\sa25\tx200\b\i External Storage and Class Persistence\b0\i0 - A cl\lang1040\f1 ass must \lang1033\f0 have its Persistence property set to\lang1040\f1 \i stored\i0 \lang1033\f0 if it is referred\lang1040\f1 \lang1033\f0 to by attributes that use\lang1040\f1 \i external \i0 storage. \lang1033\f0 A c\lang1040\f1 lass\lang1033\f0 defined with\lang1040\f1 \i embedded\i0 \lang1033\f0 Persistence may only be used by\lang1040\f1 \i embedded\i0 (the \lang1033\f0 InstantObjects \lang1040\f1 historical arrangement) part and parts attributes\lang1033\f0 ;\lang1040\f1 \par \cf3\lang1033\i\f0{\pntext\f3\'B7\tab}\{target=ExternalStorageandPersistenceBrokers\}\cf1\b External Storage and Persistence Brokers\b0\i0 - Currently (V2), the InstantObjects library requires the use of persistence brokers derived from TInstantSQLBroker to support \i external \i0 storage of attributes\lang1040\f1 .\lang1033\f0 Brokers that are derived from TInstantNavigationalBroker, including the BDE and some ADO brokers, DO NOT SUPPORT \i external \i0 storage of attributes and MUST NOT BE USED if the class model makes use of this feature.\lang1040\f1 +\par \lang1033\b\i\f0{\pntext\f3\'B7\tab}Performance Hint\b0\i0 - Currently (V2.0), the InstantObjects (IO) library does not create parent class indices for the linking tables in the database. A significant improvement in performance, therefore, can often be achieved by manually adding these indices (fields 'ParentClass' and 'ParentId', non-unique) to the linking tables for your external \cf2\strike container attributes\cf3\strike0\{linkTarget=RelationalAttributeTypes>main\}\cf1 . Remember that these manually added indices will be removed by each IO database build and probably after an evolve, so they will need to monitored and re-added as necessary. The need to add these indices manually will be eliminated after the introduction of Referential Integrity (RI) options to IO. This is expected to happen in the near future and will enhance both the integrity of data in and performance of the database for brokers that can implement RI. \lang1040\f1 \par \pard\sb25\sa25\f2\fs10 \par \pard\cf0\fs20 \par } @@ -715,10 +716,10 @@ FALSE 7 {\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fswiss Arial;}{\f1\fswiss\fcharset0 Arial;}} -{\colortbl ;\red0\green0\blue0;} +{\colortbl ;\red0\green0\blue0;\red0\green128\blue0;\red128\green0\blue0;} \viewkind4\uc1\pard\lang1040\b\f0\fs24 Adding Business Rules \cf1\b0\fs16 -\par \strike Example 1\strike0\{linkID=250>example\}\tab\strike Example 2\strike0\{linkID=260>example\}\f1\tab\strike\f0 Creating the Business Model\strike0\{LinkID=70>main\}\{keepn\} -\par \pard\sb25\sa25\fs18 Validation rules and other business related behavior is added to your business classes by adding the required code plus additional methods and properties to the class. Validation rules and side effects of changing the value of an attribute are often added to the setter method of the corresponding property. Complete validation of business objects before they are stored to the database can be added by overriding the BeforeStore method of the class. New objects can be initialized by overriding the Initialize method. For a complete list of the virtual methods of \strike TInstantObject\strike0\{linkID=7380>main\}, please refer to the InstantObjects Reference Guide. +\par \cf2\strike Example 1\cf3\strike0\{linkID=250>example\}\cf1\tab\cf2\strike Example 2\cf3\strike0\{linkID=260>example\}\cf1\f1\tab\cf2\strike\f0 Creating the Business Model\cf3\strike0\{LinkID=70>main\}\{keepn\}\cf1 +\par \pard\sb25\sa25\fs18 Validation rules and other business related behavior is added to your business classes by adding the required code plus additional methods and properties to the class. Validation rules and side effects of changing the value of an attribute are often added to the setter method of the corresponding property. Complete validation of business objects before they are stored to the database can be added by overriding the BeforeStore method of the class. New objects can be initialized by overriding the Initialize method. For a complete list of the virtual methods of \cf2\strike TInstantObject\cf3\strike0\{linkID=7380>main\}\cf1 , please refer to the InstantObjects Reference Guide. \par \par } 250 @@ -735,9 +736,9 @@ FALSE 33 {\rtf1\ansi\ansicpg1252\deff0\deflang1040{\fonttbl{\f0\fnil Arial;}{\f1\fswiss\fcharset0 Arial;}{\f2\fswiss Arial;}{\f3\fnil\fcharset0 Arial;}{\f4\fnil\fcharset0 Courier New;}} -{\colortbl ;\red0\green0\blue0;\red0\green128\blue0;\red128\green0\blue0;} -\viewkind4\uc1\pard\b\f0\fs26 Example 1\b0\fs20 -\par \cf1\strike\f1\fs16 Adding Business Rules\strike0\f2\{LinkID=240>main\}\{keepn\} \cf0\f0\fs20 +{\colortbl ;\red0\green128\blue0;\red128\green0\blue0;\red0\green0\blue0;} +\viewkind4\uc1\pard\b\f0\fs24 Example 1\b0\fs20 +\par \cf1\strike\f1\fs16 Adding Business Rules\cf2\strike0\f2\{LinkID=240>main\}\{keepn\}\cf3 \cf0\f0\fs20 \par \f3 In InstantObjects you usually apply single-attribute business rules in the attribute's property setter method: \par \par \b\f4 procedure\b0 TAddress.SetPostalCode(\b const \b0 Value: \b string\b0 ); @@ -753,7 +754,7 @@ \par GetDefaultCityByPostalCode(Value); \par \b end\b0 ; \par \f0 -\par \f3 If you need to apply business rules that involve more than one attribute, instead, you often use the BeforeStore virtual method(see \cf2\strike Example 2\cf3\strike0\{linkID=260\}\cf0 ). +\par \f3 If you need to apply business rules that involve more than one attribute, instead, you often use the BeforeStore virtual method(see \cf1\strike Example 2\cf2\strike0\{linkID=260\}\cf0 ). \par \par When you code side effects, be aware that the property setters might be called more often than expected, for example when reading an object from an XML file or when you use the data-aware presentation layer. Here is an example: \par @@ -764,7 +765,7 @@ \par MaxShipDate := 0; \par \b end\b0 ; \par \f3 -\par The intent of this code is to reset MaxShipDate whenever MinShipDate changes, so that a user, in a hypothetical data-entry scenario, will have to re-enter a value for MaxShipDate. But things might not work always as expected. For example, SetMinShipDate might be called after SetMaxShipDate when streaming in an object from a XML file. The lesson here is: use the property setters and the BeforeStore method only to appy real business rules (like "MaxShipDate must be equal to or greater than MinShipDate"), and code data-entry rules (like "whenever a value for MinShipDate is entered, MaxShipDate should be reset") at the data-entry level (that is, not in the model classes). +\par The intent of this code is to reset MaxShipDate whenever MinShipDate changes, so that a user, in a hypothetical data-entry scenario, will have to re-enter a value for MaxShipDate. But things might not work always as expected. For example, SetMinShipDate might be called after SetMaxShipDate when streaming in an object from a XML file. The lesson here is: use the property setters and the BeforeStore method only to apply real business rules (like "MaxShipDate must be equal to or greater than MinShipDate"), and code data-entry rules (like "whenever a value for MinShipDate is entered, MaxShipDate should be reset") at the data-entry level (that is, not in the model classes). \par \par } 260 @@ -781,9 +782,9 @@ FALSE 30 {\rtf1\ansi\ansicpg1252\deff0\deflang1040{\fonttbl{\f0\fnil Arial;}{\f1\fswiss\fcharset0 Arial;}{\f2\fswiss Arial;}{\f3\fnil\fcharset0 Arial;}{\f4\fnil\fcharset0 Courier New;}} -{\colortbl ;\red0\green0\blue0;} -\viewkind4\uc1\pard\b\f0\fs26 Example 2\b0\fs20 -\par \cf1\strike\f1\fs16 Adding Business Rules\strike0\f2\{LinkID=240>main\}\{keepn\} +{\colortbl ;\red0\green128\blue0;\red128\green0\blue0;\red0\green0\blue0;} +\viewkind4\uc1\pard\b\f0\fs24 Example 2\b0\fs20 +\par \cf1\strike\f1\fs16 Adding Business Rules\cf2\strike0\f2\{LinkID=240>main\}\{keepn\}\cf3 \par \cf0\f3\fs20 Business rules that involve more than one attribute are usually applied in BeforeStore, which gets called whenever the Store method is called to write an object (back) to the storage. Example: \par \par \b\f4 procedure \b0 TShipment.BeforeStore; @@ -826,10 +827,10 @@ {\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fswiss Arial;}{\f1\fswiss\fcharset0 Arial;}{\f2\fnil Arial;}{\f3\fnil\fcharset0 Arial;}} {\colortbl ;\red0\green0\blue0;\red0\green128\blue0;\red128\green0\blue0;} \viewkind4\uc1\pard\cf1\lang1040\b\f0\fs24 Building/Evolving the Business Model \b0\fs16 -\par \cf2\strike Creating the Business Model\cf3\strike0\{linkID=70>main\}\cf1\{keepn\} +\par \cf2\strike Creating the Business Model\cf3\strike0\{linkID=70>main\}\{keepn\}\cf1 \par \pard\sb25\sa25\fs18 The final step in the modeling phase is to make the model physical in terms of storage for the objects. The required tables and indices have to be created from the business model. InstantObjects allows \lang1033\f1 the\lang1040\f0 use\lang1033\f1 of\lang1040\f0 various types of databases as storage for \lang1033\f1 the business class \lang1040\f0 objects\lang1033\f1 by\lang1040 using different brokers. \par \f2\fs10 -\par \f0\fs18 The Connection Manager \lang1033\f1 manages the\lang1040\f0 \f1 definition, \f0 creat\lang1033\f1 ion\lang1040\f0 \f1 and evolution of \lang1033 the\lang1040\f0 database. \lang1033\f1 It\lang1040\f0 \lang1033\f1 can be launched using the \cf3\{bmc ModelExplorerBuildDatabaseButton.gif\}\cf1 Build Database speed button\lang1040\f0 on the toolbar of the\lang1033\f1 \cf2\strike InstantObjects\lang1040\f0 Model Explorer\cf3\strike0\{linkID=90>main\}\f1 +\par \f0\fs18 The Connection Manager \lang1033\f1 manages the\lang1040\f0 \f1 definition, \f0 creat\lang1033\f1 ion\lang1040\f0 \f1 and evolution of \lang1033 the\lang1040\f0 database. \lang1033\f1 It\lang1040\f0 \lang1033\f1 can be launched using the \cf3\{bmc ModelExplorerBuildDatabaseButton.gif\} \cf1 Build Database speed button\lang1040\f0 on the toolbar of the\lang1033\f1 \cf2\strike InstantObjects\lang1040\f0 Model Explorer\cf3\strike0\{linkID=90>main\}\f1 \par \cf1\f2\fs10 \par \cf3\f1\fs18\{bmc ConnectionManager.gif\} \par \cf1\f2\fs10 @@ -868,9 +869,9 @@ FALSE 7 {\rtf1\ansi\deff0{\fonttbl{\f0\fswiss Arial;}} -{\colortbl ;\red0\green0\blue0;} +{\colortbl ;\red0\green0\blue0;\red0\green128\blue0;\red128\green0\blue0;} \viewkind4\uc1\pard\lang1040\b\f0\fs24 Creating the User Interface\cf1\b0\fs16 -\par \pard\sb25\tx1435\strike Group Topics\strike0\{linkID=290>nav\}\tab\strike Using InstantObjects\strike0\{linkID=50>main\}\cf0\b\fs24 \cf1\b0\fs16\{keepn\} +\par \pard\sb25\tx1435\cf2\strike Group Topics\cf3\strike0\{linkID=290>nav\}\cf1\tab\cf2\strike Using InstantObjects\cf3\strike0\{linkID=50>main\}\{keepn\}\cf1 \par \pard\sb25\sa25\tx1435\fs18 The next phase in the development process is to create a user interface through which the business objects may interact with the user. This section explains the components that are involved in the creation of the user interface. \par \par } @@ -887,14 +888,14 @@ FALSE 11 -{\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fswiss Arial;}{\f1\fswiss\fcharset0 Arial;}} -{\colortbl ;\red0\green0\blue0;} +{\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fswiss Arial;}{\f1\fswiss\fcharset0 Arial;}{\f2\fnil\fcharset0 Arial;}} +{\colortbl ;\red0\green0\blue0;\red0\green128\blue0;\red128\green0\blue0;} \viewkind4\uc1\pard\sb25\lang1040\b\f0\fs24 Creating the User Interface \cf1\b0\fs16 -\par \strike Creating the User Interface\strike0\{link\lang1033\f1 ID\lang1040\f0 =\lang1033\f1 280\lang1040\f0 >main\}\{keepn\} -\par \pard\keep\li95\sb25\sa25\strike\fs18 Persistence by RAD\strike0\{linkID=300>main\} -\par \strike The Connector\strike0\{linkID=310>main\} -\par \strike The Exposer\strike0\{linkID=320>main\} -\par \strike The Selector\strike0\{linkID=330>main\} +\par \cf2\strike Creating the User Interface\cf3\strike0\{link\lang1033\f1 ID\lang1040\f0 =\lang1033\f1 280\lang1040\f0 >main\}\{keepn\}\cf1 +\par \pard\keep\li95\sb25\sa25\cf2\strike\fs18 Persistence by RAD\cf3\strike0\{linkID=300>main\}\cf1 +\par \cf2\strike The Connector\cf3\strike0\{linkID=\f2 310\f0 >main\}\cf1 +\par \cf2\strike The Exposer\cf3\strike0\{linkID=\f2 320\f0 >main\}\cf1 +\par \cf2\strike The Selector\cf3\strike0\{linkID=330>main\}\cf1 \par \par \par } @@ -914,7 +915,7 @@ {\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fswiss Arial;}{\f1\fswiss\fcharset0 Arial;}} {\colortbl ;\red0\green0\blue0;\red0\green128\blue0;\red128\green0\blue0;} \viewkind4\uc1\pard\lang1040\b\f0\fs24 Persistence by RAD \cf1\b0\fs16 -\par \cf2\strike Creating the User Interface\cf3\strike0\{linkID=280>main\}\cf1\{keepn\} +\par \cf2\strike Creating the User Interface\cf3\strike0\{linkID=280>main\}\{keepn\}\cf1 \par \pard\sb25\sa25\fs18 When InstantObjects has been installed in your Delphi environment, a set of components is available on the InstantObjects tab of the Delphi component palette. \par \cf3\{bmc InstantObjectsPalette.gif\}\cf1 \par Applications can be built with InstantObjects using the same RAD approach used when building traditional database applications in Delphi. InstantObjects allows you to use standard VCL data-aware controls with your persistent business objects. The InstantObjects components are used to connect to the database and to make business objects available in the user interface of the application\f1 .\f0 @@ -936,13 +937,13 @@ {\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fswiss Arial;}{\f1\fswiss\fcharset0 Arial;}{\f2\fnil Arial;}} {\colortbl ;\red0\green0\blue0;\red0\green128\blue0;\red128\green0\blue0;} \viewkind4\uc1\pard\lang1040\b\f0\fs24 The Connector \cf1\b0\fs16 -\par \cf2\strike Creating the User Interface\cf3\strike0\{linkID=280>main\}\cf1\{keepn\} +\par \cf2\strike Creating the User Interface\cf3\strike0\{linkID=280>main\}\{keepn\}\cf1 \par \pard\sb25\sa25\fs18 In order for your application to use the database \lang1033\f1 for\lang1040\f0 object storage, you must use a connector component. The connector acts as a gateway between your application and the database\f1 (by means of an internal component called the broker) and \f0 manag\lang1033\f1 es\lang1040\f0 all the objects that are stored to and retrieved from the database. A connector component for each type of data access layer that \lang1033\f1 has been installed from\lang1040\f0 InstantObjects is available on the component palette. A connector is attached to a database by assigning a connection component to its Connection \f1 (or equivalent) \f0 property. Each connector component supports its own connection type\f1 . For example:\f0 \par \f2\fs10 \par \pard\sb25\sa25\tx1980\tx4800\b\f0\fs18 Access type\tab Connector type\tab\f1 Type of \f0 Connection\b0 -\par ADO\tab\cf2\strike TInstantADOConnector\cf1\strike0\{linkID=1900>main\}\tab TADOConnection -\par BDE\tab\cf2\strike TInstantBDEConnector\cf1\strike0\{linkID=2560>main\}\tab TDatabase -\par IBX\tab\cf2\strike TInstantIBXConnector\cf1\strike0\{linkID=6950>main\}\tab TIBDatabase +\par ADO\tab\cf2\strike TInstantADOConnector\cf3\strike0\{linkID=1900>main\}\cf1\tab TADOConnection +\par BDE\tab\cf2\strike TInstantBDEConnector\cf3\strike0\{linkID=2560>main\}\cf1\tab TDatabase +\par IBX\tab\cf2\strike TInstantIBXConnector\cf3\strike0\{linkID=6950>main\}\cf1\tab TIBDatabase \par \f1 D\f0 BX\tab\cf0 TInstant\f1 D\f0 BXConnector\cf1\tab TSQLConnection \par \f1 XML\tab\cf0\f0 TInstantX\f1 ML\f0 Connector\cf1\tab TXMLFilesAccessor \par \pard\f2\fs10 @@ -969,14 +970,14 @@ {\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fswiss Arial;}{\f1\fswiss\fcharset0 Arial;}} {\colortbl ;\red0\green0\blue0;\red0\green128\blue0;\red128\green0\blue0;} \viewkind4\uc1\pard\cf1\lang1040\b\f0\fs24 The Exposer \b0\fs16 -\par \cf2\strike Creating the User Interface\cf3\strike0\{linkID=280>main\}\cf1\{keepn\} -\par \pard\sb25\sa25\strike\fs18 TInstantExposer\strike0\{linkID=6440>main\} is a dataset component that maps objects to the user interface of your application. +\par \cf2\strike Creating the User Interface\cf3\strike0\{linkID=280>main\}\{keepn\}\cf1 +\par \pard\sb25\sa25\cf2\strike\fs18 TInstantExposer\cf3\strike0\{linkID=6440>main\}\cf1 is a dataset component that maps objects to the user interface of your application. \par Attributes defined in the business model are accessed through properties. Properties that are published can be accessed by data-aware controls via this component. In addition, the content of container attributes can be accessed too. The exposer component maps the published properties of objects to fields in a dataset. The objects being exposed are represented as rows in the dataset. -\par To expose an object, it must be assigned to the \strike Subject\strike0\{linkID=5150>main\} property of a \strike TInstantExposer\strike0\{linkID=6440>main\}. To expose multiple objects contained within another object, assign the main object to the Subject property and enter content mode by changing the \strike Mode\strike0\{linkID=5020>main\} property from amObject to amContent. If the exposed class has no default container, specify the desired container in the property \strike ContainerName\strike0\{linkID=6550>main\}. Specify the class of the exposed\lang1033\f1 , contained\lang1040\f0 object(s) in the property \strike ObjectClassName\strike0\{linkID=6620>main\}. -\par By default, an exposer will make all simple properties of each exposed object as well as any related object available through fields in the dataset. Every field will have a \f1 F\f0 ield\f1 N\f0 ame matching the property it represents. For related objects, the fieldname will be the complete path to the property using regular dot notation. The property \strike FieldOptions\strike0\{linkID=4930>main\} and the event \strike OnIncludeField\strike0\{linkID=5560>main\} allow you to limit or extend the number fields to include. +\par To expose an object, it must be assigned to the \cf2\strike Subject\cf3\strike0\{linkID=5150>main\}\cf1 property of a \cf2\strike TInstantExposer\cf3\strike0\{linkID=6440>main\}\cf1 . To expose multiple objects contained within another object, assign the main object to the Subject property and enter content mode by changing the \cf2\strike Mode\cf3\strike0\{linkID=5020>main\}\cf1 property from amObject to amContent. If the exposed class has no default container, specify the desired container in the property \cf2\strike ContainerName\cf3\strike0\{linkID=6550>main\}\cf1 . Specify the class of the exposed\lang1033\f1 , contained\lang1040\f0 object(s) in the property \cf2\strike ObjectClassName\cf3\strike0\{linkID=6620>main\}\cf1 . +\par By default, an exposer will make all simple properties of each exposed object as well as any related object available through fields in the dataset. Every field will have a \f1 F\f0 ield\f1 N\f0 ame matching the property it represents. For related objects, the fieldname will be the complete path to the property using regular dot notation. The property \cf2\strike FieldOptions\cf3\strike0\{linkID=4930>main\}\cf1 and the event \cf2\strike OnIncludeField\cf3\strike0\{linkID=5560>main\}\cf1 allow you to limit or extend the number fields to include. \par Container attributes of exposed objects are automatically recognized by the exposer and \lang1033\f1 are \lang1040\f0 represented as nested datasets within the exposer. -\par Exposers can be linked together in master/detail relation\f1 ships\f0 . To link one exposer to another, assign the master exposer to the DataSet property of a TDataSource and assign the TDataSource to the \strike MasterSource\strike0\{linkID=6570>main\} property of the detail exposer. The Subject of the detail exposer will be set to the current object of the master exposer\lang1033\f1 and updated\lang1040\f0 whenever this changes. If you want the detail exposer to expose an object that is related to the current object of the master exposer instead, simply specify the desired property path in \strike MasterProperty\strike0\{linkID=6560>main\}. -\par \strike TInstantExposer\strike0\{linkID=6440>main\} is not limited to exposing \strike TInstantObject\strike0\{linkID=7380>main\} descendants. Any object with published propertied can be exposed. The content of standard VCL containers like TList, TObjectList and TCollection can be exposed in content mode. +\par Exposers can be linked together in master/detail relation\f1 ships\f0 . To link one exposer to another, assign the master exposer to the DataSet property of a TDataSource and assign the TDataSource to the \cf2\strike MasterSource\cf3\strike0\{linkID=6570>main\}\cf1 property of the detail exposer. The Subject of the detail exposer will be set to the current object of the master exposer\lang1033\f1 and updated\lang1040\f0 whenever this changes. If you want the detail exposer to expose an object that is related to the current object of the master exposer instead, simply specify the desired property path in \cf2\strike MasterProperty\cf3\strike0\{linkID=6560>main\}\cf1 . +\par \cf2\strike TInstantExposer\cf3\strike0\{linkID=6440>main\}\cf1 is not limited to exposing \cf2\strike TInstantObject\cf3\strike0\{linkID=7380>main\}\cf1 descendants. Any object with published propertied can be exposed. The content of standard VCL containers like TList, TObjectList and TCollection can be exposed in content mode. \par \par } 330 @@ -995,8 +996,8 @@ {\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fswiss Arial;}{\f1\fswiss\fcharset0 Arial;}{\f2\fmodern Courier New;}} {\colortbl ;\red0\green0\blue0;\red0\green128\blue0;\red128\green0\blue0;} \viewkind4\uc1\pard\lang1040\b\f0\fs24 The Selector \cf1\b0\fs16 -\par \cf2\strike Creating the User Interface\cf3\strike0\{linkID=280>main\}\cf1\{keepn\} -\par \pard\sb25\sa25\fs18 The \strike TInstantSelector\strike0\{linkID=10190>main\} is a dataset component \lang1033\f1 that \lang1040\f0 allows you to select objects from the database and optionally expose them in the user interface. +\par \cf2\strike Creating the User Interface\cf3\strike0\{linkID=280>main\}\{keepn\}\cf1 +\par \pard\sb25\sa25\fs18 The \cf2\strike TInstantSelector\cf3\strike0\{linkID=10190>main\}\cf1 is a dataset component \lang1033\f1 that \lang1040\f0 allows you to select objects from the database and optionally expose them in the user interface. \par To select objects from the database, a command must be specified \lang1033\f1 in\lang1040\f0 the Command property. The syntax of this command\f1 (called an IQL command, from Instant Query Language) \f0 is somewhat similar to an SQL SELECT-statement\f1 , \f0 but instead of tables and columns, you specify classes and attributes: \par \pard\keep\f2 \par SELECT [DISTINCT] *|<Attribute> @@ -1046,10 +1047,10 @@ FALSE 7 {\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fswiss Arial;}{\f1\fswiss\fcharset0 Arial;}} -{\colortbl ;\red0\green0\blue0;} +{\colortbl ;\red0\green0\blue0;\red0\green128\blue0;\red128\green0\blue0;} \viewkind4\uc1\pard\lang1040\b\f0\fs24 Programming with Persistent Objects\cf1\b0\fs16 -\par \pard\sb25\tx1435\strike Group Topics\strike0\{linkID=350>nav\}\tab\strike Using InstantObjects\strike0\{linkID=50>main\}\f1 \cf0\b\f0\fs24 \cf1\b0\fs16\{keepn\} -\par \pard\sb25\sa25\tx1435\fs18 The driving force in InstantObjects based applications \lang1033\f1 is\lang1040\f0 the persistent classes \lang1033\f1 that\lang1040\f0 contain the business logic. These business classes all descend from the fundamental \strike TInstantObject\strike0\{linkID=7380>main\} class. This section covers aspects of working directly with the business classes of \lang1033\f1 an\lang1040\f0 application. +\par \pard\sb25\tx1435\cf2\strike Group Topics\cf3\strike0\{linkID=350>nav\}\cf1\tab\cf2\strike Using InstantObjects\cf3\strike0\{linkID=50>main\}\{keepn\}\cf1 +\par \pard\sb25\sa25\tx1435\fs18 The driving force in InstantObjects based applications \lang1033\f1 is\lang1040\f0 the persistent classes \lang1033\f1 that\lang1040\f0 contain the business logic. These business classes all descend from the fundamental \cf2\strike TInstantObject\cf3\strike0\{linkID=7380>main\}\cf1 class. This section covers aspects of working directly with the business classes of \lang1033\f1 an\lang1040\f0 application. \par \par } 350 @@ -1068,11 +1069,11 @@ {\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fswiss Arial;}{\f1\fswiss\fcharset0 Arial;}} {\colortbl ;\red0\green0\blue0;\red0\green128\blue0;\red128\green0\blue0;} \viewkind4\uc1\pard\sb25\lang1040\b\f0\fs24 Programming with Persistent Objects \cf1\b0\fs16 -\par \cf2\strike Programming with Persistent Objects\cf3\strike0\{linkID=340>main\}\cf1\{keepn\} -\par \pard\keep\li95\sb25\sa25\strike\fs18 Creating New Objects\strike0\{linkID=360>main\} -\par \strike Retrieving Existing Objects\strike0\{linkID=380>main\} -\par \strike Associating Objects\strike0\{linkID=420>main\} -\par \strike\f1 Using t\f0 he \f1 InstantQuery\strike0\f0\{linkID=440>main\} +\par \cf2\strike Programming with Persistent Objects\cf3\strike0\{linkID=340>main\}\{keepn\}\cf1 +\par \pard\keep\li95\sb25\sa25\cf2\strike\fs18 Creating New Objects\cf3\strike0\{linkID=360>main\}\cf1 +\par \cf2\strike Retrieving Existing Objects\cf3\strike0\{linkID=380>main\}\cf1 +\par \cf2\strike Associating Objects\cf3\strike0\{linkID=420>main\}\cf1 +\par \cf2\strike\f1 Using t\f0 he \f1 InstantQuery\cf3\strike0\f0\{linkID=440>main\}\cf1 \par \par } 360 @@ -1089,9 +1090,9 @@ FALSE 10 {\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fswiss Arial;}{\f1\fswiss\fcharset0 Arial;}} -{\colortbl ;\red0\green0\blue0;} +{\colortbl ;\red0\green0\blue0;\red0\green128\blue0;\red128\green0\blue0;} \viewkind4\uc1\pard\cf1\lang1040\b\f0\fs24 Creating New Objects\b0\fs16 -\par \pard\sb25\tx1435\strike Example 1\strike0\{linkID=370>example\}\tab\strike Programming with Persistent Objects\strike0\{linkID=340>main\}\{keepn\} +\par \pard\sb25\tx1435\cf2\strike Example 1\cf3\strike0\{linkID=370>example\}\cf1\tab\cf2\strike Programming with Persistent Objects\cf3\strike0\{linkID=340>main\}\{keepn\}\cf1 \par \pard\sb25\sa25\tx1435\fs18 Business objects are created just like any other object. The Create constructor of the class creates a new instance of the class. \par The constructor can be called with an optional Connector parameter. This connector specifies the database in which to make the object persistent. If no connector is specified, the default connector will be used. \par To make an object persistent, call its Store method. Only instances of classes declared \lang1033\f1 with\lang1040\f0 \lang1033\f1 a \lang1040\f0 persisten\lang1033\f1 ce property of \i stored\lang1040\f0 \i0 in the business model can be \lang1033\f1 S\lang1040\f0 tored. @@ -1114,7 +1115,7 @@ {\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fswiss Arial;}{\f1\fmodern Courier New;}} {\colortbl ;\red0\green0\blue0;\red0\green128\blue0;\red128\green0\blue0;} \viewkind4\uc1\pard\lang1040\b\f0\fs24 Example 1 \cf1\b0\fs16 -\par \cf2\strike Creating New Objects\cf3\strike0\{linkID=360>main\}\cf1\{keepn\} +\par \cf2\strike Creating New Objects\cf3\strike0\{linkID=360>main\}\{keepn\}\cf1 \par \pard\keep\f1\fs18 \par \b var\b0 \par Person: TPerson @@ -1144,13 +1145,13 @@ FALSE 10 {\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fswiss Arial;}{\f1\fswiss\fcharset0 Arial;}{\f2\fnil Arial;}{\f3\fnil\fcharset2 Symbol;}} -{\colortbl ;\red0\green0\blue0;} +{\colortbl ;\red0\green0\blue0;\red0\green128\blue0;\red128\green0\blue0;} \viewkind4\uc1\pard\lang1040\b\f0\fs24 Retrieving Existing Objects\cf1\b0\fs16 -\par \pard\sb25\tx1435\tx2875\strike Example 1\strike0\{linkID=390>example\}\tab\strike Example 2\strike0\{linkID=400>example\}\tab\strike Example \lang1033\f1 3\lang1040\strike0\f0\{linkID=410>example\}\lang1033\f1\tab\tab\lang1040\strike\f0 Programming with Persistent Objects\strike0\{linkID=340>main\}\{keepn\} +\par \pard\sb25\tx1435\tx2875\cf2\strike Example 1\cf3\strike0\{linkID=390>example\}\cf1\tab\cf2\strike Example 2\cf3\strike0\{linkID=400>example\}\cf1\tab\cf2\strike Example \lang1033\f1 3\cf3\lang1040\strike0\f0\{linkID=410>example\}\cf1\lang1033\f1\tab\tab\cf2\lang1040\strike\f0 Programming with Persistent Objects\cf3\strike0\{linkID=340>main\}\{keepn\}\cf1 \par \pard\sb25\sa25\tx1435\tx2875\fs18 Objects that have been stored to the database can be retrieved into memory \lang1033\f1 by using any of the following techniques: -\par \pard{\pntext\f3\'B7\tab}{\*\pn\pnlvlblt\pnf3\pnindent0{\pntxtb\'B7}}\fi-200\li200\sb25\sa25\tx200\tx2875 If the Id of the object is known \lang1040\f0 the Retrieve constructor\lang1033\f1 can be used\lang1040\f0 . An optional connector through which the object shall be retrieved can be specified. If no connector is specified, the default connector is used. If the object already exists in memory, the existing object is returned. If the object is not found, the constructor returns nil.\lang1033\f1 See \strike example 1\lang1040\strike0\f0\fs16\{linkID=390>example\}\lang1033\f1\fs18 .\lang1040\f0 +\par \pard{\pntext\f3\'B7\tab}{\*\pn\pnlvlblt\pnf3\pnindent0{\pntxtb\'B7}}\fi-200\li200\sb25\sa25\tx200\tx2875 If the Id of the object is known \lang1040\f0 the Retrieve constructor\lang1033\f1 can be used\lang1040\f0 . An optional connector through which the object shall be retrieved can be specified. If no connector is specified, the default connector is used. If the object already exists in memory, the existing object is returned. If the object is not found, the constructor returns nil.\lang1033\f1 See \cf2\strike example 1\cf3\lang1040\strike0\f0\fs16\{linkID=390>example\}\cf1\lang1033\f1\fs18 .\lang1040\f0 \par \pard\sb25\sa25\f2\fs10 -\par \pard{\pntext\f3\'B7\tab}{\*\pn\pnlvlblt\pnf3\pnindent0{\pntxtb\'B7}}\fi-200\li200\sb25\sa25\tx200\tx2875\f0\fs18 If the Id of the object is not known or multiple objects meeting a certain criteria \lang1033\f1 need to\lang1040\f0 be retrieved, a \lang1033\strike\f1 S\lang1040\f0 elector\strike0\fs16\{linkID=330>main\}\fs18 \lang1033\f1 or an \lang1040\strike InstantQuery\strike0\f0\fs16\{linkID=440>main\}\lang1033\f1 \lang1040\f0\fs18 can be used\lang1033\f1 . See \strike example 2\lang1040\strike0\f0\fs16\{linkID=400>example\}\lang1033\f1\fs18 and \strike example 3\lang1040\strike0\f0\fs16\{linkID=410>example\}\lang1033\f1\fs18 .\lang1040\f0 +\par \pard{\pntext\f3\'B7\tab}{\*\pn\pnlvlblt\pnf3\pnindent0{\pntxtb\'B7}}\fi-200\li200\sb25\sa25\tx200\tx2875\f0\fs18 If the Id of the object is not known or multiple objects meeting a certain criteria \lang1033\f1 need to\lang1040\f0 be retrieved, a \cf2\lang1033\strike\f1 S\lang1040\f0 elector\cf3\strike0\fs16\{linkID=330>main\}\cf1\fs18 \lang1033\f1 or an \cf2\lang1040\strike InstantQuery\cf3\strike0\f0\fs16\{linkID=440>main\}\cf1\lang1033\f1 \lang1040\f0\fs18 can be used\lang1033\f1 . See \cf2\strike example 2\cf3\lang1040\strike0\f0\fs16\{linkID=400>example\}\cf1\lang1033\f1\fs18 and \cf2\strike example 3\cf3\lang1040\strike0\f0\fs16\{linkID=410>example\}\cf1\lang1033\f1\fs18 .\lang1040\f0 \par \pard\sb25\sa25\tx200\tx2875\f2\fs10 \par } 390 @@ -1169,7 +1170,7 @@ {\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fswiss Arial;}{\f1\fmodern Courier New;}} {\colortbl ;\red0\green0\blue0;\red0\green128\blue0;\red128\green0\blue0;} \viewkind4\uc1\pard\lang1040\b\f0\fs24 Example 1 \cf1\b0\fs16 -\par \cf2\strike Retrieving Existing Objects\cf3\strike0\{linkID=380>main\}\cf1\{keepn\} +\par \cf2\strike Retrieving Existing Objects\cf3\strike0\{linkID=380>main\}\{keepn\}\cf1 \par \pard\keep\f1\fs18 \par \b var\b0 \par Person: TPerson; @@ -1199,7 +1200,7 @@ {\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fswiss Arial;}{\f1\fmodern Courier New;}} {\colortbl ;\red0\green0\blue0;\red0\green128\blue0;\red128\green0\blue0;} \viewkind4\uc1\pard\lang1040\b\f0\fs24 Example 2 \cf1\b0\fs16 -\par \cf2\strike Retrieving Existing Objects\cf3\strike0\{linkID=380>main\}\cf1\{keepn\} +\par \cf2\strike Retrieving Existing Objects\cf3\strike0\{linkID=380>main\}\{keepn\}\cf1 \par \pard\keep\f1\fs18 \par \b var\b0 \par I: Integer; @@ -1238,7 +1239,7 @@ {\rtf1\ansi\ansicpg1252\deff0\deflang3081{\fonttbl{\f0\fswiss Arial;}{\f1\fswiss\fcharset0 Arial;}{\f2\fmodern Courier New;}{\f3\fnil\fcharset0 Courier New;}{\f4\fmodern\fcharset0 Courier New;}{\f5\fnil Arial;}} {\colortbl ;\red0\green0\blue0;\red0\green128\blue0;\red128\green0\blue0;} \viewkind4\uc1\pard\lang1040\b\f0\fs24 Example \lang1033\f1 3\lang1040\f0 \cf1\b0\fs16 -\par \cf2\strike Retrieving Existing Objects\cf3\strike0\{linkID=380>main\}\cf1\{keepn\} +\par \cf2\strike Retrieving Existing Objects\cf3\strike0\{linkID=380>main\}\{keepn\}\cf1 \par \pard\keep\f2\fs18 \par \b var\b0 \par I: Integer; @@ -1274,9 +1275,9 @@ FALSE 9 {\rtf1\ansi\ansicpg1252\deff0{\fonttbl{\f0\fswiss Arial;}} -{\colortbl ;\red0\green0\blue0;} +{\colortbl ;\red0\green0\blue0;\red0\green128\blue0;\red128\green0\blue0;} \viewkind4\uc1\pard\lang1040\b\f0\fs24 Associating Obj... [truncated message content] |