Compaq Reliable Transaction Router Objects, Functional and Object-Oriented Programming Compared

Page 41

Object-Oriented Programming

Table 2–1 Functional and Object-Oriented Programming Compared

Functional Programming

Object-Oriented Programming

A program consists of data structures and algorithms.

The basic programming unit is the function, that when run, implements an algorithm.

Functions operate on elemental data types or data structures.

An application's architecture consists of a hierarchy of functions and sub-functions.

A program consists of a team of cooperating objects.

The basic programming unit is the class, that when instantiated, implements an object.

Objects communicate by sending messages.

An applications architecture consists of objects that model entities of the problem domain. Objects' relationships can vary.

Objects

In the object-oriented environment, a program or application

 

is a grouping of cooperating objects. The basic programming

 

unit is the class. Instantiating, or declaring an instance of,

 

a class implements an object. RTR provides object-oriented

 

programming capabilities with the C++ API, described in the

 

C++ Foundation Classes manual. Objects are instances of a

 

class. In a transaction class, each transaction is an object. An

 

object is an instantiated (declared) class. Its state and behavior

 

are determined by the attributes and methods defined in the

 

class. An object or class is defined by its:

 

State (attributes)

 

Behavior (methods)

 

• Identity (name at instantiation)

The name given at object declaration is its identity. In Example 2–1, the two dog objects King and Fifi are instances of Dog. The Dog class is declared in a header (Dog.h) file and implemented in a .cpp file.

Architectural Concepts 2–7

Image 41
Contents Reliable Transaction Router Getting Started Page Contents Reliability Features Figures Page Document Structure PrefacePurpose of this Document For all users Related DocumentationReaders Comments Reading Path= Tutorial System Manager Application ProgrammerIf V2 to Reliable Transaction Router IntroductionRTR Continuous Computing Concepts RTR Continuous Computing ConceptsRTR Terminology RTR TerminologyClient Symbol Server Symbol Roles Symbols Components in the RTR Environment Nontransactional messaging Transaction ID Controller Business Logic Odbc Model Database ServerApplication Presentation RTR Frontend PC BrowserJournal Browser11 RTR Deployed on Three Nodes 12 Standby Server Configuration 13 Transactional Shadowing Configuration RTR Server Types RTR Server TypesStandby server Standby in a cluster 15 Standby Servers 16 Shadow Servers Server1 Server2 Server3 Server4 17 Concurrent ServersPartition a Transaction19 Bank Partitioning Example Standby Server Configurations Anonymous clients Tunnel RTR Networking Capabilities RTR Networking CapabilitiesPage Three-Layer Model Architectural ConceptsThree Layer Model Three-Layer ModelBroadcasts RTR Facilities Bridge the GapFlexibility and Growth RTR Facilities Bridge the GapFlexibility and Growth Transaction IntegrityPartitioned Data Model Partitioned Data ModelObject-Oriented Programming Partitioned Data Model Object-Oriented ProgrammingFunctional and Object-Oriented Programming Compared ObjectsExample 2-1 Objects-Defined Sample Messages Class RelationshipsPolymorphism Object Implementation Benefits XA Support XA SupportServers Reliability FeaturesFailover and Recovery Failover and RecoveryRecovery Scenarios Recovery Scenarios Backend Recovery Router Recovery Frontend RecoveryPage RTR Interfaces RTR Management Station RTR Management Station RTR Create Facility DESIGN/ALLROLES=NODEA RTR RTRRECEIVEMESSAGE/TIME=0 RTR RTRSTARTTX/CHAN=C Interface Application Programming InterfacesRTR Browser Interface Application Programming InterfacesRTR C Example of an open channel call in an RTR client program RTR System Management Environment RTR EnvironmentRtrcomserv RTR System Management EnvironmentManagement Station Running Browser Software RTR System Management EnvironmentMonitoring RTR RTR Runtime Environment Optional External Applet Not Running RTR Runtime EnvironmentClient Application Whats Next? Whats Next?Page Glossary Broadcast BranchCallout server ChannelConcurrent server Common classesData marshalling Data objectEndian Fault tolerantEvent Event drivenInquorate FrontendJournal Key rangeMessage handler MessageMultichannel MultithreadedProcess PrimaryProperties Property classesRouter RollbackRTR configuration RTR environmentStandby ShadowTransaction Transaction controllerTransactional shadowing Two-phase commitTransactional message Index-1 IndexIndex-2