Académique Documents
Professionnel Documents
Culture Documents
Component-Based Programming
Frederick T. Sheldon and Kshamta Jerath Young-Jik Kwon and Young-Wook Baik
Software Engrng. for Dependable Systems Lab School of Computer and Information
Sch. of Electrical Engrng. & Computer Science Engineering
Washington State University, Pullman, USA. Daegu University, Korea.
sheldon@acm.org | kjerath@eecs.wsu.edu yjkwon@eecs.wsu.edu | ywbaik@daegu.ac.kr
Measurement Variables
2. Background and related research Figure 1b. Implementation and test of the
web-based auction system
Developing an online auction system requires making
include design of component integration frameworks to
decisions and selecting technologies to support those
prescribe an architecture that permits flexible composition
decisions. Some background information and related
of third-party components into applications [15], web
research on the technologies that we employed are
design reuse vis-à-vis code reuse [16], and reusability of
presented here.
components for quality software [17].
We implemented the auction system using component
2.1. Unified Modeling Language based programming for easy maintenance as well as
Traditionally, requirements analysis consisted of convenient reuse of these components. Three reusable
identifying relevant data and functions that a software components were developed – MethodofBidding,
system would support. The data to be handled by the Certification and RegistrationGood Components, each
system could be described in terms of entity-relationship handling specific and well-defined functions in the
diagrams, while the functions could be described in terms auction system.
of data flows [4]. Object-oriented software development
utilizes new design methodologies, and computer-aided 2.3. Auction systems
software engineering tools such as Rational Rose can
Auction systems are a major component of the
support these methodologies [5]. The UML (Unified
electronic marketplace that allow users at any site to sell
Modeling Language) is a language used to specify,
and buy products. The sellers set up auctions for their
visually model [6], and document the artifacts of an products while the purchaser who bids the highest amount
Objected-Oriented system under development. It wins the right to purchase the product in an auction.
represents the unification of a number of ideas from Previous studies on auction systems include those by
different methodologists. Using UML to design a system
Jane Hillston and Leila Kloul, Martin Bichler, Kao et. al.
improves its maintainability and reusability. Object-
Sandholm, Baik and Kim, Wooksun Shin [18]~[23].
oriented analysis techniques offer class, use case, state
In considering the above studies, we used an agent-
chart, sequence, and other diagrammatic notations for
based approach for our implementation. We used three
modeling [7]. UML has been used successfully in
kinds of agents – PurchaserAgent, SellerAgent and
numerous projects to model varying architectures and FacilitatorAgent. The SellerAgent provides the function of
requirements. [8-13]. registering goods for an auction to the sellers. This design
We selected Use Case Diagrams, Sequence Diagrams maximizes the probability that the product auctioned will
and Component Diagrams for analyzing the user’s sell. The second agent is the PurchaserAgent that requires
requirements, the ordering of messages and documenting
bidding to buy and it suggests a proper bidding price by
relationship among components. We selected Class
analyzing the bidding history of the bidding competitor.
Diagrams for representing the static structure of classes.
The third agent is the FacilitatorAgent that plays the role
of an auctioneer and enables a bidder to look at the other
2.2. Component-based programming person’s auction history while bidding for and buying a
Component-Based programming enables fast product.
deployment of maintainable software by reusing
prefabricated components that are independent executable 3. System analysis and design
units. Individual components can be custom-made to meet
A detailed empirical study based on the above stated
new requirements and can be rearranged in different
research is presented. The system was designed keeping in
compositions. Reusability and Maintainability are the two
mind the requirements of the industrial partner. The
main advantages of component-based programming.
system design and the algorithms employed are described
Components are highly reusable units of functionality
in this section.
and they let developers conceptualize software as inter-
connectable blocks [14]. Research topics in this area
Figure 2. Scenario of auction process Figure 4. Purchaser’s use case diagram
Diagram that represents the Purchaser’s behavior. It
3.1. Scenario-based specification defines the behavior of the purchaser while participating
in an auction after login.
Scenario-based specifications allow an intuitive way
of visualizing, understanding and analyzing the system 3.2.2. Class diagram. The Class Diagram is the most
design requirements. The scenario was devised (depicted important entity in object-oriented analysis and design. It
in Figure 2) and used to analyze the requirements. describes the types of objects that exist in the system and
shows the static relationships among internal classes of
3.2. Designing with UML notations the system. The Class Diagram can be used to show the
attributes and the operations of a class and also the
The auction system was designed using the Use Case,
constraints that apply to the way the objects are
Sequence, Class and the Component Diagrams offered by
connected.
UML and the Rational Rose Tool.
Figure 5 displays the Class Diagram for the Auction
System. An abstract class (e.g., user class) abstracts
3.2.1. Use case diagram. The Use Case Diagram is a
common characteristics (Attribute, Operation; Name,
visualization of a use-case, i.e., the interaction between
Address, Telephone Number, and so on) about an Actor.
the auction system and the users. Figure 3 is the Use Case
We use the Concrete Classes (P u rchaser, Seller) by
Diagram for the actions that the Users (Seller, Purchaser)
inheriting attributes and operations from the abstract class
can perform in an auction. Users, after Login, can select
user.
the method of auction (auction, reverse auction) and the
method of bidding (Speed, Medium, Leisure). They can
3.2.3. Sequence diagram. The Sequence Diagram
also express opinions about products or exchange
displays the overall flow of control in an object-oriented
information about products. Figure 4 is the Use Case
program. Typically, it captures the behavior of a single
use-case. Figure 6 shows the Sequence Diagram for the
Figure 3. Use case diagram of auction system Figure 5. Class diagram of system
Figure 7. Component diagram of system
bidder who suggests the highest price exists, the
auction will be closed. When an auction closes, the
data record of the auction transfers to the
ManagementHistoryAuction component.
• The ManagementHistoryAuction component shows
the previous auction record of the auctioneer
conducting the current auction.
• The DataBase component saves the relevant data
Figure 6. Sequence diagram for purchaser. pertaining to the current auction (e.g. the price of
products and contents) separately in the database.
Purchaser in the Auction System. • According to the three kinds of bidding methods
(Speed, Medium, Leisure), a purchaser decides the
3.2.4. Component diagram. Figure 7 illustrates the next bid after confirmation of the end price that has
interactive relationship among the software components of been suggested so far from the DataBase component
the auction system. In our implementation, we made the using the MethodofBidding component.
entities that are used in the auction as components using Of the eight components developed, the Certification,
EJB (Enterprise Java Beans). It is clear from the diagram RegistrationGood and MethodofBidding components are
that it is possible to modify relevant parts/components particularly useful and can be easily adapted for reuse in
without affecting the entire system. other systems.
3.3. Components and algorithms 3.3.2. Calculating bidding price. This subsection
The different components and the algorithms used in outlines the algorithm used by the PurchaserAgent to
the auction system are detailed in this section. The suggest a bid price to a purchaser that would maximize his
algorithm of primary concern here is the one that the chances of making a successful bid. There are three
PurchaserAgent uses to calculate the bidding price to be possible rates at which a purchaser may choose to bid –
suggested to the purchaser. Speed, medium or Leisure.
Figure 8 illustrates the formulae used to arrive at the
bid price. K is the amount of money that can be bid at the
3.3.1. Component descriptions. The software
components that are a part of the auction system are present auction’s starting price. Equation 1 calculates the
described. Figure 7 shows all the components mentioned difference between the highest forecast-price of products
herein. (HP) and the seller’s suggested starting price (SP). PABC
• The Certification component is used to validate the is the average amount of the previous total bidding prices
user trying to log into the system. that the bidder has bid. Equation 2 calculates the ratio of
• A seller enters products into the system by using the the difference between the ending price of the product in
RegistrationGood component. At this time, the seller the previous bidding (PEP) and the starting price of the
inputs an end date and time of auction, including the product in the previous bidding (PSP) with the difference
starting and end prices of products.
K = (HP – SP) ............................................................. (1)
• Purchaser and Seller components manage information PABC = (PEP – PSP) / (PEP – PB) ........................... (2)
related to the auctions of the purchaser and the seller, Speed = (K/PABC)*1.2 ............................................... (3)
as well as their private information. Medium = (K/PABC)*1................................................ (4)
• The Negotiation component manages the auction. If a Leisure = (K/PABC)*0.8 .............................................. (5)
bidder arrives at the time of the auction close or a
Figure 8. Bidding method formulae
• When we want to see the auction records of the other
bidders during the auction, we can choose the
auctioneer and click the button “Show History of
Auction” and the auction history for that particular
bidder is displayed.
• Once the last successful bidder has been decided, the
contract price is displayed on the screen and the
auction is finished.
• The record of the conversation, which occurs between
the bidder and seller or the system, is stored in the
Database. Also, all records of the conversation, which
occur during the course of the auction, are added in
the record for the people who participated in the
auction, stored in the Database.