CA2110970A1 - Workplace applications builder - Google Patents

Workplace applications builder

Info

Publication number
CA2110970A1
CA2110970A1 CA002110970A CA2110970A CA2110970A1 CA 2110970 A1 CA2110970 A1 CA 2110970A1 CA 002110970 A CA002110970 A CA 002110970A CA 2110970 A CA2110970 A CA 2110970A CA 2110970 A1 CA2110970 A1 CA 2110970A1
Authority
CA
Canada
Prior art keywords
class
data
drag
query
drop
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Abandoned
Application number
CA002110970A
Other languages
French (fr)
Inventor
Edmun Kam Charn Liu
Alan Yiu-Wing Ho
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
TECHBRIDGE TECHNOLOGY CORP
Original Assignee
Edmun Kam Charn Liu
Alan Yiu-Wing Ho
Techbridge Technology Corp.
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Edmun Kam Charn Liu, Alan Yiu-Wing Ho, Techbridge Technology Corp. filed Critical Edmun Kam Charn Liu
Priority to CA002110970A priority Critical patent/CA2110970A1/en
Publication of CA2110970A1 publication Critical patent/CA2110970A1/en
Abandoned legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/0486Drag-and-drop
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/34Graphical or visual programming

Abstract

A program design tool comprising a set of predefined class templates to effect different functional utilities in an applications program and said class templates having predefined relationships to other class templates for interaction therewith and each such template being represented visually on a computer screen by an icon, a workarea to provide a substrate for building an applications program, a pointing device to enable a user to select, to pick up, to drag and to drop icons from one place to another on a computer screen workplace containing the workarea, in which the class templates include a data class, a query function class, a form class, a function class, a graphics class, a data container class, a static container class, a data file class and database class.

Description

21~970 WORKPLACE APPLICATIONS BUILDER

BACKGROUND
This invention relates to a method and means for selecting, 5 representing and o,gani~ing elements for computer applications and for using such elements alone or in combinations to build more complex applications. Such applications ~ may have the behaviour of worhplace applications. The term "workplace applications" is a known term used, for example, in literature of International Business 10 Machines Corporation ("IBM") about its Common User Access (CUA'91 ) architecture. CUA'91 is a set of rules for an inleraction mechanism betvreen a computer pr~,g~i" and a human user. In this patent specification, IBM's CUA'91 archilect.lre is used as a framework for disclJssion, ho~lever, it will be apparent to those skilled 15 in the art that the presenl invention may be used in other object-oriented user interface architectllres.

The term "vrorhplace application" is used to clescribe a computer prog~,n that mimics the organi~ation and structures of a wo,h,~lace.
20 For example, in an office type of workplace, a worker may interact with various objects such as printers, filing cabinets, file folders and business documents and exchange information with various people during the working day. Other types of workpl-,es, e.g., factories or construction, sites may involve different objects. To mimic such 25 environments in a computer program, a wo,k~lace application prog~i"
may have a group of g,~phi~,-' icons. Each icon or symbol will have recogni~able characteristics that identify with an object or a person found in the real world. The icons are keys for the user to activate software to carry out functions similar to the things represented from 30 the real world. A user can use a pointing device (e.g. a mouse) to point at and click on the icon thereby activating the software 21109~

~csoci?~ed with the icon. For example, one may open a folder to display information on a screen by clicking on a file icon. One can perform more complex functions by carrying out a sequence of such discrete tasks where each such task is represented by an icon of a S familiar workplace object. Such a user interface environment is said to be object-oriented.

One common mechanism for operating in an object-oriented user inlerface environ"~ent is known as "drag-and-drop". Drag-and-drop 10 refers to the act of s¢lecting an icon with a pointing device and moving (dragging) it to another location on the screen where it can be reloc~ted (d~pp~l). Generally the object of this operation is to reorganize data or operations within application programs. For example, a file folder cGnlaining information might be moved from 15 one .lireclory of such files to another directory. But icons cannot be moved indiscriminately. The int~r")dlion and operations represenled by particular icons may be c~mpalible with the information and operations of some directories, tasks or applications, but may be incGi"palible with others. Consequently, a prog~,n is usually provided 2 0 in ~csoci?Iion with each icon to enable the computer to asce, lain c~lllpalibility with other icons.

If a prog(a", represented by an icon is not compatible with a selected drag-and-drop location, the usual default action is to show 2 5 an inler"alional no-entry sign and to return to icon to its former location. If it is cGn,palible, then an action combining the transferred in~r",dlion, represented by the dldgged icon, and the application, represented by the drop loc~tion, will take place. This technique may be used to move data or to cause an action in an object-Griel)l~d 30 workplace enviror""enl. For example, in a v:orhplace application one might to drag a file icon to another directory as mentioned, or it might drop it onto a printer icon to print the file.

The support for a drag-and-drop function in a software application 5 is usually provided by a basic graphics controlling mechanism. This controlling mechanism for graphically depicting the action of dragging and dropping icons on the screen may be given by a conventional operating system in the form of function calls. This type of programming is within the state of the art and will not be described 10 further in this specification.

The real challenge in developing workplace application programs is in creating and then mainlaining the potentially very large number of relationships and associ~'ecl actions among all of the various 15 objects designed into a v:orh,ulace application. An object-G~ientecl workplace application would ordinarily be constructed by writing software in text-based prog~i"",ing langu~ges such as C C++
Smalltalk and OS/2 PM function calls. The current state of art requires these relationshi,,~s and assoc;aled actions to be captured in 20 the controlling logic of the computer progfa",s that implement the behaviour of an object. IBMs CUA91 archilecture provides a rich set of rules governing user-computer interactions.

A programmer who is trying to develop a workplace application 25 program for a particular end use may begin by selecting certain icons or objects and program them to execute the desired functions of a real world workplace. It is then a daunting task to program each of such objects to conform to all the interaction rules, particularly since the current state of art is to ~lescril)e these rules in progra", logie 30 using some form of progra"""ing language. Therefore a programmer 21109~!~
-wishing to create a speci~l application program for a user is generally required to manually code the execution logic in some form of programming language.

There are some GUI (graphic user interface) design tools in the market today that can automatically generate program logic by capturing design concepts at a much higher level than programming languAges Parts Workbench ' by Digitalk Inc. and Enfin/32 from Easel Corp. are two examples. I loJ:over these tools can only produce ~p'icAtions whose user interfaces conform to a subset of the CUA91 rules. These tools are incapable of building a workplace application automatically.

Creating a workplace application by brute force progra"""ing in C C++ or Smalltalk is te~l QUS error prone and time consuming.
This technically challenging task has impeded the develop,nent of workplace applications and, accordingly has slowed their Accer~nce in the market. Only a handful of computér cor"panies have products that support an object-oriented v~olk,ulace ",e~aphor.
DESCRIPTION OF THE INVENTION
This invention is directed to providing a means and a mett,o~
for a computer prog,an"~er to create workplace application programs with minimal coding in a text based programming langu~ge.
2 5 Application programs can be built by dragging and dropping icons on each other to provide combinations of functionality which are then represented by their own unique icons. In this manner a program of 1 Trade mark of Digitalk Inc.
2 Trade mark of Easel Corp.

211097~

complexity can be developed with simple easy to ur,dersland, visual concepts or elemenls. Then the main focus can be directed to the functionality that can be obtained by combining and interacting various functional elements rather than the det~iled coding of interaction 5 parameters. The simplicity of this approach saves time and money in developing application progra",s. It also opens up the field of developing programs to those who have special knowleJye of a workplace but who may not have skill in a prog,amming language.

In this invention there are differel)t kinds of pre-defined cl~-ses which become the basic building blocks for a programmer to use in creating a v:orkplace application. In object oriented progf;a~r,l"ing a class provides the blueprints for run-time objects that share the same properties. Part of this invention lies in the selection and design of 15 certain classes with fun.Ja",enlal prope,lies. These cl~cses can act on their own or beco",e the building blocks for more complex objects.
Thus many other objects can be constructed to operate in an application program. It has been found that wo-kplace application progra"~s of surprising complexity and versatility can be develo,~ed by 2 o combining these particular cl~cses in various ways.

The fundamen~al cl~sses of this invention fraction distil general pr~gra",ming objectives into a small number of functions. The basic idea is to create a package of cl~sses with pre-defined characteristics 25 and relationships. Each class has a precJeter",ined function which will cooperate with other cl=cses in predefined relationships. The nature of the permitted relationships is pre-established to conform to good pr~gral" design protocol rules and objectives. In the result the user of the invention is able to establish relationships t.etv~een objects 30 within defined paral"eters which are of sufficiently broad scope to permit a great variety of utilities to be constructed.

In a preferred embodiment certain cl~cses have been designed as the fundai,)ental building blocks. These cl-^ses are 5 currently called; "Query", "Form", "Co",pone"l" (sometimes l~l~ell~d "Function"), "Data", "Business Graphics", "Data Container", "Static Container", "Data File" and "Dct~'~ase". Each is represented by an icon of a di~ferenl shape. Each has di~ferenl properties for building a wo,hplace application. Each is pre-progra"~lned to conform to all 10 the interaction rules in relating to the other cl~-sses. Each is programmed to adapt to the format and function of the others where they are compatible and to indicale non-cGI"palil~ilily when combined functionality is impossible, illogic~l or inelegant.

Hereafter, in this specification, a distinction is made between "design time" and "run time", the former being the period during which a program is being desig,)ed and the latter being the period during which a plO91am, SO designed, is being run or operated.

2 0 In a prefer,ed embodiment of this invention, a tier of working screens are p~senl~J to the user during design time. The overall screen is the design wo,k~,lace. Within the v~orh,~.lace are workar~as, Within workareas are static containers. The Static containers are provided as places for po, lions of the programm being clesig"eJ to be grouped together for organi~ation and convenient reference. Static containers may contain other static containers ad infinitum.

Workplace applications consist of objects, telnpldles, and ~ccessories grouped logether in various combinations within a 30 workarea or workplace. Developing a v:Glhplace application involves 21109~0 creating and designing application cl-.ses and defining the relationships betvJe~n different cl-cses Te",plates are used to create and to organize cl~-cses which are the primary building blocks of a worhplace application. There are two types of te",plales system 5 te",plales and class te",plates. A wo,kplace may also provides a set of reusable code modules called utility c~^ses to perform basic logical functions.

Within the worhplace screen a first workarea screen will 10 provide the templates of the selected c~ses to be drawn upon as required from time to time by the programmer. Another workarea screen will provide a location or subst,ale for creation of the project or the progra", being designecl. Other screens may provide conventional design tools that are available to customize a class after 15 in is brought into the project workarea. A programmer wishing to create a special application program in a project workarea drags and drops icons representing class templates of particular utilities into the workarea to create workarea objects. Each new object may be further customized as described below to correspond to a particular 2 0 object and a unique icon may be assigned to it. Similarly, other similar or dir~erent objects may created by co"lb;ning icons they may be uniquely fo"ndlle.J to a particular use and relabe' ed with a unique icon. As the workarea becomes more complex static containers may be used to organize and collect related icons.
In this invention the reJationships among wo.hplace objects is defined for drag-and-drop oper~tions at the concep~-Jal design level When an application designer drags a class icon and drops it onto ano~l,er class icon it instructs the computer to establish a relationship 30 betvleen these two cl~ses. A series of dialogues may then be ~ 2110970 presenl~l to a designer to obtain instructions about the nature of the programming effect when two objects are brought together during run-time. Once a relationship is established betvleen two objects certain pre-defined program effects are automatically injected into the 5 wGrh,ulace application. The p~g~i"",ing effects are ~lal~ted to the selected relationship betweon the dillerent kind of objects. The prescribed set of cl~cses of this invention each has a preprog~"""~
set of relationships that can be established with any other class.
Thus, using the visual approach of combining icons any arbitrary 10 number of relationships can be captured among a set of objects.

DESCRIPTION OF A PREFERRED EMBODIMENT
A preferred el,~bodi",ent of this invention includes System Te"~plales and Class Telnplales.

~ 211097~ L

This chapter describes the templates used to create and o~;ani~e V
classes, the primarybuildingblocks of workplace appli~ ~ti- n~ System templates are provided to c.. ~ your application classes and to create workplace ~c~sv. ;~ Class l~...plales are provided to create the various classes that c~, -,p-~e a workplace application.
This chapter consists of ~e following ~ul,~ lio.~;
Overview ~
System Templates ~_ Class Templates --r ~ 21109~0 L

APPLlGlTlON BUILOING BlO~KS

Workplace applications consist of objects, templates, and accessories grouped together in various combinations within a workarea or work-place. Developing a workplace application involves creating and de-signing application classes, and defining the relationships between different classes.
~9:~
En~lsion/Builderprovides two sets of templates to create and organize application classes:
System templates 7 ~S~
Class templates System templates are used to create design-time objects - such as project drawers and class folders - that help you olgal~e your work.
In addition, system templates can also be used to create workplace accessories - such as notes and printer objects - at design-time or run-time.
Class templates are used to create classes, the primary building blocks of workplace applications. Classes provide the blueprints for run-time objects, defining their appearance and functionality.
En~lsion/Builder also provides a set of reusable code modules, called utility classes, to perform basic logical functions. For more information on utility classes, see page ??-?? in the Language Reference Manual.

r Sysfem Templotes ==_ For i,llv, . 71'; ~.. on object System templates provide various components to help you organize menu options for system the development of workplace appli~ ~tic-ns. Templates are provided to objects, see pnge ??-??. group your work into separate projects, and to group the classes that comprise each application.
System templates are also available to create workplace acct~s~ ri such as notes, printer objects, and and objects to run external applica-tions. You can add these accessories to your En~lsion/Builder work-place at design-time, or to your application's workplace or workarea at run-time.
Note: A System Templates folder, containing templates for creating workplace accessories, automatically appears in your application's workplace or workarea at run-time.

Project The Project template is used to create project drawers. Aproject drawer ~
~;b is used to group the components that comprise a single application. You ~_ can create any number of dirf~lel.t project drawers, each ~p-~sel-li,-g ~j_ a particular application. ~

In~oice Dcmo Bankrg Tcsldl~wc~ ~
~'~$5 5~

Projettdrtnvers Y~
~,.~,~
Each project drawer consists of one or more class folders, in which you can oly,a~lize and store application classes. When you create a project drawer, it automatically includes a class folder.
.~0<,~
~A ' '~

r ~ 2110970 L

