|
In Part One you learned
about the Review: How a Purchase Transaction Works Electronic transactions span a wide range of operations including ATM transfers, bill paying, mortgage maintenance, loan origination, and financial planning--just to name a few. This series concentrates on a generic purchase operation to help you learn the basic concepts and apply them to other types of operations. When a shopper selects Pay on the merchant server to finalize a purchase transaction, the web server transmits the appropriate JCM from the server site to the JCC framework installed on the user's machine. Upon receipt of the message, the JCC framework queries the operation registry to find out which installed cassette is registered for a purchase operation and loads it along with the applicable protocol and instrument cassettes. If the proper operation cassette is not available or if the user lacks any cassette required for the operation, the JCC framework can locate and install the required cassette using information in the JCM. Operation Cassette Classes
Without action, there can be no transaction. An operation cassette defines
the action. An action is some activity like a purchase. Operation cassettes
require one
The implementation for the operation Bean's Protocol Cassette Classes
Electronic actions are transferred between the JCC client and web server
according to generally recognized standards.
A protocol cassette implements one electronic transfer standard.
One operation needs at least one protocol, but may be able to work
with two or more as indicated in the JCM for the operation.
A protocol cassette requires one
The implementation for the protocol Bean's Instrument Cassette Classes Electronic actions are paid for with the financial instrument specified by the shopper. An instrument cassette represents a user-specific financial instrument such as a credit card. The JCM for the operation specifies valid instruments for a given web site.
Instrument cassettes require one
Step 2: Implement the Operation Bean Operation, protocol, and instrument Bean implementations are similar and somewhat involved. The good news is that their interface classes adhere to a general design pattern to simplify and enable commerce Bean operations. If your commerce Bean implementations keep to the pattern inherent in the interfaces and classes, the JCC framework seamlessly handles the low-level details and saves you a lot of coding, testing, and debugging time.
The JCC framework instantiates an operation Bean, and calls its
Conclusion Different kinds of cassettes are made up of different elements. The key to writing a cassette is understanding what that cassette requires and implementing the classes according to the design patterns built into the interfaces and classes. In Part Three you see how easy the design patterns make it to add the gate and permit code for secure cassette interoperations. Related Links The JCC framework includes APIs for working with smart cards. JavaWorld is running a series that explains how to use them:
Java Card 2.0 is a framework and set of application programming
interfaces (APIs) for designing and writing applets that implement
smart card logic.
Monica Pawlan, a staff writer for the Java Developer Connection (JDC), is author of Essentials of the Java Programming Language: A Hands-On Guide (Addison-Wesley, 2000), and co-author of Advanced Programming for the Java 2 Platform (Addison-Wesley, 2000). Lisa Stapleton, a former programmer, has been senior editor for InfoWorld, UnixWorld, and Open Computing. She has served as editorial director for NetscapeWorld, the JDC, and is currently consulting editor for Sunnyvale-based TechWeek.
| ||||||||
|
| ||||||||||||