Information Technology Reference
In-Depth Information
enableExpress( )
disableExpress( )
startSale ( )
enterItem(...)
finishSale( )
cashPay(...)
cardPay(...)
<< Printer >>
GUIIf
PrinterIf
<< Inventory >>
1
*
Store
Product
<< BusController >>
<< InputController >>
SaleIf
find(.. . )
addSale(...)
update(...)
<< Termi n al >>
StoreIf
SaleIf
SaleIf
<< BarcodeScanner >>
<< SalesHandler >>
SaleIf
1
1
authoriz e (...)
CashDesk
Sale
1
1
1
0..1
<< Bank >>
1
BankIf
ClockIf
*
LineItem
Payment
<< Clock >>
CardPayment
CashPayment
date( )
Fig. 14. Component diagram of Process Sale
application components to the GUI components. Existing GUI builders can be
used for the implementation.
Each SalesHandler instance is connected to a bar code scanner, a card reader,
a light, a cash box, and a printer. The hardware controllers also communicate
with the GUI objects. For example, when the cashier presses the startSale button
at his cash desk, the corresponding SalesHandler instance should react and the
printer controller should also react to start to print the header of the receipt. The
main communication can be done by using events which are sent through event
channels. An obvious solution is that each SalesHandler has its own event channel,
called checkOutChannel . This channel is used by the CheckOut instance to en-
able communication between all device controllers, such as LightDisplayController ,
CardReaderController and the GUIs. The component, the device controllers and
the GUI components have to register at their checkOutChannel and event han-
dlers have to be implemented and a message middleware, such as JMS, is needed
to call the event handlers. The channels can be organized as a component called
EventBus . The component-based model of the system with the hardware compo-
nents is shown in Fig. 14.
After all the components discussed in the previous subsections are designed
and coded, the system is ready for deployment, that we leave out of this paper.
Service Component Architecture Based Implementation. Based on the
design of classes and components, additionally to the Java implementation of the
business log, we implemented the system using Service Component Architecture
(SCA) [3] and its supporting platform Tuscany Java SCA [1]. SCA provides
a language-independent way to define and compose service components in the
system, and it also supports different language-specific ways to implement the
components. The SCA component specification can be generated from rCOS
 
Search WWH ::




Custom Search