APPULInON BUIUlIHG BLO(KS
_ For ",fo, " ~. on class folders, see page ??-??.
Cl~ss Folr~er Prq;ed~er~
Project drawers are stored within the Project Library cabinet. To create a new project drawer, drag the Drawer le~ lale and drop it into the Project Library cabinet. From the all-iL.ules view that appears, you will be asked to provide an identifying label, and to specify p..;~ wide p~r~m~t~r~ ~
-~_ I
Name ¦
r n4iier F ~ I

SubJect ~ _ ''-'1 ;z~
OK I f Cancel ¦ _ --I
~prq~O~ne~
Name ii~

-T~1 ~ntifi~ the project drawer within the project library. The project name V
does not have to be unique, but using the same name for dirr~.~l projects may lead to confusion.
Compiler policy Del~ S the behavior of the compiler when you process custom code within code windows.

i r 211097~ ~

Sys~em Templ0es Auto declare For ."f~" . on declaring DPt~rminf~c whether the compiler alltc mAtil Ally declares as temporary varia~les, see page ??-?? in variables any lmrl~lAred variables used within custom code. ~lth this the Language Referenoe option ~l~ter1, you can use variables within code without declaring Manual. them, and let the compiler declare thembased on the way in which they are used. For example, if you perform a numeric ope.dlion using an l-n-lfrlAred variable, the compiler will declare it as a mlm~ri~ variable.
You can still declare temporary variables with the Auto declare option .~l~te-l, but you are not required to do so.
If you deselect this option, you must declare every t~lpOldly variable you use within code. Failure to do so would result in errors at compile time.
Note: Instance variables - variables shared by multiple code segments within the same class - must always be declared, even if the ~4uto declare option is selected. ~
Default: on ~j_ Subject ~_ Describes the purpose and scope of the project. You can enter any text ~_ you wish or leave this blank.

Class Folder The Class Folder template is used to create folders in which classes -I the primary building blocks of workplace applications - are stored and 5 ¦ organized. You can place any number of class folders within each project drawer, and distribute classes within the folders as you wish.
Personnel Systeml o ~O~

Employee EmployeeEmployees d~dbcomoine~

Amerrron SnlmyP~view Empbyee Employees D~oo~se Cnnodon r~e~US P~rscnrlel Employees Employee Wor~ploce Open dass folbr i r 211097~ L

S~em ~

~ Projed Ubmly ~ Invoice ApplicnUon ~ 1~
__ a~ Fddel I
P~emember Io perlorm ~ gbb~l ller modllylng d~t~
~ibule ' ~ ~

A~b~r~ ~ nok b ~ propd ~a Printer The Printer template is used to create a printer object. ~lth a printer object on your wo.l~lace, you can print workplace co~ >on~lb by ~1r~ing and dropping the ap~ ;aL~ .:u..,~o.,enl onto the printer obJect.
At design-time, you can drag and dTop a data class, form class, or nûte object onto a printer object. At run-time, you can drag and drop a data object, form object, or note object onto a printer object. Dragging and dropping a data class or data object onto a printer object results in the data aUl~ les view being printed. Dragging and dropping a form on a printer object results in the form being printed. Dragging and drop-ping a note object prints the contents of the note.
You can print a class or object wlæll~ its window is open or dosed You can drag and drop the cc~lllpùl~l's icon onto the printer object, or you drag and drop from within the ~ onf~ ,I's open window. To drag from within a component's window, position your pointer within the window, hold down your left mouse button, then move your mouse pointer away from the window. A dragable icon appears, which you can drag and drop onto a printer object.
A System Templatesfolder To create a printer object, drag the Printer template onto the En~l-.. . '; 'Iy appears in sion/Builder workplace. The printer you set up at design-time does not your ,~ io,.'s ~vu,.'~ ' ~ appear at run-time, though users can create their own printer object by or workaKa at run-time. ~r~ing the Printer ~ lal~ onto their workplace or workarea. Once the printer template is dropped onto the workplace or wu.ka-~a, a dialog appears plulllplillg you to select from a list of ins~ll~ll printers.

~ I
r ` ~ 2110970 L

AmlGU10NBVlLDlNGBLOCI(S

Printers ~ibble:
Hi~erJ
__ _!~
Oi~ ¦ ~ C~ncel ¦

ksi!ping oprilter h aprmbr ob~
Note: Only one printer object can be created for each in~tAll~i printe~ If you A printer object must be set have multiple printers in~t~ll~1 on your OS/2 desktop, then you can up on your En~sionlBuilder create printer multiple printer objects within your En~lsion/Builder ~u, '4 ' - before you can ,~
workplace.
select the Pnntoptlon ~om the Form Designer module, orfrom a code window. Onoe a printer object is set up, you can position your pointer over the object and select from the following object menu options:
Modify settings Displays various modifiable printer pa.,~ t~........................ Z
,_~
Remove Removes the printer object from the workplace.
Files Displays a file selector from which you can ~;~
select a file to be printed. z -External Application The FYtf~m~l Application template is used to create an object that runs I an extemnal application. You can specify any OS/2, DOS, or ~mdows ¦ application that OS/2 is capable of running. You could, for example,set up an object to run a spr~ h~t or word processing application without leaving your devel~lllent ~vilu~ ent. The application icon appears on your En~lsion/Builder workplace along with your other workplace modules.
To set up an object to run an external application, drag the External Application icon and drop it onto an open area of the En~lsion/Builder workplace. Users can also set up objects to run external application by ~1rA~in~theExtemalApplicationtemplatefromtheSystemTemplates folder and dropping it onto the workarea or workplace. In either case, the following dialog appears.

r Spern l~ es ll~e Path:
Program: l Palameter ¦
OK ~ cel ¦ ~ Help ¦
Defining an e~r~ col~on o,~ed Fromthisdialog,youcanspecify;..ro....AIinnabouttheexternalappli- ~}
cation.
Title The name of the external application. The title you assign will appear as the label below the object icon.
Path The drive and di~ælol.y in which the ~ hlf ~
file used to run the external application resides. ~_ Pluyldlll The name of the ~ hle file used to run the ~_ external ap~ alion. ~_ Pa.dr"~,ter, Any p::~r~mf~t~r~ that can be accepted by the ~_ external applicalion. ~_ --I 1 ~
r -- 2110971) L

AmlCAnON B~lnOlNG aLOCKS
-For i"r~".. '; on o~oject Class templates are used to create classes, the primary building blocks menu optionsfor classes, see of workplace applications. A class provides the blueprint for any num-page ??-? ?. ber of related run-time objects. A data class, for example, describes the contents and behavior of related data objects that vary only in terms of the actual data each one iepl~sent~. Run-time objects derive their appearance and furfti- n~lity from the definitions and designs as-signed to the co~ ponding class at design-time.
Developing an object-oriented application involves creating and defin-ing classes, and defining the rPI~ir)n~hips between classes. To create a class, drag the ap~lvpl;ate template from the Class Templates folder and drop into a class folder within a project drawer. You will be pled to supply a labeL which appears beneath the object's icon, and an identifier, unique within that project drawer.
Classes are grouped into three categories within the Class Templates folder. Only one category of templates is displayed at any one time. To switch categories, position your pointer in an open area within the Class Templates folder, and click on your right mouse button. From the pop-up menu that appears, move to the Categories option, then select the applvpl;ate template group.
The categories, and the class templates that comprise them, are dis-played below.
:P' Entity :0~,~

Quely Form Compone~t Oata r 2110~70 L

aass remphtes Container Static Cont~iner Det~ ccnlainer Wcrk~lrea Wcrkplaoe Dynarnic Conte~iner Data storage DaldileIBM Dotabcse ~_ Mlmagsr ~_ Each of these class types are discussed in the pages that follow. i~

.
.p v~
fj~
3,b~,, ',~,~

~ ~p, ~

r ~` ~ 211097~ L

APPLl&lTlON BUILDIHG BLO~I(S

Data Data classes are classes of objects used to ~ ent and display data.
Each instance of the data class - each data object derived from that class _~ - .~,le~ls a single record or unit of informAti- n. ~lthin a p~rconnf~l application, for example, an Employee data class would provide the blueç,l.lll for any number of diLl~nl employee data objects, with each object l~>l~Pr~ , an individual employee.
Within object-oriented applirAti<-ns, data objects are the primary units of interaction. Users double click on a data object to view or update the data it lep~se ~ls. Data objects can be firA~ and rllopped onto one another to transfer data, or invoke a form or dialog At design-time, ead~ data class is grouped as a dynamic co..,ponenl of a se~a-~-le data co~ er dass. At run-time, multiple ins~rlces of the data dass - individual data objects - are g.o~ed and displayed within the data contAin~r Tolinkadatacontainertoan Whereadatac...~lA;.~P~islinkedtoanexistingdatafileorrl~AtAhAcetable, externaldatafileordatabase data objects nltrmA*rAlly appear within the data col~lA;-~P~ for each table, drag and drop the data record or row within the associated datafile or r~AtAhAce table. Users can container class onto a data add new data objects to the data cc ..1,....P. - and new rows or records .^
stora~e class l..~t..~.~.ti.g t~
I.~""v~ datafile or to the r1AtAhAce or datafile -by r~rA~in~ the data object's template from database table. For 1nore the Object T~mplAt~c folder and lilrJ~rpi~g it into the data rr.~l~lA;~ r~
i,ff~" " ondatastorage Object templates are A.lll.st~;.,.lly created at run-time for each data classes, see page ? ?-??. class that is a colllpol~ll of a data col~l A;
~ 1 Ru~tim~ DatEt storarJe ~;~

F ~t -- --l~ ~ Dalafile or r EmployeesEmployees table data container data container dass object I~ata Employee Employee Employee data dass data object data object etc.
Assodoting o'nto dosses ond do~o tontoiners To create a data class, drag the Data template from the Class Templatesfolder and drop it into a class folder.

r - 211097() ~ L

~5s Ternplaks Design Elements You can design the following Pl~m~nt~ of a data class.
Element De~,i~ ti D~s-_ - Data Attributes Data attributes Data el~,. . ,~. ,ts Designer (see page e~ by data class ??-??) A~",ea.dnce and Dataattnbutes f - ~-~ fd t Form Deslgner(see view w;ndow page ??-??) Object Menu Object menu Pop-up menu options Designer (see Chapter 14) Possible Relabonships ~
For more 1,.~ . on The table below ~;,.~ the possible r~lAti~nchirs between data ~j_ "; ' ,~, and defining classes and other classes. In this table, the arrow in~ At~ the ~
i, between classes~ Of the drag-and-drag assoalion, and the numbers in brackets - (1,1), ~_ see Chapter 8. for e~d~ le - indicate the ~ lUlll and mAYimllm number of rela- ~_ tion~hirs of this kind that are required or allowed for each class. E~_ De '_ I' Q ie~ -. n , t - effect ~
,1) (1,1) F' User can drag and drop i3~dynamic ~ data template onto data DatacomponeniData container CC~ er to create new ~
class class data object r 1~ (O, n) (O, n) ~ User can drag and drop l~ ~peer-to-pcor ~ ~ one data object onto Data Data another to transfer data class class or invoke a forrn Form can access data ~ (O, n) (O, n) F~ attributes in data object-Y ~ ~ ~ user can transfer data c~lass . cloarSmS by dropping data object Note: You can also establish a peer-to-peer relafionship within a single data class, so that users can drag and drop multiple instances of the same data class onto each other to transfer data or invoke aform.
il I
r AmlW10N BUILOIN6 BLO

Data container A data ContAin~r is a c~ . class used to group multiple ;.,~
of a single data class at run-time. Within a pPrconnr~l application, for plc, an Employees data c.~ ,.; . If . could be used to group multiple inctAn- ~c of the Employee data class. At design-time, each data class is grouped as a dylld~LIic component of a serArAtr~ data c- ntAin~r class. At run-time, LLILILple ;. "~ c of the data class - individual dah objects - are grouped and displayed within the data cnntAin~r Whereadataco~ P~islinkedtoanexistingdatafileor-1AtAhacetable, data objects ~l1h mAti~Ally appear within the data co~ for each record or row within the ACsoriAterl datafile or ~lAtAhace table. Users can add new data objects to the data co..1,.;.~ and new rows or records ~11 to the rlAtAhAce or datafile -by llrA~ing the data object's template from the Object Templates folder and dropping it into the data co~tAin~r Object templates are allt.~mAti-~Ally created at run-time for each data class that is a c.~lLL~>o~ of a data ....~

T~ _ _/V~
E~
Tell~pbtff ~ 3 Cl Elllpb~1ees ¦~

E~y~bbbFn3d~-n~ ~a En~l z Adding doto objeds to o doto ~ontoiner For i,.~, on data To allow data objects to display, modify, and add to existing data, a data storage classes, see page co-~ . must be linked to an external datafile or ~IAtAhAse table. To ??-??. link a data cl~ntAin~or to an external datafile or ~1AtAhA~e table, you must associate the data c~,nldiL~el class with a data storage class representing the app,vpL;ale datafile or database table.
For 1nore i,.~, . . . on If the data contAin~qr is also asso~ idl~d with a query class, users can enter database queries, see page search criteria in a query form to view select ~iAtAhase records, or to ??-??. (letr?rminf~ which kinds of data objects are display within the data container. If one or more data containers are associated with a query class that is, in turn, associated with a dynamic c~-ntAin~r class, then users can drag a dynamic cunlaiLI~l template to create a window in which selected records from multiple database tables canbe displayed.

-r a~ Ternpl~ks To create a data co~ P. class, drag the Data c~ template fromthe Class Templates folder and drop it into a class folder. You will be asked to specify a label only. You can specify the DB Table when and if you ~SQ~ te the c-~- N, ;- ~ with a l~t~h~ce class.
___ Name ¦
DB Table Subject ¦ OK I ¦ Cancel S~
~eotino o dlb ~nhner dnss Design Elements You can design the following f~l~m~nt~ of a data c ~- N ,.;. .~. dass.
Element Des~.iption Des-j er Container window in which Window Designer ~!_ ObJect wmdow --data objects appear (see Chapter 13) ~

Possibk P1elationships ~_ The table below s.. ~ the possible r~l~til nchips between data cu.~ classes and other dasæs. In this table, the arrow indicates the directionofthedrag-and-dragassociation,andthenLullb. l~inbrackets - (1,1), for example - indicate the .~-i.~;..l....~ and maximum number of relationships of this kind that are required or allowed for each class.
-~
r ~ 2lias70 L
APPLlGlnON BUIIDING uoc~

Design-time ,~ lip Run-time effect F~ (1 1) (1 1) ~ User can drag and drop l~ ~dynamic 1,~ data template onto data Data containr r component Data container to create new cbss cbss data object Data cor, .er beco.,~es linked to ~j~ (01) (O,n) E~ J~ etable;
~ e records can Data container Database cbss cbss be dlsplayed as data objects within data COI.t Data Col ,er F~ (o 1) (0 1) F= I be(Y,.. es linked to ~ datafile; datafile records Data container Datafae can be displayed as ,~
cbss cbss data objects within data co,. ,er '~
User can invoke query (0,1) (O,n) ~ fomn from data ~ ~ ~ container to extract Data oontainer q~ery selected ~ e }~
dass dass ~
records ~IC, (0,1) (O,n) Datacun' ler CorSnt~nt~ ' .. 1 '~ llyappears Data containerStatic container within staUc dass class at run-time (0.1) (O,n) Data Col ,er appears æ
c~nent-- ~I within l,~o~ rt:a at run- _ Data container Workarea time dass dass (0,1) (O,n) Data co" ,er appears cornponent ~ within vr~ l~lace at run-Data container Workplaoe me dbss dass r ~ 211Dg70 L
~bss Templotes Static Container Static c--nt~in~r~ are classes of objects used to group other objects, such G~ n as data containers. ~lthin a p~MonnPl application, for example, you could group separate data c~ ,epn~.~.l;..g .Am~ri~ ~n and Ca-nadian employees within a single Employees static cont:~inf~r At run-time, the objects grouped within the ron~ appear within the ronl~ . 's window. Co~can be g~u~ed within other con-tainers (in~ fiing other static co.~ ), or may appear directly on the wolL~a or wo~lace.

Sy lem _ Sh~dder Minimk~d TempMle~ i_ WindowVewe Static con~ainer Concdion Amo~
Employeeg Emplcyee~ ~_ Shb'ttt~7b~t~d ~
To create a static ro~ . class, drag the Static ~'o..l,.;..~i template ~_ from the Class Templates folder, and drop it into a class folder. To group ~_ an class within a static cc~.~l,.;...?. class, drag the class and drop it onto the static COllldill~l class.
For rnore i"lu, ~ . on Depending on the class type, the class being dropped may become a stat* and dynamic static component or a dynamic component of the static container class.
parent/child,c' ~,;, A static component, such as a data c~ d.ll~:l, would alltom~ti~lly see page ??-??. appear within the static conla ner at run-time.

- A dynamic component, such as a dynamic c.-.-l,.;. 1.?~, would not auto-matically appear at run-time as part of the static container, but would appear in the Object Te,l,plal~ folder as a template. The template could be dragged and dropped by the user into the static container to create ~
a new object (for example, a new dynamic container object). A data O
container, on the other hand, would be a static component and would ~
alltc mati-~lly appear within the static c~-nt~in~?r as run-time.
To create a static container class, drag the Static container template from the Class Templates folder and drop it into a class folder.
i I
r AmlCAnON aUlLDlNG alo(a5 Oesign Elemenk You can design the following ~ of a static CcntAin~r class.
Element D e s ~ n De~;gner Appea,~nce of cc.,.~ ,er window in which co"")one,lt Window Designer Oblect wmdow objects appear. options (see Chapter 13) available from window menu -Possibb Relationships The table below ~, .. ~. ;,.~q the possible r~lAti-3n~hirs between static ClmtAiner classes and other classes. In this table, ~e arrow; n~ ps the direction of the drag-and-drag association, and the nu~l~bel ~ inbrackets - (1,1), for ~-~,k - indicate the --i~ and m~ number of 5 l~lh~ h;l)5 of this ~ind that are l~u~d or allowed for each class.

r ~
----~ 3 r 211~97~ L

(hss Tempbltes D~ _ 1 .e~ 'h . nu.. 1 - effect (On) (o~1) ~ Dataco~ erappears ~ ~ static ~ within static cu~ ~er Staticrontainsrr~abrontaine~ at rUn-time dass dass F~ (O n) dynarnic (01) ~ Users can drag ~ ~component l~ template onto static Staticcontainerr~ynsmic Co~ ~ertocreatenew dass rntainer dass dynamic CO n ,er ~ (O n) (01) l~ Form object appears Y~ ~component ~I within static CO~
StabccontainerForm at run-time class class ~f (O n) (01) F~ Query object appears ~ ~rmtpaoinCent ~Y wtthin static Cu~l~ ,e Static rntainer.~ Query at run-time dass - dass (01) (On) Staticcon ~r ~
~ r~onCsnt~ [~ appears within static ~_ Static container Static r ontajner ~i .~ ~r at run-tlme ~_ dass dass ~~
, (01) (On) -- Static~1l ~er ~
static .IG D appears within__ component~ a ~i_ Staticcontainer Work rea ~..,~lace at run-time ~_ class class ~_ ~_ (01) (on) Staticco,. ,ar ~ static ~ appears within static ~
Static container WorkplaceCC" I ~ar at run-time &~d class class ~
--æ

i r - ~ 21iO970 L
APPllGlllON ~UILDING BLO(KS

Dynamic Container A dynamic c.~ is used to display data objects lcprcscnlil~g data ~b extracted from a ~lAt~h~e using a ~1~t~hAce query. ~lthin a p~r~nn~l ;~ application, for example, a dynamic container could be used to display data objects lepr~ ;..g each employee in the Sales department, or each employee whose salary exceeds a certain value.
To provide for the results of a ~1At~hAce query to be displayed as data objects within a dynamic ~- nt~in~r, you a~ociale one one or more data cl~n~ P~ classes with a query class that is, in turn, asso~lcd with a dyl~ ic rc-- 1, ;.~.~. class. Each data . o, .1,.;.-~. is A~SQI ;~IPd with a single data class, and linked to a particular ~l~t~haqe table through a ~l~t~hæ~
class. The dynamic c.-.~ is grouped as a dy-namic component of a ~1 static co.~ , wol~ca, or workplace class.
For more i,.~ .. on At run-time, the dyl~lic cc.~ o.. .~ Ally appears as a tem-database queries see page plate within the Object Templates folder. The user drags the dynamic C'~
;.,P. template and drop its onto the wol~rea or woll~lacc, to 5 create the dynamic ~`O~ ;Qf~ When the user double clicks on the new dylldlllic c~ ;..P~ to open it, an associated query form appears. From the query form, the user ~e~:ilies the search criteria for the ~t~h~ce query. Records that match the search criteria are rrcll;rcved and dis-played as data objects within the new dynamic r~ .;.. r. object. ;~
Templates ~ r_~

Er~ N~w _~ r~r~r Errlployee ~ ' ~
p~ S Les Persormel ~ ¦o~ ~, I__ V
Name Dept ¦Sdes Salar)~ I
TWe Sr~lpeNlsor l .lncludi~¦
Invoking u qver)~ form from o dynomk tontainer .

. I 1~
r a~ kmpl~ks Users can drag and drop the same dynamic conlail.er template as many times as they wish initiate diIr~ t ~lAt~hace queries. The results of the queries - individual data objects within the dynarnic cont~inf~r - are purged when the user closes the dynarnic c~ , or closes the static cc,..l-;.~., wc,lkdl~a, or wulkyla~ of which the dyllalluc .~ ;r~ is a c~,ll,~on~.l.
To create a dyllalllic ~fntAin~r class, drag the Dynarnic CQ~
template from the Class T~-plales folder, and drop it into a class folder.
Design Elements You can design the following ~1~ ....~..1~ of a dynamic contAin~r class.
Element Descniptiion De ~
Container window in which Window Designer Objectwindow appear (seeChapterl3) Possible Rebtionships The table below summ~ri7p~ the possible l~L.~ n~l~irs bel~een dy-namic c~ . classes and other classes. In this table, the arrow in-1ir~t~ the direction of the drag-and-drag association, and the num-bers in brackets - (1,1), for tAall.plc - indicate the minimllm and m~imllm number of relationships of this kind that are required or allowed for each class.

~
r - ~, 21~0970 L

APPUCArlON 8UIUJING BLOCKS

De '; 1 e.e' ,, n~ effect (01) (O,n) Fi~ Queryformisinvoked 1~ ~ a . 1~ when user double clicks Dynamic Query to open a new dynamic ccntainercbss rlass COI,' ~er (0,1~(0,n) User can drag template l~ romponent--~ ~ ontostaticco-, le(to Dynamic Statk container create new dynamic r;ontainerdass rlass COIl' ler (0,1) (O,n) l~a User can drag template dynamlc _ l~ onto ~. r1~rc:a to create _ romponent . Jl~
Dynamir, Workarea new dynamic CC
contairler dass dass 1~ (0,1) (O,n) l~ User can drag template 4~ component-- li~ onto ~.oil~lace to Dynamic Workarea create new dynamic ~
r ontainer r lass dass ~ n ,er ~, ~3 -;~
-r~ ~

.

i~ ~ - - --r 2 1 ~ L
~ss Terrlphfes Form Form classes provide the blu~l.uLs for rurl-time forms. Forms can function as online entry forms, in which users simply enter values, or ;~1 as dialogs in which users can select options and perform operations.
I Within a banking application, for example, you could use a form to allow the user to specify an amount to be I ~ r~ d from one account object to another.
1_ -Frorn account -To account Balance: Balance:
so.cq I sonq Arnount to be transferred:
~ I SO.~ 1 ~~;q I ~
S~bfa~
~8,_ For i~ru~ m on different A single form can be used to display and update data from a number 2~ r ' ~ . . models, see p~ge of .lif~e.~t data objects. Aform canbe invoked at run-time from a static ??-??. cn.. l,.;.. ~.'swindowmenu,adahobject'sobjectmenu,aspartofadrag and drop opel alion belween data objects, or by dragging and dropping a form template from the Object Templates folder on the a~licdlion workplaoe or wo.kd,ea. A form k:.l,plale is alltnmatit ally created for each form class that is a culllpollent of a workplace or workarea.
If you wish to invoke a form from a data object, or from a drag-and-drop ope.dL~n involving two data objects, you must associate the form class with each of the corresponding data dasses. After you associate the form ddSS with one or more data classes, you can use Form Designer to link fields in the form to data alll;L~ules in any of the associated data classes. This allows the linked form fields to display and update the data alLl;~ s in the associated data classes.
Forrns can access and update data representedby data objects, but they do not store or r~pl~sellL data themselves. Eadh time a form is opened, a new instance of that form class is created. Data displayed within previous inct~ of the form is not retained, nor are the previous values of any instance variables used within the form.

r APPLlGl71ON BUIIOING 8lOCKS

If you wish to create an application that does not feature a workplace or wo-~a, you can ~PSi~ ~tP a form dass as the top of your applica-tion lueld~ y. The application would appear to the user as a single form, without system templates or other desktop components. To package the application, you would drag and drop the form class onto the Application Pd~ger utility. For more il~ n, see page ??-??.
To create a form class, drag the Form class k.l,plate from the Class Templates folder, and drop it into a class folder. If you want the form class to form the top of the application hiPrar~hy, you can specify the application's pl~gldlll name, as well as a label and a unique i~1PntifiPr for the form class.
Il Design Elements You can design the following ~ .,k of a form class. Il Element Dewriptbn De~;~n~r F Form's appea,dnce and Forrn Designer (see orm functionality page ??-??) '~
;~
Possible Relationships The table below ~llmm~ri7P~ the possible rPl~ti~n~hirs between form classes and other classes. In this table, the arrow in~ atP~ the direction ~
of the drag-and-drag association, and the numbers in brackets - (1,1), Z
for example - indicate the .";,-;""...~ and m~iml1m number of rela-tionships of this kind that are required or allowed for each class.

A

i li r aa~ Tenlphhls De:~;y-- t' ~ n '. n . t- ~ effect Form can access data (O,n) (O,n) E~ attributes in data object;
a .~ user can transfer data cFIoanss dDaasas by dropping data object onto fomm (O,n) (O,n) ~a~ Forrncan invokeother r ' ~ 1~ form from push b~nton Fonn Fonn defined using the dass dass ChainTo function (0.1) (O n) Form object appears q~3 static ~__ ~ within static cu, ,er Fonn StatiC Co~tainer at run-time class class ~" (0,1) staticor (O,n) ~ User can drag template dynan~ onto .~ l~,ea to create Fonncornponent Wo~ a a new instance of the dass dass form ~, (0,1) static or (O,n) 1--1 User can drag template ~
1~dynarnic ~ ~ OntOlt~_rl~l~CetO ~E_ Fommcomponent Workplace create a new instance ~_ dass dass of the fomm ~
¢
---i 11 r ~_ 21~970 L
APPllanON BVllDING BLOCK5 Query A query class provides the blueprint for a run-time form in which users ~_ can view or extract selected records from a ~lAtAhAcP UseM can initiate 7 queries from individual data Cb~ linked to a single ~lAtAhA~e table, or from a dynamic co.~ so~ iAtp~ with multiple data con-taineM linked to multiple iAtAhA~e tables.
For more inful ' . on At run-time, useM enter values in the query form in-lirAting what the database queries, seepage range of records they wish to view. Records that match the values ??-??. entered in the query form are then displayed, either as data objects within data co.)~ -, or dynamic contAinpM~ or within the query form itself. ~lthin the query form, selected records can be displayed one record at a time within the query form fields, or together within a query ~11 result box. A query is a useful way of nallow,i~g the scope of a data co. . ~ , particularly if the rl AtAhAce table to which it is linked contains a large nurnber of records. I
g~
Name I I nue I
- Depa~ Isaes I supeNkO~ IDesl~on s~ I I

r_~

Recordsfrom multiple If you AcSQ, iAte a query class with a single data container, the query ;;i~
database tables are extracted form can be used to view records from a single ~lAtAhAce table that æ
using a SQL JOlN match the search criteria, or to ~1P~ e which records are displayed O
- .1, so that they are as data objects within the data cc ntAinPr If you associate a query class ordered and displayed as if they belonged to the same with multiple data contAinPr classes, the query form is used to view table. records from multiple l~tAhace tables that match the selection criteria. ~
If you associate a query class with multiple data corlldinei classes and ~ ~.
with a dynamic co~ . class, the query form can be used to specify selection criteria .1~1~....;..;.,g which records are displayed as data objects within the dynamic COnldint:l.
When you associate a query class with a single data container class, the query class's label automatically appears as an option in the data conlail,er's object menu, and as an option under View in the data con~AinPr's window menu.

r 211U97~ L

(/ass Temphtes If you ~ori~te a query class with more than one data ~ont~inPr class, the query class label will not appear at run-time as an option within any one data c~ml,.;.-~. 's object or window menu, since the query class applies to multiple cnnt~inpr~ To make the query form available to users, you must associate the query class with a dynamic cont~irlPr, wol~d.ea, or workplace class, as well as the data c.~ P~ classes.
For each query class, you can design the query form (using Form De signer), and also define a custom query to be a~ Ally ~. r~....P~l as soon as the query form is opened. For more ;.~fu....~linn, see page ????.
If you wish to create an application that does not feature a workplaoe or wùll~cU~ you can ~ ~ a query class as the top of your application lu~ y. The ~p~ nl~ would a~ lo the user as a single que~y form, without system l~",pl~ -- or other desktop COlll~Ol~ ts. To package the a~ aliu.~, you would drag and drop the query class onto the A~li.dlion Pd~dgef utility. For more ;. ,fi ....,~ , see page ????.
To create a query class, drag the Query template from the Class Tem- ~
plates folder and drop it into a class folder within your project drawer. ~_ If you want the query class to form the top of the application hierarchy, !_ you can specify the application's program name, as well as a label and ~@_ a unique i-1.ontifi~r for the query dass. ~_ Design Fl~ .~t~ _ You can design the following ~ of a query class.
Element Des~ ' n Dessgner Query form's ~pea,al-ce and Form Designer (see Queryfoml h.ll 'ic ' '~y page??-??) Custom F,e:d~:fhledquerypelrur,led QueryDesigner 3 q Y each time query fomn is opened (see page ??-??) il,~
r 21~0970 L

AmlLAllON BUILDING aLoa~

Possib/e n ~. srships The table below sl~mm~ri7P~ the possible r~l~tic n~hips between query classes and other classes. In this table, the arrow in~ At~s the direction of the drag-and-drag association, and the nurnbers in brackets - (1,1), for ~ le - indicate the .. ;.. ;... and m~Yimllm number of rela-liol~l~s of this kind that are ~ ed or allowed for each class.
Des 5, .-t~ r-~ t - effect User can invoke query E~ (O,n) (0.1) ~ formfromdata CG~ artoextract Query Data container selected ~ e dass dass records F~ (0,1) (O,n) ~ Query form is invoked 1~ . . ~ 1~ when userdoubleclicks Query Dynamic to open a new dynamic 5 class container class Cûl 1 n31 (0,1) (O,n) Query object appears ~
E~componen~ ~ within static Cul. I~( _ QuelyStabccontainer at run-time classdass ;~
1~ (0~1) stabcor (O~n) 13 Query object appears in 1~namic-- 1$~ v'l 1~d~a, or as Quely ntWorkarea template in Object _~
dass das5 Templates folder r (0~1) staticor (O,n) F~ Query object appears Z
namic~ asa~.~rl~lace Quelycomponent Wolkplaoe CGIllpOl~el)l, or as dass dass template in Object Templates folder .
r 211097~ L
aass ~empbtes Function Afunctionclassisclass. .. ~ callableflln~ti(>n~.Callablefunctions are reusable code modules you can incul~o.dle into code ~csi~ne-1 to other dasses, sudl as form dasses and data dasses. To use a callable ~I functi--n, you do not have to create acso~ ;~1 io~s b~lw~. the f~m~ tinn - class and any other class in the project drawer since the functi~n~
cont~in~l in the f7m( tic~n dass are by rl~finiti--n global to the project drawer.
A number of ~ re~7 To create a function class and define callable flm-~ti~-n~
reusable code modules, called utility classes, are supplied 1. Clidc on your right mouse button within an open area of the Class by EnKsion/Builder. For T~ lales folder. rl moreinfu, ,seepage 7?-??.
2. Select the Entity Cdleg ~1 y from the pop-up menu.
3. Drag the I7.ul~ n l~l..plal~ from the folder and drop it onto a class folder. Assign a label and an i~ ntifif~r Alk, 73;youcandrag 4. Positionyourpointeroverthenewflm~ti-ndass,clidconyourright ~_ anddropthefunctionc,7ass, mouse button and select the Define functions option from the ~_ ortheclassfolderorproject pop-upmenu. ~1 _ drawer: ', g one or __ morefunctionclasses onto ~
the Function Designér icon From the F,ll~.lion Designer module that appears, you can create and ~E_ within the Utilities winc,7aw define any number of callable fun-~ti~n~, and create and define internal E~_ fun~ ti-n~ as well. Callable f7mrtil n~ can be called by other classes ~;_ within the same project drawer; internal rl.... 1 ;. n~ can be called by callable flm~-tit~n~ within the same class.

3 Dii C~able 7w~c~on ¦Deduc~
æduncs ~ ~ htemal lu~cllon 1~--~ ~ hslanoe ~arlable !~ - ~ ;~
Formorei,.fù, ~ ~r.on dit l ~
creating and using calla~le ol L ' _ _ functions, see page ? ?-? ?. 03 de ~arbnent1 ~k A~t ~ue Marketing'. ~4 03 de~arbnent3 ~ic A~ vaiue r ~t'.
03 de~arbnent4 ~icA~O`vahle L ' '.
03 de~arbnentS ~k A~OI vahle 'I~ ' ' .
03 de~lmeni-7 oic ~0 vaue Quaugkai Suppo r 03 de~arbnentii ~ic A~O value'Maketing'.
--ei~ning n tnlbbk i5untbcln r 2110~7~ L
AmlGATlON BUI~DING BIOCKS

To incol~u~dle a callable function, you include call st~t~mPnh identi-fying the function class and the filncti-)n name. When you compile the code cO~ g the function call, the code cc..~l,.;..~l in the callable function is co.l,~"~ed with the native code and lurùcessed as if you had typed it in rnAml~lly.
L~ i5 [
Edlt 2 3 G~ F , glvhg colllptemp.
cal ~ ' ' ' I
-5~

1, olalbblefunc/ion Design Elements You can design the following f~l.qm~nh of a function class. r~
Element De s s ,X r De^;gner ~,4 Code r~ræe" ~ by callable Function functions within the function (see page '.7? .

Possible Relationships None. The callable fimcti(~n~ cc~ l in a function class are by ~l~finitit n global to the entire project drawer.

r ~ 2110970 L
aass Temphtes WGrh,~JIaCe A workplace class is a component used to group all the object that comprise a particular application. At design-time, application classes ;~1 are directly or indirectly associated with the workplace class. At run-time, the user double clicks on an application icon .~ g the workplace. The workplace window opens up, di~Lyillg the objects, c.).-l~ , and acc~so. ;~ that make up the application. The work-place takes over from the OS/2 desktop and occup:es the entire screen.
~,.

The workplace ~r.~ . 'ly ~
include its own Shredder and A~ - ' Window ~ewer a ,.c~.

1~

S~nple worl(phte If your aypL~dlion does not feature a workplace class, you can desig-nate a workarea class to form the top of the application's hierarchy. If your application int~ both a workplace class and a wo.~.~a class, then the workarea is subordinate to the workplace, and must be a component of the workplace. The workplace can contain any number of ~,.~ wo~as, or none at all.
Note: If you wisk to create an application that does notfeature a workplace or workarea, you can designate aform class or query class as the top of your application hierarchy. For more information, see page ??-??.
.

i g r 21109~ L

APPVGlnON au~ NGsloas For more i~ ' on To group objects under a workplace, drag the appl~pl;ale classes and static and dynamic drop them onto the workplace class. Depending on the class type, the parent/ch~ld, ~.~ ',, class being dropped may become a static component or a dynamic see page . . -. . . col.lpol~l of the workplace. Astatic component appears as part of the workplace at run-time. A dynamic co...~ does not alltomAtirAlly appear on the workplace at run-time, but appears as a template in the Object Templates folder. The object template can ~lrAg~fl and dropped onto the workplace to create a new instance of the object.
After grouping and associating classes with a workplace class, you can drag the wul~la~e class from the class folder and drop it onto the Application Packager utility. The Application Packager plw2sse~ the application classes, then ge.l~ldl~ stAn~lAI<~n~ PY~lphle files.
To create a workplace class, drag the Workplace l~ lale from the Class Telll~lales folder and drop it onto your class folder. From the all-il,ules window that appears, you can specify the application's ~ l name, as well as a label and a unique irlPntifi~r for the workplace class.
Design Elements You can design the following Pl~mPnt~ of a workplace class.
Element Des_"~' ~a D~
Object window W~,.h~,lace window (see Chapter 13) -Possible R~ tlonsllips ~' -The table below sllmmAri7P~ the possible rPl~tio~hips between work-place classes and other classes. In this table, the arrow indicates the direction of the drag-and-drag association, and the numbers inbrackets - (1,1), for exarnple - indicate the minimum and Illaxilnulll nurnber of rPl~tinn~hirs of this kind that are required or allowed for each class.

il~, r ~ 2110970 L
~bss Temphes Des;y.. ~ n~ effect (O,n) . (0.1) User can drag template stabc or ~
--dyr~nic ~ onto~. l~laceto cornponent ~~ create a new instance Workplaoe Forrn dass dass of the fomn F~ (O,n) (0.1) ~ Data co-. ,er appears 1~ ~ starK 1~ within ~ l~lace at run-Workplaoe cornponent Data conbiner time dass dass F~ (O,n) d(0 1' G~ User can drag template --cornponent ~ onto .~ rl~lace to create new dynamic Wwkplaoe Dynamic ~f dass conbiner dass COI 1 ~ ~er (O n) , (0,1) Query form appears as ~ 'sta'ucr ~ a~o~,ula~ecornpo-Workplaoe component nent, or as template in dass dass Object Tempbtes folder E~ (O,n) (0~ i& appearsas~.orl~lace Workplaoecr~nponent Sbbcconbinur COIlll)Olk:~ltatnUll-time ~_ class class ~_ (o,n)(0,1) F~ \/VGrl~ a appears ~_ ~_ stabc ~ li~ within ~o~lace at run- ~ _ Workplaoe Workarea time ~_ class class ~f v~

r~
-r ~ ~ 2110970 L
APPIIG1110N BUIIOING BlOa~

W ,rh~a A workarea class is a component used to group application objects. The wolkanea class can be a C~ pOnt~ll of a workplace dass, or in the absence of a workplace class, can form the top of the application lu~lal~ly itself.
If your application does not include a workplace class, you can desig-nate a wo~kdl~ca class as the top of the application hi~la~ly. To start a wOlkal~a application, the user double clicks on an icon ~~ l;..g the wolkal~a class. The application does not take over the desktop, but runs as a window within it. ~mdows opened within the workarea are not bounded by the limits of the lNolkdl~a window. The Shredder accebbol~ norrnally found within the woll~lace forms part of the workarea. The M;. .;. . .;,.YI ~mdow ~lewer does not appear within the workarea; instead, the a~li~alion makes use of the co..eb~onding OS/2 w- rkpl~e accesb~ . t E~3 C~ rd U~r~r 5 ~Ccllqe b~ HPIV
6~ ~ 11ir~i2d Sh~r T~bb~
r V_~er ~Ç OSQ~rsbrn ~ ~ r_~
en~
ResourctEd~ors Err~
~hr~dd~r ~ æ
Ttrrplr~es O
Word br Windol~s r Runoingoworkoteoopplioolion ~
For more infu~ . on the If the workarea forms the top of your application hierarchy, you can ~' ~4ppl ~,~; Packager, see drag and drop the workarea dass onto the Application Packager utility page ??-??. to process the application, then generates st~n~ n~ executable files.
To create a wol~ea class, drag the T~ol~r~a template from the Class Templates folder and drop it onto your class folder. If you want the workarea to form the top of the application hierarchy, you can specify the application's program name, as well as a label and a unique iden-tifier for the wu~kdl~a class.

5~
r ~ ~ 2110970 L
ihss Temphbs For more inf.~ n on Depending on the cLass type, the class being dropped may become a static stat* and dynamic component or a dynamic component of the workarea. Astatic component parent/child, ' ' . '; , appears as part of the workarea at run-time. A dynamic component does not ~ lly appear in the wo~ a at run-time, but appeas as a l~lplale in the Object T~,plale~ folder. The object lel~plale can dragged and dropped into the w~J~kdlea to create a new object.
Design Elements You can design the following ~l~m~nh of a workarea class.
Element Desc,~ er a~
Window Designer Object window Wolhdrea window (see Chapter 13) Possible 17~ ionships The table below ~llmm~ri7~s the possible relatinnchips b~:lweell ~_ workarea classes and other classes. In this table, the arrow in~ t~s the ~_ direction of the drag-and~rag association, and the ~ lb..~ inbrackets ~_ - (1,1), for example - indicate the .. ;~ .. and .. ~-;.. nurnber of ~t_elaliol~llips of this kind that are required or allowed for each class.

---i ~
r J ~ 211097~ L
AP~LIGOION BUIIOING ~l0(16 De ]s e . ~' ~r: n~ effect (O,n) staticor (0,1) User can drag template ~ cornponent ~ onto .. J,~r~a to create Workarea Form a new instance of the dass class fomm (o,n) (0~ 3 Dataco~ ,erappears ~91 ~COrsntpati ent 4~within ~ ea at run-Workarea Data o~ntainer bme class dass (O,n) (Q1) ~k User can drag template $~ codmpanecnt l~ onto.J,I~r~atocreate Workarea l)ynarnic new dynamk container dass container dass (O,n) static or (0,1) ~ Query form appears in 4~11 ~ dynamic l;;q ~ a, oras Workarea component Quely template in Object dass dass Templates folder 5 (O,n) (0,1) ~ Stabc cu,, er ~1 cOm~pOincen~ ~ appears in ~ ,ea at Workarea Static container run-time class cbss (0,1) (O,n) F~ ~Vorl~ a appears 7 ~I cornponent~ within ~ 1~1ace at run-Workarea Workolaoe bme dass dass z -r ~ 2110970 L
a~m ~phtes Data Storage Adatastoragedassisusedto~ se,~lanexterr~datafileor.l~t~h~.
Cjqsses To link a data c~nt~in~r to an external datafile or database table, you create an association between the data ( ( nt~inPr class and the data ~ storage class. At run-time, the data c.~ A;~ can display records from _~ the datafile or rl~t~h~e table as data objects within the cont~inPr window. Users can add new records to the datafile or database table by creating new data objects within the data c~ P.
Separate templates are provided to l~ sel~ t~filP~ and databases.
The Datafile template is used to create a datafile class l~:,ul~s~llli.lg an ASCII datafile in Micro Focus format. You can link data cont~inPr~ to a new datafiles or to existing ones. No ad~itil)n~l software is required to support this data storage format.
The Database template is used to create a rl~tAha~e class l~s~lillg a l;o,~ t~hæ~e You can link data l~o~ to existing rl~t~h~e tables, or create new ones. You must, however, have the applùpl ale ~t~haCe soflw~ alreadyin~t~llPd onyour wo.1~ l;. n 1_ To create a data storage class, display the Data storage ~:alegol ~ within the Class T~,plal~s folder, then drag the d~p~*>l;ale data storage template onto your dass folder.
If you are creating a l~t~h~e dass (using the Database te.l,plal~), you will be p-u..,pled to specify the name and format of the l~t~h~e you wish to use.

Name ¦ I _ Dalabase ¦ ¦r¦ ¢

',~30D2C DLL ¦
Sublect ~
11 ~
~ OK ¦ ~ 1~
Spe~ aadafabasefotada~abasedass Z
To specify an existing ~lAt~h~c~, select from the Name list. To create â
new rlAtAhAc~, enter a new name in the Name field. If the specified ~lAt~hace is not found, it wiU be created.

i r ~ 211~9~0 L
At'PLtCA710N BUlLL)tH6 BLO(KS

Supportfor ~ ' Currently, the following rPlAti(~nAl A~hAce formats are ~uppolled:
relational databaseformats will added infuture releases. IBM Database Manager ODBC (Open Database C~U~N; vily) ODBC provides a standard A~hAce intPrf~-~e allowing you to access A;rrt..-.,l AAtAhaqeformatsusingthesamecode.IfyouselectoDBcas the AAtAhAce Type, you must also specLfy the name and location of the DLL file c~o~ g the A~l~hAqe access code.
If you are creating a dat~file class (using the Datafile le~ lale)~ a window appears from which you can specify dat~file p~r~m~tPr~q, int~ Aing filPn~mP and orgPni7~ti-n il Nane Ider~ier ¦
Rle name 0,~
ejihine ~quenli~l ~C31ndened 13~Reoord ~equentisl ~FIelathe r_'~
rAccess ¦ ~Squen~ndan ~ nunb ¦
rAiignment I _ ¦ 61~teI~lWcrdI ~1 Subject :~ _ .. ~ _ Creation date Creation time 040~931 ¦ 09:22:07 AM¦
OK ¦ ¦ Cancel ¦
tieating a dobfile dass For inf~ rmAtir~n on spe~i~yillg datafile parAmPtPrC, see page ??-??.

r 2110g70 L
6bss Templates Note: Once you have created a data storage class, you can assQ~iAt~ it with a Before you can associate a data contAin~r by dr~ing and dropping the data container class onto data container with a the data storage class. If the data storage class is linked to a ~lAhhace data~ase class you must rather than a datafile, the data co~ . 's all,iL ules vlew appears.
assoclate a data class unth the data container. From here, you can specify the ~AtPh~e table to which the dah con-tainer will be linked.
To link the data conldine, to an existing ~ AtAh~sP, click on DB Table and select from the drop-down list. To create a new ~AtAhAce table, enter the new table narne in the DB Table field. If the specified table is not found, itwillbecreated.YouA~so~iAtf~anynumberofdirrel~:llldatacontAin.ors with a single dAt~hAce class.
For more in~, ~ . on If you are linking your application to an existing datafile or r1Atr~hAse linlang to datafiles and table, ~c~ ;~1~ the data conhinpr class with the data storage class e' ' ~ . see pages ??-?? before Asso~iAting the data contAin~r with a data class. In this way, you and ??-??, rr~ rl;~ !V cansaveyo~ elrtheeffortof rlr~fining dataall.il,ulesforthedataclass, since En~lsion/Builder can ~-.k~ l ;rAlly incol~o~ale the data defini- ~
tions already ro~ within the datafile or ~lAt:~hAs~. Lf you are ~_ linking to a new existing datafile or databaæ table, ~ssoo;~l~ the data ~ _ of)~ ;nP~ class and data storage class after you have associating the ~_ data conlA;n~ with a data class. ~1_ Databaæ clasæs do not appear within the wc,l~le:a or woll~lace at ~_ run-time. ~_ Possible Relationships The table below sllmmAri~ the possible relationships between data storage dasses and other classes. In this table, the arrow in-1ioAt~s the direction of the drag-and-drag association, and the numbers inbrackets - (1,1), for example - indicate the minimnm and maximum number of relationships of this kind that are required or allowed for each data storage class.

-r ~ ~ 2110970 L
AmlGA110N aUllOlN6 UO~

De ~ -. n I - effect Data Co.l ~er becomes linked to [~ (O n) (0 ~ A~e table;
DUZ ~ z -- ~ ~ dclf~dbase records can Dalabase Da~a r~ontainer be displayed as data cass das5 objects within data co.. - ,er Data co.. - .er o 1) (o 1) f~ becu.. ,es linked to z 11-- datafile; datafile record~s Datafile Data container can be ~lisp'ay~i as dass dass data objects within data co.. - .er 7~
-_f r~
z ---a r 2~0~70 L

I

This chapter describes how to establish and define ~ nchip5 be- ¢
tween classes within an object-oriented application. The r~l~tionshirs ~
you ~Idbli~l~ ~t~rminf~ how objects - the individual inct,~ncP~ of z classes - interact, and where they appear at run-time. r_~
This chapter consists of the following se ~tinn~ _ Overview ~
-Parent/Child 12~1~tif~n~hirs Peer-to-Peer Reldlional ips ~so~i~ti- n~ , Application Models @~
i_ r 211097~ L

DEFINING REIATIONSHIPS BEIWEEN CIASSES

In object-oriented applications, users accomplish tasks by manipulat-ing objects, and by having objects interact with each other. To control how objects interact at run-time, you establish and define r~l~ti-)n~l~ips between classes - the blueprints for application objects. The relation-ships you establish determine how application objects can interact, and where they appear within the workplace.
To establish relationships between classes, you drag one class and drop it onto another. Depending on the classes being dragged and dropped, a dialog may appear in which you can specify the action to be per-formed at run-time when users drag and drop corresponding objects onto one another.
You can establish three dirrel~nt type of relationships between classes:
parent/child relationships peer-to-peer relationships associations Some relationships can only be established between particular combina-tions of classes, reflecting the specialized nature of each class type. In some cases, different c~ b~liuns of these relationships are required to make certain run-time scenarios possible. These scenarios - called application models - are described and illustrated be~"luung on page ??-??.
To terminate a relationships between two classes~
~ 6 You can also display 1. Select the Open ~ Graph view option from the object menu for either , ' ~; .. s1,i~, graphfor a class class. A relationship graph appears.
by double dicking on the class. 2. Within the relationship graph, position your pointer over the associated class.
3. Click on your right mouse button.
4. Select End relationship.

' i l ' r 2110g70 L

To modify an existing peer-to-peer rPl~t;.~n~ , between two data classes:
1. Repeat the drag-and-drop operation you f riginAlly performed to es~ the r~lAti~ n~hir. You willbe asked wl~llæl to proceed and modify the existing rolAtion~hip.
2. Click on Yes to proceed and modify the ~ n~.l .;l).
You can also replace an existing parent/child r~lAtion~hir between a data class and data ~o.~ P~ or between a data conl~ and a data storage class, by ~lrAgging and d.~,i.,g a new coll.l~".aLon of dasses. ~
You will be i.~o..l,ed of the existing r~lAti- n~hir and asked wl~ . to ~¢
replace it with the r~lAtionchir you have just specified. If you dick on Yes, the existing r~l~ti- r ~hip willbe 1~. . . I;l~Al~ and a new ~PlAti~n~hi established.
The kinds of r~lAticn~hirs you can eb6bli~11by ~.ggillg and dropping .~ltclassesontoeachotheraresl.. ,.. ;,.. ~inthefollowingtable. --I
;~
æ

.~

i_ --r ~ t 21iO970 L

OERNING REL4110NSHIK 8E1WEN tlASSES

Source Class Target Class n~ .ip Data class Data class Peer-to-peer Dataclass Dataco, .al FdlellUI;h: (dynarnk) Data co, ,er Static co,. ,er Pa~e~lV~;I. (static) Data co" ,el Data storage class P~
Staticc~" .er WJrhdrèa Pd~e~lV~;II (static) Staticcu" ,er Worl~lace Pdlel~ - (static) Dynamic c~ ler Static co" ,er Pdlel~VclU (dynamic) Dynamic cc., lar Woll~ldce Pa~e~lU~;I. (dynamic) Dynamk container Wal1~dlea PalellU~h (dynamic) Fom~class StaUccon ,er F.. _.~V~:I, (static) Pdl ellt/,ll ~staUc or 11 Fomm class \1'lol1~1ace .
dynarnlcJ
PdrenV~ static or 0 Foml class Wol1~dlea dynamic) Fomn class Data class ~ Y
Forrn class Form class ~s-Query class Data CGI1' ' ~er P-~-. Y --n Query class Dynamk co"- ,er P.ss- `icn Queryclass Staticco, el Pa,~-lV II (static) Pd,e,lUcll (static or ~
Queryclass Wolhd,ea dynamic) Z
F.. _ ~V~ h (static or O
Queryclass ~Noll~lace dyna;nic) V'lol~d.ea Worl~lace Pd~e~lV~;II ' ' (static) Eshblishingrelo~nsh~ eendasses These rPl~til n~hirs are described in the sections that follow.

~ g I
r 2 1 ~ O 9 7 ~
L
Pcren~/GSildP ' Si, Parent/child r~lAtion~l~ips are structural r~lAti-~n~l~ips in which one class becomes a component of another class. Classes used to group run-time instances of other classes are known as container classes, and include data containers, static containers, dynamic containers, workareas, and workplaces.
The Object Templafesfolder Parent/child r~lAtion~hirs can be established to group multiple in-appears on your workplace or stances of a particular class within a common container, and to ol~;anize workarea, whicheverforms classes into an application hierarchy. In some cases, establishing a fhefopofyour.. ~ ulio,. parent/child relalion:,hi~ results in a template being all~omAticAlly generated and placed within the Object Templates folder at run-time.
Users can drag and drop the terriplate into the container window to create new instances of the child class.
To establish a parent/child relationship, drag the subordinate class and drop it into the container class. A message will appear indicating that the relationship has been established.
C ln ', < New Account > can now be created e inslde < Accounts >. ~
~ ~ `
_ Depending on the class types involved, the subordinate class may be a ~_ static component of the container, or a dynamic component. The table ~;_ below displays the different possible combinations of parent and child ~_ classes, and the type of relationship that results in each case. ~
The possible combinations of parent and child classes are illustrated in ~_ the diagram below. Within this diagram, the direction of the arrow indicates the direction in which you drag and drop the class to establish the parent/child relationship. ~^~
The differences between static and dynamic parent/child relationships are described in the sections that follow.
~s ,~

r ~liOg70 '~ L

Df~lHING RElAllONSHl~S 8~1WEEN CL/ISSES

/'~ ~`\
W~
//j~ ciass `~ \ ~
t ` `~

, Form \~ Workarea ~ `~ ~ Query class \ class " ~ class 1~ 1~ .
Static container Dynamic 5 classcontainer class F~ ~ ~
l~ ~1 -Data container ~, class _~

Legend Z
static cc,.,.~)one"
Data - - - - - - - - - - dynamic ~I~.ooe~
class _ _ _ _ static or dynamic (1,.~,,.. to choose) Possible p~,~"V~I 'H 1 .' "-n;,l~; -r ~ L

Rt/rent/alildF ' ' Sj, tatic C~ o~ t~ When a class is a static component of a c~,l.ld.l.er class, an instance ofthe c~,ll.pol~e,~l class appears at run-time within the co.-L~i.)P~'s win-dow. The static co~.pon~l is bounded by the cont~in~r's window, and cannot be moved to another window.
Establishing static parent/child rr~ ips helps to o~ ize classes into an application lu~.an~.y. The position of each class within the application lu~ y d.?l~ ~ where and when in~Pn~ of that class will appear. For example, if you drag and drop data cont~inf~r classes onto a static c~ nt~in-~r, ;n51~ P~ of each data rc.l,t~;..P- will appear within the static c~ window at run-time. If you drag and drop a static cont~in~r class onto a workplace class, then an instance of the static ~o~ ;.. P. will appear on the workplace at run-time. ¢
j,, ~ ~3 ~
Templdss _ Shrsdder Minimized System WmdowViewsr Templdes static Z
container ~ O
_~ V

Acoounts Elills ~_ data c Sttftpar~nt/thildrt~lahonship ~
~_i DYnam;C When a class is a dynamic component of a cont~inPr class, it does not ~_ CGIII,~OI~el~tS initially appear within the c.~.d.~ . 's window at run-time. Instead, * ~_ appears at run-time as a template within the Object Templates folder.
Users can drag and drop the template onto the container object - or into the open container window - to create new instances of the child class.
The new instances - or objects - appear as a group within the container window, and cannot be moved to another window, though they can be involved in drag-and-drop operations within objects from other con-tainer windows.

r 2I10~70 L

DEFINING RElA71OHSHlPS BE1WEEN nASSES

Establishing a dynamic parent/child r~l~ti< n~hip makes it possible for user to create multiple in~t~nr~c of a class, and to group those ;. .~,1~. ..~
within a single cont~in~r For example, if you drag and drop a data class onto a data c."~ class, a template for the data class will appear in the Object Templates folder at run-time. The template can be lr~ggecl and dropped onto the data con~in~- to create any number of dil~lt data objects. By adding data objects to the data cr~nt~in~ users are alsoaddingdatarecordstothedatafileor-l~tAh~etabletolinkthedata co.~ is linked.
i;~ Templates NewAa:ount NewE~ill ~
The Object Templates,~lder appears on your ~,.'4 '- or I drop to workarea, whicheverforms , I create new the top of your ~ Ib ~I;o,. ¦ data object 5 hierarchy.

Sovings C~equing r~

Dynamkporeni/dlildrel~ionship ~,~
z ---'~

r ~ ~ 2110970 L

Peet-to-Peet Rehaonships A peer-to-peer relationship is a drag-and-drop relationship between two data classes, or between two instances of the same data class. ~lth a peer-to-peer relationships established and defined, a user can drag and drop the one data object (the source object) onto the other data object (the target object~ to transfer data, invoke a form, or display a message.
~ lS 1~ ;o,C~ r~ o, Hydn~8ill Phon~8ill drag and a~quing Sovings ~
drop .

- perform ,f,..~d ~i .
Peer-~o-peettelaaonships After establishing a peer-to-peer r~l~tion~hip, you can define the action to be performed as a result of the drag-and-drop operation.

~st~lishing a You can establish a peer-to-peer relationship between two different ~
peer-to-peer data classes, or between different instances of the same data class. ~_ I`~iatiGI~SI~i~u Establishing a peer-to-peer relationship between two different data U~
class allows the user to drag a data object from one data container and ~_ drop it onto a data object in another container to initiate the predefined ~_ action. Depending on how the peer-to-peer relationship is defined, the ~ j_ action may involve accessing or updating the data attributes repre-sented by the two data objects.
,~Establishing a peer-to-peer relationship within the same data class allows the user to drag and drop a data object onto another data object within the same data container. Both objects, in this case, share the same ~
data attributes, since they were based on the same data class. ~3S'3'3~<.

j ~ ~
r 21~0g70 L

DEFINING RElAllONSHlPS BEIWEN aASSES

Between dfflerent To e~lab~ , a peer-to-peer r~l~tic nchip between diL~l~ll data classes, data c/asses drag and drop the class you wish to fl;tnction as the source onto the class you wish to function as the target Acc~unts Fills Tr~ns~er Funds Nr,~w~ount New~ill P~y~ill -1~ _ ~nking ~
Wr~rkplnc8 ~
~;
Eshbl~7gpeet-hpeer t~orior~p behea ~h d~ s From the dialog that appears, you can define the actions to be per-forrned at run-time when a user drags an instance of the source class and drops it onto an instance of the target dass.

Soulce dass: ~ew Blll ~
Target class: ~ew Account Z
-hdlcate acbon to be perforrned: o Trander data ~ hvoke forrn Fûr i"fu, on defining peer-to-peer, .. ,n, , Trander Funds see page ??-??. Piy Blll rDlsply messye in InforrnaUon Area~

OK 1 ¦ Lan~ ¦ ¦ Help ¦
Defuling a peer ~peer rehlionship I
r 2;110970 L
Peer-lo Peer r I 5;

The direction in which you perform the drag-and-drop operation at design time fl~t~rmin~ the dil~clion in which users can drag and drop data objects at run-tirne. If you establish a r~l~tion~hir by ~lragging and dropping data class A onto data class B, users cannot initiate the pre~fin-o-i action by lragging and dropping an instance of data class B onto an instance of data class A.
You can establish and define separate peer-to-peer relationships for each co~ alion of source and target class. You can drag and drop class A onto class B to establish and define one peer-to-peer relation-ship, then drag and drop class B onto class A to define another peer-to-peer r~l~ti- n~hir. At run-time, users can drag and drop an in~t~n~ of data class A onto an instance of data class B to initiate one pre~fin action, and drag and drop an instance of data class B onto an instance of data class A to perform another precl~fin~-l action B~ls drag and E~ ~ ~i Hydro Elill Phon- E~illdrob~eln Chr~quing Sovings ~
direction ~

~
perform perform action p ~ - d 3~
&h~ish~oh~ t.~ ', r~hip ~
Within the same data To establish a peer-to-peer r~ ion~hip between dirrer~i,l in~t~nr~ of ~_ class the same data class, select Design ~ Instance behavior option from the ~_ data class's pop-up menu.

I_ li ' r OEFIHING REIA~IONSHIPS BEIWEEN CIASSES

_~E
ql Open Acc Delete r. ~
~_ Data attrihltes _efreshschema Datayiew ~ Compi!e Oblectmenu _ !conviewer Moneor ~, Help ~nWng Wod~

EshlN~hn9 apeer-lo-peer rehl~ip wdhn a doh doss For in~l lt. on defining From the dialog that appears, you can define the actions to be per- I
the peer-to-peer, ' ~,; ,, formed at run-time -when the user drags one instance of the data class see p~ge ??-??. and drops it onto another instance of the same class. 5 Sovings drag and al~ql~lng drop -~1 perforrn Z
acUon O
Ornggingonddroppingi~esofthesan~e dass ~
The user can drag and drop any instance of the data dass onto any other instance of the same dass. You do not have to define 5~ ' atæ peer-to-peer r~ tinn~hips for eadl combination of source and target.

r 211097~ L

Peer-~pffl P ' Sj, Defining a When you establish a peer-to-peer l~lAli.~ , by ~lr~gging one data peer-to~peer Class onto another~ orby spl~ctin~ the Design ~ ance behavior option lelati~ship from a single data class's pop-up menu, the following dialog appears.
., }_ Source dass: ~lew BUI
Target dass: New Account -Indlcate adlon to be perfonned:
'.~ Transfer data Invoke form Transfer Funds _~
Pay BUI

-Dlsplay messye in Informa~on Area-- Z

OK ¦ ¦ ¦Cancel ¦ ¦ Help De~7ing ~ peer-lo peer rebfio~bp Note: y a peer-to-peer relationship has already been established, you will ~f p~o,~ ed to confirm whether you wish to modify the relationship.
From this dialog, you can indicate the action you want pf~rforrne~1 as a result of a run-time drag-and-drop operation. If the peer-to-peer rela- ~_ tionship exists be~ e~ two data classes, you can indicate the action to ~_ be p~. r.J....~ when the user drags and drops an instance of the source ~_ class onto an instance of the target class. If the peer-to-peer rol~ti~n~hir E~_exists within a single data class, you can indicate the action to be ~q_ performed when the user drags and drops one instance of the data class ~a_ onto another in~Pn~e of the same class.
In either case, you can perform one of the following actions:
transfer data from the source object to the target object invoke a form In addition, you can specify a message to be displayed in the data c.~ -'s info area when the source object is pocitione-l over the target object.
~ I
r 2~f~97D
OEFINING R~lA11ONSHlPS BflWEEN aASS~S

Transferdata ~k.~ , the Transfer data option allows users to drag and drop one data object onto another to transfer data from fields in the source object to fields in the target object.
lfthe target object's attributes view * not already Order being !~ , itwillbe opened. Changes to the target object's data attributes -Custorner will not take effect until the Narne user clicks on a push button defined using the OK -Car Zl Cars 1<
f~mction or an ~, Mal~e j 10nda I Model ¦~ccord procedure. Year I gg~ I ViN ~ r. ~ ~
Prlce r~3,9gg.gg 1 _ _ L _ 11 r~ 4~. bh,~fe, 5 Note: This option cannot be used in combination with the Invoke form option.
To allow for data transfer bel~ data objects:
1. Drag the source data class and drop it onto the target data class. ;~
-2. From the Peer-to-peer r~:ldt;onship dialog, click on Data transfer.
3. Click on OK. You will be retumed to the En~lsion/Builder workplace.
-4. Position your pointer over the target data class, click on your right mouse button and select the Design ~ Data view option.
5. From Form Designer, click on one of the form fields in which you want the l-a~ d data to appear.
For 1nore i,l~ol . on 6. Select Alternate as the Data Source type.
defining pri~nary and alternate data souroesfor 7. Click on the Class list and select the data class that represents the fields in data attributes datatobe liansr~ d.
v~ews, see page ~ ~-? ~.

r 2llog7o Peer-t~Peer ~ ' Si, 8. Click on the Attribute list and select the data alllil,ule whose value is to be lla~ led.
Da~ S~uroe ChssAtlribut~
¦Altemate ¦X¦!NewProdut t 19~1--_~

,, ~3 ~7na an al~erna/e ~bb souroe for folrn fi~
9. If you want to save the 1. ,t~ r~. . ed data as part of the target object's data at~ ule~ select Primary at the Data Source type, then specify a data all.il,ule within the target data class as the field's primary E
data source.
10. Repeat steps 5 to 9 for each field within the target class's data _, atl.il,ules view in which you want i ., --~r~. . ed data to appear.
Invoke form ~1.~ 1 ;.-g the Invoke forrn option provides for a specified form to be ;~
displdy~d when the user drags and drops the source object onto the æ
target object at run-time. ~ ...;..g the form class is asso ialed with both the source and target classes, the invoked form can access and update data atl.ilJult-s in either source or target class.

~SABi~ PhontBi~ ¦~oneB-- i ¦S~hgs ~
.: ~ !. Balance Babnce ~_ Sgll.761 I S1~3~5.67i ~_ _ ~ ~r unt to be pald:

Ch~quing S~ing~

~ -:
Pelecse to pcy hill fro~ this cccoun ~
Invoking forrn through~ 'L~r., op~ion Note: This option cannot be used in combination with the Transfer data option.
#~

r ~ ` 21 10970 L
DEFIHING RflAnONSHlPS B~ EN ~IASS~S

To provide for a form to be invoked:
1. Drag the source data class and drop it onto the target data class.
2. From the Peer-to peer r~:lalionship dialog, click on the Invoke form option.
3. Select the form to be invoked by clicking on the appiopl;ale entry in the list of associated form classes.
Note: ~o appear in this list, theform class must already be associatP~1 with thetarget data class. If theform you wish to invoke does not appear within this list, click on Cancel to exit this dialog, then drag theform class and drop it onto the target data class. If you want theform to be able to ~~update the source object as well as the target object, then drag and drop theform class onto the source data class. In either case, a collri~ ation message, acknowledging the association, will appear. 5 4. Click on OK when you are finished ~fining the peer-to-peer relationship. You will be returned to the En~lsion/Builder workplace.
For more ."~.,.. ~ on 5. Position your pointer over the form class, click on your right mouse ;iZ~
~iry"~g the data source button and select the Design form.
andd . forfor~n fields, see page ? ?-? ?. 6. If you want data from the source or target objects to Alltom Ati~ ~lly appear within the form, click on one of the form fields in which you ;i;~
want data to appear. Z
For more i"~., . on 7. Select Source as the Data Source type.
defining primary and alternate data sourcesfor 8. Click on the Class list and select the data class that r~pi~s e.~b the formfields see page ? ?-? 7 .
data you want to dlsplay.
9. Click on the Attribute list and select the data all.il,ule whose value is to be displayed.
Oat~ SaJrce a~S Annbute ¦Source ¦Y¦¦NewAccount IYI
Account Acctno _ ,.~
Spedfya~g Ihe dob souroe for c farrn fbld ~1 i r 21~097~ L

Peer-t~Peer Rel~/ionships 10. If you want to update data in the source or target objects using values entered in the form by the user, select D~alil ,dlion at the Data Source type, then specify a data all.il~tlle within the a~plulJl;ale data class as the field's ~l~l;r~ >n.
11. Repeat steps 6 to 10 for each form field in which you want data from the dragged and dropped data objects to appear.
12.If you want to process the user's input before updating the co~ ondtng data aUL;l~ule in the source or target object, you must assign the a~,r~.;ale code to a push button. After pl~essillg the user's input, you can move a value to the coll~n~nding data ~
a~ ule~ then update all l~ ced data all~il,ul~. ¢
r~ _ o~o ~
~dlt II
~ hg sourcehL
caqself getTargetg JI O ''' ' t b bala~ce of sourceld.
' ' t ' t baiance of targedd.
caD: '~ ' ~

Assi~ing mslom ~e b f~d~te dolb dh~ es E~_ Otherwise, you can assign the pred~fin-~l OK function, instead of ~
custom code, to the push button. ~ _ Note: If you are defining a peer-to-peer relationship within a single data class, ~_ you musf use custom code to distinguish between data attributes in the ~_ source and target objects since they belong to the same class and share the same data attribute names. For information on referencing data attributes within separate instances of the same data class, see page ??-??.

I
r 21~0970 L

DfflNlNG RflA71OHSNlPS Bf.1WEEN CZASSfS

Displaymessage in YOu can specify a message to be displayed in the data co.-l~i.-P~'s info info area area when &e source object is po~iti- n~l over the target object.

~I BlaS 1~

Phon~ n drag and s~9s _ drop nS~l tO p~9 bill ll-illg t~rg-t ~CCOUDt Note: You can specify a message to be displayed, and select the Data transfer or Invoke form options.
To specify a message to be di~lay~:d in the data ~ 's info area:
1. Drag the source data class and drop it onto the target data class.
2. From the Peer-to-peer r~:lalionship dialog, enter the text to be displayed in the entry box below the Display message in info area hf~rling r_~
3. Click on OK when you are finished ~l~fining the peer-to-peer ~, relation~hip. You will be retumed to the En~lsion/Builder workplace. ;~
P~
-r I

21iO~O L

Assoaotions An association is a non-hierarchical relationship between classes. In some cases, associations must be established as a prerequisite before establishing other kinds of relationships. For example, if you want to invoke a form as part of a peer-to-peer relationship between data classes, you must first establish an association between the form class and one or more data classes.
Associations can be established between the following class types:
Form class and data class Form class and form class Data container class and data storage class Query class and data container class Query class and dynamic container class Form class and Associations can be established between form classes and data classes data class to allow forms and data objects to interact at run-time. An association ~ ~
must be created between form and data classes if you want to . . . ~_ invoke a form when user drags and drop one data object onto ~
another ~_ invoke a form from a data object's object menu that can access and ~_ update the data object's data attributes, or ~_ transfer data from a data object onto an open form by dragging and ~_ dropping ~ 76~,,~
To associate a form with a data class, drag the form class and drop it S.
onto the data class. A confirmation message will appear. You can associate a form with any number of dir~ t data classes, and associ~
ate any number of different forms with a single data class.
~-'Y,~Y
~s r ~ 21i9970 L

DfflNlN6 PEIAnoNsHlPs sE1wEEN CIASSES

Invoking form as part Associating a form class with one or more data classes is the first step of peer-to-peer in setting up a peer-to-peer relationship in which users can drag and r~ nship drop one data object onto another to invoke the associated form.
Bills t~
~' I_ ; . -Blll t3 be pdd:-- -From ~--IPhone ~ I IS~h,gs Ce ~alance S9~1.761 I SIZ.345.67 -Amo~d ~ be p~lid:-~ I ~ l l ~j~
0~quing S~ng~
K --:~ .
to pl-y ~ill fro~ t~ ccoull ~
In~7g a folrn as p~t of a pffl-tO peer rehl~nship 5 If you want to invoke a form when users drag and drop one data object onto another, you must ~c~ e the form class with the target data class. If you want the form to be able to update the source object as well as the target object, then drag and drop the form class onto the source data class. ;Z
-The r~m~ining steps involved in defining a peer-to-peer r~ n~hip to invoke a form are described beginl.. "g on page ??-??. --Invoke form from an Associating a form class with a data class allows you to invoke the form Z
object menu option from the data object's object menu, and to display data from the data O
object in fields within the form. Depending on how the form is de- V
signed, it can also update the data .~pl~:s~.led by the data object using values entered by the user in the form.
9 ~ SalalyRevlew ¦
3_ ~E Name --I ~pen ~
~_ ~ Cu~ent Salary I SO.¦
NewSala y I SO.¦

Invoking a fonn f~orn a ~a ob~t's obied menu r 2~10970 ~ L
Assod0~ns If you specify data attributes from the data class as primary data sources for form fields, the form will display data from the data object that invoked it. If you specify data all~il,ules from the data class as the ~tinAljon for form fields, the form can update the data object as well.
Transferring dalaA~socidli-lg a form class with one or more data classes is the first step ontoform in providing for users to users to ~.,.. ~r~.~ data onto form fields by dldggillg and ~ ,ppiug a data object onto an open form.
For example, you might provide for users to drag and drop infnrmAtion from an employee object onto an open salary review form.

Name ~ a Ron~ano 1 ~4 Cl Employees 1~ ~ Tl~e ¦TechnicalWrlter a a ~ . Depalment ' I ~
5~ E~ D-bno Supen~lsor ¦~lan Ho 1 ~1 al Cuner~ Salaly 1~ z ,~Jon Ho r~ Ch~lq Uing ~un ~lew Salar~ I O

Transferrhg dob onb hlm r ~
You can also provide for the users to update the employee's salary ~_ alll;l~ule by entering and accepting a new value in the form field. ~_ To permit users to transfer data onto an open form by ~irAgging and e~_ dropping one or more data objects, you must associate the form class ~_ with the co~ onding data classes. You can associate the form class ~H _ with any number of cliLrel~t data classes, to allow the user to drag and ~
drop data objects from dil~~ l data containers onto the form. ~_ -~ ~r ~ 3 r '~ L
DEFINING RElA71ONSHlPS BE7WEEN tlASSES

For i~rur ' ~n on After associating the form class with the data dass, you can design th specifying data sourcesfor form and specify data all.il,tlles belonging to the associated data class for7nfields, see page ??-??. as data sources for fields appea~ g on the form.
Cata Scuroe aass Annbub ¦Source ¦~ New Employee IYI ~
Emprlame Plcture __ S . r~
.. e ~
Spe~ ~bb sowte fcr fcrm fiA~l _ If you want to update a data object using values entered by the user in the form fields, then specify data dlllil,tlles in the as~ialed data class ~1 as the destination for fields a~peali lg on the form. 1~1 ;~
---r ~ 21iO~70 Assoaaibns Form class and ~Cso~i~ting one form class with another allows you to invoke one form form class frorn another. This process is known as form chaining. Once invoked, the second form can reference controls and instance variables stored within the invoking form.
Transier Funds From account To account Baiance Display te~

From account Bill to py 8 Amounttotransier Baiance: Baiance:
!;~
~lh ¦ ~#,~ . _ Amountto pay ~

¦~ ~ AV
=

In~bnaonestandabneformfron and~er s~
To provide for one st~ri~ nne form to invoke another:
1. Drag and drop one of the two form dasses onto the other.
Fori"Jin ': onassigning 2. Using Forn Designer, design one of the forms and assign the ~
~nctions to push ;uttons, pr~rlr~fin~; ChainTo function to a push button ~!e~_ see page ??-??. ~@_ 3. From the dialog that appears, select name of the associated form you ~_ wish to invoke. _ _ Labei: ChainTo Idenmer: Bllli'ay Assocbted fonns:

1 ~
OK ¦ ¦ Cancel ¦
S~hng dle form io be invoked 0 1 3~
r 21~0970 ~_ L

DEFINING RElAnONSHlPS BEIWEEN CIASSES

Data container class Associating a data rontAinPr with a data storage class provides a link and data stor~ge between the data objects displayed in the data contAinPr at run-time, class and the datafile or dAtAhace l~lrs~led by the data storage class. The data ~o. .I,.i.~P~ can display records from the datafi~e or ~lAtAhAce as data objects within the cn~ ;"-~- window. Users can add new records to the datafile or ~lAtAhAce by creating new data objects within the data P~
The Datafile template is used to create a datafi~e class l~P~ g an ASCII datafile in Micro Focus format. You can link data rorltAin~rC to a new (1AtAfilPc or to existing ones. No A~ itinn~Al so~lwdl~: ic required to support this data storage format. The Database telll~lale is used to create a ~lAtAhAce class lr~lr~llling a rPlAtin~nAl lAtAhAcP You can link data cn~ to existing database tables, or create new ones. You must, however, have the ~pl~l;ale database soflwal~ already in-stalledonyourw~ lA~
Note: To create a link between a data contAinpr and a datafile or flAtAhACP, Before you can associate a drag and drop the data container class onto the data storage class.
data container with a database class, you must If you are associating the data container with a rlAt~hAce class, the data assoc~ate a data class zmth thedatacontainer. c--nl~ 's attributes view appears. From here, you can specify the ~lAtAhAce table to which the data cn,~l,.;".~r Will be linked. To link the datac~ . toanexisting~AtAhacetable,clickonDBTableandselect from the drop-down list. To create a new ~lAtAhAce table, enter the new table name in the DB Table field. If the specified table is not found, it will be created.
__ O
Name ¦Amerlcan Employees ¦ r DBTable ¦_ ~
Subject ~_ .-1 ¦ OK I I ~ -~
fin9ndnhbose hbk r ~110970 L
A~'0~s You assoc;ale any number of diI[e~ l data containers with a single d~tAh~e class.

L . L

Data `L Data r ontaher p ~ 8 - / \, ~ \ ~
link ~ link link r~
Ds Table 1 D~ Ta~e ~, data ~ ~ data data Database dslta data ~ data Z
--You cannot, how~vel, associate multiple data cont~in~r~ with a single ~
datafile class. ~_ For rnore in~, .. t r. on If you plan to link a data ont~in~r to an existing datafile or rl~tah~e ~_ linhng to datafiles and table, you can save yourself the effort of defining data dlL.il,ules for the __ ~/ ' ,seepages??-?? corresponding data class, since En~lsion/Builder can autcm~ti-s~lly ~ _ and ??-??, I.~f~e~ y incorporate the data d~finitions already c-mt~inr~-1 within the datafile ~_ or d~t~h~se table. Simply ~CsQ~i~te the data cont~in~r with the data storage without d~fining any data alL~ les. En~lsion/Builder will autom~ti~ ~lly define the data all~ s using the existing data defini~
tions.
~a,r.i~.~5; When linking to a new datafile or dntnbace, do not associate the data f~
container with a data storage class until you have completed defining the data attributes. Changing or adding data attributes after associating with the data storage class may corrupt the datafile or database table.

r ~ - 2110970 L

DEFINING RElA11ONSHlPS 8E1WEEN aASSES

Query class and Associating a query class with a cnnt~in~r class makes it possible for coi~t~.i. ,er cl ~sçes users to invoke the query form and views selected records from one or more i~t~h~ce tables. Records that match the search criteria entered by the user in the query form can be displayed one record at a time within the query form fields, logellæl within a query result box, or as data objects within the Cf...l,.;..~. object.
You can asso, iale a query class with some or all of the following classes:
one or more data Col tain~r classes a dynamic cn.~ . class a workplace class The associations you establish (ietPrmin~ how and where the query form is invoked, and which i~t~ha~e tables the query form can access.
With a single data If you a~so ~ a query class with a single data cont~in~r, the query container form can be used to scroll through selected records, or to ~letPrmin~
which records are displayed as data objects within the data co~.l";~.
The query class's label will a~llol,.ali ally appear as an option in the data co~ . 's object menu, and as an option under view in the data c~ . 's window menu.

,.,,~, Selected~ Z
Rom~no S_lect ~ O
~_ ~rlbutes ~ ~
Help ~ cons W
Sort I Detalls Arange Refresh now Using the query form, users can access data records stored in the ~i~t~h~se table to which the data container is linked. Once the query is performed, the user can scroll through the selected records by clicking on button defined using the Next and Previous functions, or click on a button defined using the Include function to display the selected re-cords as data objects within the data container.

~ ~ i r ~ ~ 2~1~97a L

~s Workplace ~e~ ~1 r ar~y cor.~aher~

r '", I C~ u~

n~

link ~ DB Table ~
~~ da~ ~
Da~abase data ~
r~Eda Z
-Asso~7g a qwr~ d~ss ~ith n single dah conh~r~
~

~th multiple data If you associate a query class with more than one data contAin -~r class, ~
containers you c_n quely the contents of the multiple ~1AhhA~e tables. The que~y _ class label will not appear at run-time as an option within any one data ~
's object or window menu, since the query class applies to E~_ multiple co.~ . To make the query form available to users, you ~_ must A~so~iAte the query class with a dynamic contAin~r~ wor}a, or ~_ workplace class, as well as the data c~ . classes. H ~

ii r ~ 211097D L
DEflNINB RflAnONSHlPS BEIWEEN aASS~S

r Wo~ace `~

oomponent I

auery ~

8 , r w, . ~JUI 1~ / \ wl I IIJUI lel 11 link link ~ \
__ link \ ~7 D~ Tab e L D~ Table data data data ~ Da~abase ~ data data data Asso~h'ng n qu~y rhss ~h muhqde ~brb tonh~'ner doises Usirlg the query form, users can access data from all the database tables to which the associated data ro.~ are linlced. The result of the query are displayed within the form itself, one record at a time. ;~
--With a dynamk If you asso-;dl~ the query class with a dynamic container class, the container query form can be used to extract records from multiple l~tAhace tables, and to display them one at a time within the query form fields, together within a query result box, or as data objects within the dy- ,~
narnic rnnt~inf~r To provide for the results of a database query to be displayed at data objects within a dynamic container, you associate multiple data con-tainers with a query class that is, in turn, associated with a dynamic rc-ntAin~r class. Each data Collldi.ær is associated with a single data class, and linked to a particular l~t~h~ce table through a database class.
The dynamic cont~in~r iS grouped as a dynamic component of static rnnt~in~r, workarea, or workplace class.

r ~ `' ~ 2110g7~ L
A$oa'tA~s r Wo~e ~ , component r ~ ~
~ .
associatlon associatbn assodatbn "~
component / \ component [~
associatbn association link iink ~ \
Gnk ~4 D8 Table DE~ Tabb Z
data ~ data data ~ Da~ ~ data ~ ~
data data ~f data ~ data -At run-time, the dy~ ic cont~in~r dlllo~ dlly appears as a tem-plate within the Object Tel..~lal~ folder. To create a dynamic con~in~r object, the user drags the dyl~uc container template and drop its onto the static cor~ ., wu~ a or wr.rkpl~re of which it is a component..
When the user double clicks on the dynamic container object to open it, the associated query form appears.
After specifying the search criteria, the user can click on a push button defined using the Include function to display matching database re-cords as data objects within the dynarnic conlai.æl. Al~ al.vely, the user can ciick on a button defined using the DoQuery function to display the m~t~hing records within the query form. Records from all the database tables to which the associated data c~mt~in~r~ are linked can be extracted and displayed.

I ~i r 21 ~09~0 ~ ` ~ L
DEFINING R~IATIONSHIPS aElWFFN (IASSES

The dil~el~nl kinds of relationships you establish between classes make possible a number of run-time scenarios, or application models. These models det~nnine the available methods of run-time interaction be-tween objects. Each application model offer dif~ l advantages and limitations, and provide varying degrees of access to data stored or senl~d by data objects.
The following application models are do~--m~nt~cl in this section.
invoke form by dragging and dropping data objects (see page ??-??) ~
transfer data between data objects by dragging and dropping (see ~, page ??-??) invoke form from data object's object menu (see page ??-??) drag and drop data from data object onto form (see page ??-??) invoke form from static ~unla-llel, workarea, or workplace (see page ??-??) initiate database query from data container (see page ??-??) ~
initiate database query from dynamic container (see page ??-??) ~, initiate database query from workplace (see page ??-??) The steps and relationships involved in setting up each model are listed anddescribed '~

r 21i9!~
. L
Appli~ion Modek Invoke form by In this model, the user drags one data object (the source object) onto d~ ayging and another data object (the target object) to invoke a form. The forrn can dropping data access and update data ~p~s~,led by either the source data object, or objects the target data object.
~ Bilk ~
~ ~' I_ ~. . -Bl tobefAld:-- r-Bi~ Phon- Bil Phone Blll I ISa~hgs ,, Balance Babnce ~gû.7f,~ 5.S7 1._~~ 1~
~ ~ ~o be paid:-l l Ch~Dg S~ings ~

Roleua- to poy ~ill frcn t~ coun 17robngfolrn~orndra~
Data access æ
The form can access and update data all~ ules stored by either the source object or the target object. The form cannot reference instance variables stored in either object.
~elationships form class ~ t~-l with both data classes peer-to-peer rPl~fi~n~hip between data classes ~
each data class a c~ o~ l of a data container ~_ each data c~ ;. .P~ associated with a data storage class --3 ~1 r r 2 1 1 0 9 7 0 L

~ \.

~ r~ ~ b ~

~odatbn ~ssodatbn r Dllb~ `~ --I ~ ~ ~
~ips - Sfeps Involved Step # Step ''~ Module Drag data class template from Create source and target ~, . , ClassTc.",' ifolderanddrop .. a a c asses onto Class Folder 2 Define data attributes for Data Attributes Designer ~--source and target classes Drag fomm class template from 3 Create form class Class Templates folder and drop onto Class Folder 3 Associate fomm class with Drag form class and drop onto source and target classes source class, then target class Drag source class and drop onto Establlsh peer-to-peer 4 r~ ,~1 between source target class; from dialog that and target classes appears, click on Invoke form :
option and select fomm from list Fomm Designer, select data attributes from source or target Design form class and link class as the form field's data form fields to data attributes source; select data attributes from in source and/or target source or target class as the field's classes ~!t -- ,- to update data attributes in source or target objects r ~lDg70 L
_' App/i~otion Modek Transfer data In this model, the user ~ S~l, data from one data object to another between data data object by ~lrz~mg and dropping. When the user drags a source objects by Jl dy i"g object and drops it onto target data object, the data from the source Y object is 1., ~r~.,~l to linked fields in the target object. If the target and J, Op,~ g object's alllil,ules view is not alreadybeing displayed, itwillbe opened.
Changes to the target object's data alllil,ules will not take effect until the user clicks on a push button defined using the OK function or an equivalent procedure.
You can provide for a single data object to receive data from any number of .l;rrr..~.~l data objects.
-_ Cl Custorners ~ e ~ ~ ¦NewOrder ¦ I _ Mak~ndl-~ S~Whghl For deta~led ,.~, . ' . on ~
dt.~lv~,;,gan~ lia.. Customer ~ ~<~ _ using this model, see the ~ Name IAllen Suckle~
Inwioe Arpli~ ion tutorial in Chapter 16. -Car ~il Cars I o.Dl Make Honea ¦ Model ¦Accura Year ~ VIN ¦7rgs3g3s3~
P~ce Stl. gg.gg I ~
E~E3 ~f -Dmggito and dtopping dtlto onb olhihlres view Data access Data can be accepted from any number of source objects, but can only be saved to the data alllil,ules of the target data object.
n~ ~ti~n3l~ips e~_ peer-to-peer r~l~tit-ncllips between target data class and each of the ~j_ source data classes each data class a component of a data c~,nldme each data (~-nt~in~r associated with a data storage class r 21~0970 ~ ' ~ L

~peer-to peer_(~

component component ' Dala ~ Dala ~Einer ~ cor~r ~ ~_ association associatbn Data sto~g~ Dala stolalle ' d a s s ~ d a s s _ _ ~r~ips -Steps Involved Step # Step M~
Drag data class template from Class 3 Creab data classes Templates folder and drop into Class Folder Define data 2 attributes for each Data Attributes Designer class Establish drag and , .. . Drag source class and drop onto target 3 dropn ~ class. Fromdialogthatappears,clickon between source OK r~ .
and target classes Form Designer; select data attributes in source class as altemate data sources for Design data fields in the target class; to save the 4 attributes view for l~ ,hlled data as part of the target target data class class, select co.. espol-. - .9 data attributes }
in the target class as primary data sources for the same fields r ~_ L
Appli~a~ion Models Invoke form from In this model, the user invokes a form by ~PIecting an option from the data object's object data object's object menu. Data from the data object may be displayed menu in fields within the form. The user can modify the data within the form and use the form to update data all-i~ les within the data object that invoked the form.
~11 Salary Re~
_~ Name I ¦
pen ~ 1 D .
_~ ~ aJrrent Salay I SO~
New S~ary I SO~
¢

Ora0inglmddroppinglhbonb form Data access If yOu specify data d~ u~ frOm the data Class as p~ aly data sources æ
for form fields, the form can access data from the data object that ~,"
invoked it. If you specify data alLlil~ul~s from the data dass as the ~l~tin~ n for form fields, the form can update the data object as well.
, Relationships ~
form class is ~eeo~ i~tpd with the data class ~_ data class is a cu.. ,p~ l of a data container ~
data co~ . is associated with a data storage class ~_ _ .. ~
i_ -~1~
~P

I Ig r ~110~7n L

DEFINING RElAllONSHlPS 8E1WEEN aASSES

[~ as t r r~a w~ner ~1 Dala stora~
d~ _ ~Sips _ Steps Involved Step # Step M~ ~ ' 'M
Drag data class template from Class Create data class Tc~ folder and drop into Class Folder Defne data j-2 attributes for each Data Attributes Designer ;~
data class r_~
Drag foml class template from Class 3 Createformclass Tc.-~ folderanddropintoClass Folder ~;~
Associate fomm Z
4 class with data Drag foml class and drop onto data class o class Foml Designer; select data anributes in r ~ SC ~' J data class as data source for Design form and fields appea, i- ,g on the forrn; to update . . data object using values entered by the ~f data attnbutes In user in the foml fields, select data data class attributes in the r-~ ' data class as the de -, - n for fomn fields r ~_ 2110970 L
Applittnicln Modek Drag and drop data In this model, the user drags and drops any nurnber of data objects onto from data object a form. The data ~ .~nled by the data object(s) are transferred to onto form linked form fields. Once the user updates and accepts the co,~ of the form, the updates data can be saved back to the source data object(s).

Name ¦Delllnat~omano Cl Em~o~ ee5 1~ ~ T~e ¦Technica~ ter ~ Depalbner* -- i 5~_ h~ Edm~n liu 0~
Romu o Super~lsor ¦Alan Ho t~rrent Salay ¦~
~n Ho D~y Ch-ng Mbg Lom ' j_ NewSal~ I ~
-Dr~ng cmddtopping d,nci onb forrn ~id Data access Form can accept data from any number of ~c~of-i~terl data objects, and can update the data and save it back to the data alllil~ules of the source data objects.

n~ t;~ hips form class is associated with each of the sources data classes ~_ each data class a ~ pon~l of a data container ~;_ each data container associated with a data storage class ~
-r ~ ` ~ L
OEFINIHG R~AIIONSHIPS BErwEEN a~SSES

.. . ..

Data ~ f Da~ ~

a~si,M 0 Steps Involved ~
Step # Step Me ~ ule E~l Drag data class template from Class Create source data Templates folder and drop into Class classes FoWer Define data ~
2 attributes for each Data Attributes Designer z source class Drag form class template from Class 3 Create fomm class Tul~lates folder and drop into Class Folder Associate fom~ Drag fom~ class and drop onto each data ^
4 classwith each of class the data classes Form Designer; select data anributes in ~cso~ ~ data classes as data sources Design form and for fields appea,i"g on the fomm; to update . . a data object using values entered by the data attnbutes In user in the fomm fields, select data source class attributes in the A~;Of; '' ~ data class as the ~ t;n ,tion for form fields , r 2110~70 L

A,opli~nl~det Invoke form from In this modeL the user invokes a form by ~lr~gging a form template static co~t.. i.,~r, from the Object Tell.plales folder and dropping it onto the static con-workarea, or tainer, workarea, or workplace of which it is a dynamic component.
wo~k~Jlace ~ Templates lifl[3 E9 [;~ Depar~ment N-w Empio~,e- Sdoly Peu-w ~ent Salaly I 5-01 New Salar)~ I SO.OO
.. ~ i ,~
-Inv~king form using fonn ~enzplole When ycu assvcza2efonn If the form class is a static component of the static cont~in~r, workarea, Z
class within the a, r v~ or woll~lace class, the form appears not as a tem~lale but as an object container cz'ass, you will be within the static cont~inf~r, wv.l~l~a, or workplace. To invoke the form asked whether to allowed m thls case, the user double cllcks on the form obJect.
mulhple~n(~v~ lio..softhe fonn. If you click on Yes, the ~1 fonn will be a dynamic If form dass is associated with one or more data classes, and form fields ~
' and appear as a are linked to data alllil~ules in data classes, the user can transfer data o template. If you click on No, by ~Ir~ggin~ and dropping one or more associated data objects onto the thefonn will be a stahc open form. Depending on how the form was ~ ign~-l, the form can . and appearas an update data all~ les in the source data object(s). ~
Data access ~_ TheformcannotaccessorupdatethedataalllilJul~sofanydataobjects, unless and until the user drags and drops one or more associated data ~
objects onto the open form. If form fields are linked to data alllil~ul~ ~_ in the associated data classes, the form can access and update data ~_ alll;l~ules in the source data object(s) at run-time.
.i_ -~9 r 21iO~7~
L
DERNING REUTlONSHfPS BE1WEEH tlASSES

ti~l) ;hips form class is a dynamic component of static c-nt~in~r, workarea, or workplace class form class is associated with each of the sources data classes each data class a Cb~ ul~ of a data co~ ,1,.; .~.
each data . ~ associated with a data storage class -r ~ ~ ~1 ~odabon asso~

aæodabon æsocitffon Data~ Datastcrag~
~J ~J O
~r~ships r r ~ 211~970 L

Applitt~n M

Steps Involved Step # Step f ~
Drag data class template from Class cClasses Templates folder and drop into Class Define data 2 attributes for each Data Affributes Designer source class Drag fomm class template from Class 3 Create fomm class Templates folder and drop into Class Associate fomm class with each of Drag fomm class and drop onto each data ~1 4 the source data class classes r_~
-Foml Designer; select data attributes in i~
data classes as data sources Deslgn form and . . ~_ kf f- Id t forfleldsapped"ngontheform;toupdate . . a data object using values entered by the data attnbutes In user in the fomm fields, select data source class attributes in the a~ ~c ' ~ data class as the ~ I :~ for fomm fields Create static Drag appl-,p,i template from Class ka,ua, or Templates folder and drop onto Class w~ l~lace class ~_ Associate fomm _~_ class as static or ~_ dynamic Drag form class and drop onto e~_ 7 colllpO~ of d~Jplupridle class; indicate whether ~_ static cu, ,er, multiple inv., - 'ic ns of form are allowed ~ _ ~.olha,~a, or e~_ v.vll~lace class ~_ -~@
-r ~ ~ ~ 2110970 L

DEFININ6 REUTlONSHlPS 1~1WEfN CIA50 Initiate ~l~t~h~se In this model, the user invokes a query form from a data co ~.H.i.. ~. to query from data extract and display selected records from the Aqso~iAte~l r~AtAhace table.
container WhenyouAccoriAte aqueryclasswithasingledatac~ la;~l class,the query class's label alltomAti(~Ally appears as an option in the data col.ld.l~ 's object menu, and as an option under View in the data "la;.,.o~5windowmenu.
For tnore i,.~" on Using this option, the user can invoke the associated query form and creating and defining specify search criteria for the query. Records that matches the search databasequeries,seepage criteria are displayed one a time within the query form, or as data ??-?7. objects within the data c.-.. l,.;. ........................ ~
~1~
-Selected Rom~no _ llrlbuteS
_elp ~ cons Sort I Detalls Amnge Refresh now r ~ame Dept !~- I ;;~
S~ I I æ
Ti~e I~Technic~ wr ter I r ~
-Super~sor ~ 3q~ Ed~ 5 I~us~ r~
Inv~bna a quer~ fortn ~iwn a dah conhiner Data access The query forrn can display and update data records stored in the ~1atAhAce table to which the data o-~ntAin~r is linked. Within the data o~-ntain~r, users can display and update the data attributes of any data object.

r ~ ~_ 21109~0 L

Appli~n Modek ~ tiJ~ ipS
data class a dynamic component of data c.)~
data co~ class a static component of static cf-n~in~r, workarea, or workplace data c~ ~ class associated with database class query class associated with data c ,~ ~ class ~ ¢

r ~ J~ 1 r~
~ ~1 ~
a-- ~ \ r~
Dalabaæ iink æ
~ \
DB Tab e _ data datà
_ ~oss relalionships ~_ Note: If you plan to link a data container to an existing datafile or dntnbase ~ _ table, associate the data container with the data storage class before you ~_ define the data attributes for the corresponding data class. EnVi- ~_ sion/Builder will aulo ~tica11y define the data attributes using the data definitions already contained within the datafile or database table.

I ~
r '- 2~10970 L

DEFININ6 RElAnONSNlPS BE7WEEN nASSES

Steps Involved Step # Step Me~
Drag data class template from Class Create data class Templates folder and drop into Class Folder Define data 2 attributes for data Data Attributes Designer class Design data 3 attributes view for Form Designer data class Create data Drag data co,~ er template from 4 . Class Templates folder and drop into ., ,er class Class Folder Make data class ~ ~
Drag and drop data class onto data 0 cu,.. pone,lt of data . .
CGII' Merclass co" ,erclass Drag D~ AC 3 template from Class ~
Create database ---6 I s Templates folder and drop onto Class c as Folder Ass: data Drag and drop data CGII' ' rer class onto 7 cu" ,er class with I - - - class --database class Make data con .er Drag and drop data co" ,er class onto ~
8 co",pone:,dof staticc~", ,er, ~.. kd,~a, or~ l~lace æ
co" ,er class class ~
Drag query class template from Class ~f 9 Create query class Templates folder and drop onto Class Folder Associate query Drag query class and drop onto data cu,, ,er co" ,er class Form Designer, select data attributes 11 Design query fomm from data class grouped within A.C.sO~ d data co" ,er as data source for query form fields r '~ 21~0s7n L
Appli~ion M~dels Ir.iti~t;"ç, J~t~h~ce In this model, the user creates a dynamic cont~in~r and uses a query query-from dynamic form to extract and display records from multiple database tables. To container create the dynamic co.~ , the user drags a template from the Object Templates folder, and drops it onto the static container, workarea, or workplace of which it is a dynamic co~ o.l~lt. The query form auto-matically appears when the user double clicks on the new dynamic c~ , to open it.
Templates I ItO

Empb~ rtt _~ ~r Empbyee For more i,.~, '; on ~ t Sales Penonnel ~
creahng and d~ining _ ;ii~
database queries, see page ??-??. ~lame Dept ¦Sales Salaly I I "_ T~e ¦ æ
Super~lsor ¦ I O
ll~!ude~ V
In~hn.q o o~uhh~e que~ frorn o d~nonii tonhner From the query form, the user enters values in form fields in~i~ Atin~
the criteria by which records to be ~Ytr~rte~ from associated database ~E_ tables. The extracted records can be displayed within the query form ~_ itself, or as data objects within the dynamic container. ~_ Data access Records from any of the a~so~:iated i~t~h~ce tables can be displayed, within the query form or as data objects within the dynamic (~f)nt~in~r Users carmot modify or delete any of the database records displayed within the query form, or as data objects within the dynamic container.
@
-~ r ` ~ 2~ iO97~ L
DE~INING RElAnONSNl~S B~ EN aASSES

n~t~ S~
eadl data dass is a dynamic component of a data cc.l t~in~r class each data .~c .~1,.;. ..~ class is associated with the dynamic container class each data c...~l,.;..~. class is ~o~ te~1 with a database class query class is ~so~ l with each data l~-nt~in~r class -query dass is aqso~ e~l with dynamic CU1~ 1 dass dynamic cn.~ class is a static compol ~ll of the static . .
wo,h~a or worl~lace class ( Workp~

assoch~on ~r~

assuiabon assodalion _1 ~ / \ ~ ~
~{~ (~ ~
associa~on associa~on \ ~
6nk ~ ~nk ~¦

DB Tabb I D~ TI~bb data ~ ~ ~ datta data data data ~ data aa$rebh'onships r 2~1097~ L
Apdi~onM~

Steps Involved Step # Step Me ~ t Drag data class template from Class Create data class Templates folder and drop into Class Folder Define data 2 attributes for data Data Attributes Designer class Design data 3 attributes view for Form Designer data class Drag data cu" er template from 4 Create data Class Templates folder and drop into ~
Col ,er class Class Folder Z
Make data class Drag and drop data class onto data con.~,one,~tofdata containerclass Drag D~~ Ace template from Class ~
6 Create ddtdbase Templates folder and drop onto Class æ
class Folder Associate data th Drag and drop data co~, ,er class onto database dass database class ~f Drag dynamic cu,l .er te~l r ~ from 8 Create dynamic Class Templates folder and drop into ~

Drag query class template from Class ~_ 9 Create query class Templates folder and drop onto Class e~_ Folder Associate query Drag query class and drop onto data _ _ classwitheaChdata co-l lerCIasseS ~~
c~n Ier ~_ --r ~ ~ g ~ Q L

DEflHlNG RElA71ONSHlPS Bf.1WEEN aASSfS

Steps Ir..vl~ (cont'd) Step # Step Me e ~ e Associate query Drag query class and drop onto 11 class with dynamic dynamic co,. ,er class co.. .ar Form Designer; select data attributes from data class grouped within 12 Deslgn query fomm r-S^ ~' ' data co- .er as data source for query fomm fields -Make dynamic corl larc~.,,.onald Dragdynamiccul lerclassanddrop J
13 of wc ~ ea or onto wt,rl~,ea or ~.~,l~lace class ~,~ o(l~lace g~

E~
-z --r 2110s7n L
A,opli~obon Modek Initiate ~h,t~h~se In this model, the user invokes a query form from the workplace, query from ~tnA~cting and display records from any number of database tables.
worh,ulace Depending on what option you select when Aqqo~ iAting the query class with the workplace class, the query form may appears directly on the workplace or as a template within the Object Templates folder. Users can invoke the query form by double clicking on the workplace com-ponent, or by dragging the query template and dropping * onto the workplace.

Name Templates l-u~l 31 Dept ~ ' '' For 1nore Inl(jr ' .~.. on ~ 1 Salary I I E
creatinganddefining S~uyR~ew N~wEmp~ee oPUffl ~
database queries, see page Tl~e ll-Techrllcal Wrlter ??-??. SuperYisor I I
. - , .- ~

Inilinbng~ahsequer~from workp~lote Dah access -If the query class is associated with multiple data containers, users can view records from any associated lAtAhaqe table within the form, but ~_ cannot modify or delete the data. ~_ -I ~
r ~ ' ~ X~ 70 L
D~FINING REL~llONSHlPS PE7WEEN aASSES

n~ tt~sl~ips each data class is a dynamic col--~o~ t of a data c ntAin~r class each data c~-r~ class is associated with a ~lAtAhACe class query class is _ssociated with each data contAin~r class query class is associaled with workplace class ¦ Wo*~

cor~nt . _ D~ `L
component ~mbher dass _ 5~
association das~
association association _ component / \component ~;
~ ~ ~
association association \ j~
link link [~ \
link DB T~bb ~ Ds Tab e data ~ data data ~ data data data a~r~'On~i~

r 211~&

Steps Involved Step # Step 1 lUodule Drag data class template from Class Create data class Templates folder and drop into Class Folder Define data 2 attributes for data Data Attributes Designer class Design data 3 attributes view for Fomm Designer data class Create data Drag data co-- .er template from co" ,er class Class Templates folder and drop into ~1 Class Folder Make data class r~
- - - 5 co".~,on~ It of data Drag and drop data class onto data ~_, co" ,er class cor, ,er class a Create database Drag D-{~ e template from Class class Templates folder and drop onto Class Folder -Associate data Drag and drop data co" ,er class onto database class database class Drag query class template from Class 8 Create query class Templates folder and drop onto Class ~
Folder ~_ Associate query --~
9 class with each data Drag query class and drop onto data ~_ Col, ,er cor, ,er classes ~_ Form Designer; select data attributes ~_ Design query fomm from data class grouped within ~_ f ~ data cor, ,er as data ~_ source for query form fields 11 Associate query Drag query class and drop onto ~
class with ~.J~ 1ace ~.J,h~,hce class ~@

T~

li r

Claims

What is Claimed is:
1. A program design tool comprising;
a set of predefined class templates to effect different functional utilities in an applications program and said class templates having predefined relationships to other class templates for interaction therewith and each such template being represented visually on a computer screen by an icon, a workarea to provide a substrate for building an applications program, a pointing device to enable a user to select, to pick up, to drag and to drop icons from one place to another on a computer screen workplace containing the workarea, in which the class templates include a data class, a query function class, a form class, a function class, a graphics class, a data container class, a static container class, a data file class and database class.
CA002110970A 1993-12-08 1993-12-08 Workplace applications builder Abandoned CA2110970A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CA002110970A CA2110970A1 (en) 1993-12-08 1993-12-08 Workplace applications builder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CA002110970A CA2110970A1 (en) 1993-12-08 1993-12-08 Workplace applications builder

Publications (1)

Publication Number Publication Date
CA2110970A1 true CA2110970A1 (en) 1995-06-09

Family

ID=4152595

Family Applications (1)

Application Number Title Priority Date Filing Date
CA002110970A Abandoned CA2110970A1 (en) 1993-12-08 1993-12-08 Workplace applications builder

Country Status (1)

Country Link
CA (1) CA2110970A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7716629B2 (en) 1999-10-01 2010-05-11 Vertical Computer Systems, Inc. System and method for generating web sites in an arbitrary object framework

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7716629B2 (en) 1999-10-01 2010-05-11 Vertical Computer Systems, Inc. System and method for generating web sites in an arbitrary object framework
US8949780B2 (en) 1999-10-01 2015-02-03 Vertical Computer Systems, Inc. System and method for generating web sites in an arbitrary object framework

Similar Documents

Publication Publication Date Title
Cooper Java design patterns: a tutorial
US7403948B2 (en) Workflow system and method
US5949998A (en) Filtering an object interface definition to determine services needed and provided
US9921810B2 (en) Dynamic creation of object classes
US5471596A (en) Computer memory device holding a data structure for implementation of function objects
JPH07121554A (en) Product description data organization and access method regarding engineering process
JPH11316675A (en) Computer system
Löwy COM and. NET component services
CA2110970A1 (en) Workplace applications builder
Herzum et al. The business component approach
EP0897149A1 (en) Framework for business applications providing financial integration
US7316002B1 (en) Deriving an object class by inheritance, instantiation or cloning
Rumbaugh et al. The unified modeling language
Hutchison et al. Natural Expert: a commercial functional programming environment
Bönnen et al. SAP NetWeaver Visual Composer
Pastor et al. Specifying interface properties in object-oriented conceptual models
Schussel Mapping out the DBMS territory
Bronson et al. Introduction to Programming with Visual Basic. NET
Rogers A simple architecture for consistent application program design
Urgen Herczeg et al. XIT-A Multi-Layered Tool for User Interface Design
Berdie et al. Technical considerations regarding the modelling and implementation of a Web Dynpro application
Mørk Evolution by Resemblance in Component-based Visual Application Development
CA2293114A1 (en) Representing a data mapping of an object reference
Khawar et al. Developing Enterprise Java Applications with J2EE and UML
EP1619619A1 (en) Method, computer system and computer network for implementing a business application

Legal Events

Date Code Title Description
FZDE Dead