• No se han encontrado resultados

An online auction system is a typical example of Web-based applications. These type of applications demonstrate a very rich nature of distributed, multi-threaded and transactional- based e-commerce systems. Therefore it makes very desirable to apply our formal pat- terns to it.

The online auction system is intended to facilitate online transactions between buyers and sellers. The system allows the clients to buy and sell items by means of auctions. Different types of auctions exist, but we consider the English auction because of its popularity. In the English auction the item for sale is put up for auction starting at a relatively low minimum price. Bidders are then allowed to place their bids until the auction closes. In most cases the duration of the auction is fixed in advance, e.g. 30 days.

It is expected that any user with a standard web browser, an internet connection and a basic knowledge of computing will be able to not only shop for items on the auction Website but also set up their own online auctions with ease.

For using the main functionalities of the system the user should register with the system, also it allow all users to brows auctions list. After providing necessary information and registering with the auction system a user can login to the system. The auction system creates an account for each registered user and they have to transfer some funds into their account before bidding for any item. The other main functionalities of the system are login, starting an auction, bidding for an item and transferring from/to the personal account with the auction system.

The auction system has some internal mechanism to determine the end of each running auction, closing it, informing the winner if there is any, and finally transferring funds from the buyer account to the seller account and deducting the related commission. In addition to that some security procedure like blocking a user account after a number of unsuccessful attempts to login or for other legal reasons and log out an inactive client after some period of time may have been envisaged. For our proposes here this short induction of the system should be enough but for interested readers a longer list of informal requirements could be found in the appendix section.

5.3.1 The Architecture of The Auction System

Before starting with the actual formal specification of the auction system, it is necessary to discuss the architecture of underlying platform which the final system would be built on top it. Although the the final implementation of the auction system is not a part of our mission in this chapter but it is very important to acknowledge the significance of platform architecture on design and even specification level modelling. In fact to have

an appropriate set of specification and design models, the modelling approach should comply with the proposed architecture which recommended by the platform. Hence it is very important to have a short review of the system architecture. In this chapter we have opted for Java EE [95] as our choice of platform.

Java Platform, Enterprise Edition or Java EE(formerly known as Java 2 Enterprise Edition or J2EE up to version 1.4), is one of the most widely used Platform for developing and running distributed multitier Web applications. Java Web applications are largely based on modular software components running on an application server. The Java EE platform defined a layered architecture for developing application. This layered model consist of different parts as following:

Client-tier components run on the client machine.

Web-tier components run on the Java EE server.

Business-tier components run on the Java EE server.

Enterprise information system (EIS)-tier software runs on the EIS server.

Although a Java EE application can consist of the four tiers shown in Figure 5.1, Java EE multi-tiered applications are generally considered to be three-tiered applications because they are distributed over three locations: client machines, the Java EE server machine, and the database or legacy machines at the back end.

JSP Pages Servlets JavaBeans Components (Optional) Web Tier Business Tier Database And Legacy Systems

Java Persistence Entities Session Beans Message—Driven Beans Application Client and

Optional JavaBeans Components

Figure 5.1: Java EE Application Model, Presented in [94]

Here we are not intended to present details of Java EE 5 and we refer the interested readers to the above official Sun documents. But we would like to point out an important issue which is the separation between the interface layer and the application or business logic layer. In the later stage we see how this layering mechanism effects the patterns applicability and our approach to formal modelling of the system.

Based on the above general application architecture we have devised the following block diagram which shows the main parts of the auction system and how they related to the other elements. User (With a standard

B

owser)

Web

Interface

Auction

System

Database Figure 5.2: Architecture of Auction System

The interface provided for the users will be a series of web pages that they can easily access through a standard web browser such as Microsoft Internet Explorer. The sep- aration between the Web interface and the core business logic of the system by using the layering approach provides a mechanism for partitioning the specification. In other words later we see that the specification of the system is comprised of two or more parti- tions. When we dealing with a large complex system specification this approach should result in a more manageable and clearer specification. Furthermore the combination of this method with the pattern based approach of the previous chapter should lead to a shorter and yet more efficient development process.

In summary, in the rest of this chapter we mainly concentrate on the two following issues and their implications on the formal development process :

Partitioning the formal specification of the system in some machine in such a way that the formal specification comply more closely with the layered architecture of Java EE.

Using formal specification patterns to construct our specification machines to achieve higher efficiency and faster development time.

Both of the above subjects have some implications on the formal development process. The partitioning mechanism raises the issue of the composition between different models and this in turn effects the whole specification and refinement approach in B method. In addition to that partitioning mechanism effects the applicability of the specification patterns as well. For example now we have to investigate how the pattern definition could be extended to match the layering mechanism and specification partitioning.

5.4

Specification Partitioning and Composition Techniques

Documento similar