Font Size: a A A

Home Service Booking Management System Based On MVC Pattern And RMI

Posted on:2006-10-16Degree:MasterType:Thesis
Country:ChinaCandidate:L P WangFull Text:PDF
GTID:2168360155452974Subject:Computer software and theory
Abstract/Summary:PDF Full Text Request
Home Service going on to a web based system has been the latest trend in social development . It can introduce essential information of home service company to network clients by internet at any moment and show basic information of home service personnel. It can query,modify,manage diversified f information of home service at any time everywhere and receive client on-line booking and on-line searching etc . Home Service Management System introduced in this paper is based on MVC Pattern,RMI,Singleton Pattern and realize separation of function module and display module,network comminication between client and server, lock management mechanism and cache technics . It connects database which is distributed in different locations with remote client by internet. MVC pattern (Model-View-Controller) is a basic pattern in programming.It can realize separation of function module and display module and make application composed of model layer,view layer and controller layer . Further more , It improves maintainability , expansibility,transplantability and module'repeated use of application in consideration of application'extra complexity.MVC pattern is the most efficient pattern of exploiting B/S structure.This applicatin'main architecture is a traditional client/server system which adopts MVC pattern and is composed of three key parts:the first is database management system in server side corresponding to model of MVC pattern ; the second is graphics user interface in client side corresponding to view and controller of MVC pattern;the last is network connection between server and client based on RMI corresponding to information communication among model,view and controller. RMI (Remote Method Invocation) is a Java standard that is used to call methods of remote objects.RMI implements that some object happens to live on another machine,and that you can send a message to the remote object and get a result as if the object lived on your local machine. I chose RMI over sockets communication for the following reasons: Less code to implement, and is easier to debug;It Manages threads for programer,we will not worried about thread safety;It's easier to implement automatic notification for all client when data change.Network communications between server and client in Home Servie Booking Management System is implemented by RMI. In server side,one method starts the rmi registry on the current machine with port 1099, and creates a instance of BookerModelRMIImpl which can be retrieved and used by the client application, then uses serviceName to bind the BookerModelRMIImpl object into the name server.In the client side,there are two cases in romote connection between clients and romote server : while client has been connected with server,it can access the property file in the local machine to connect to server directly;while client has not been connected with server,it must get IP address of server.Then it use serviceName to look up the remote object on the registry service programme of server and call methods of the remote object . Lock Management Mechanism implements:All resources are client's shared objects and each client's threads can perform reading operation at the same time;When client is updating ,deleting,creating and finding records ,appointed records must be locked.Otherwise,problems of updating mistake ,deleting mistake,finding mistake and dirty reading will appear;The same record can be locked only by one thread at the same time,but it may be locked many times in the samethread. Dynamic cache technic is implemented on the server-side and the client-sides.When the client is browsing and inquire about database records,it judges whether local cache datas is satisfied with quering terms by semantic information.If the result is true,client can access data from the local cache;if the result is false,client sends query message of part data that can not be satisfied with quering terms in the local cache,consequently it cuts down communications spending. The object reference application design interface is adopted in the lock managenent mechanism and dynamic cache technics.It allows that the application communicates with JVM'memory manager adopting object reference.When the application deals with large numbers of memory objects or delete the original object before the new object is created , The object reference application design interface has great use. Home Service Booking Management System realizes network communication between client and server and provides six kinds of function which are booking function,unbooking function,searching function ,creating records ,deleting records and updating records for the clients.Booking function is that he books suitable home service after client browses basic information about home service companies in database and learns name and location of home service companies,service items,employee'number and service charge. Unbooking function is that client unbooks home service because of some special reasons or home service has been finished.Searching function is that it will fetch all records and show them in the table, When the program started. You could search records by other ways, Such as by name and/or location. You could enter name and/or location and press "Search Contractors" button, the program begin to fetch records according to your settings.Creating records means the...
Keywords/Search Tags:Management
PDF Full Text Request
Related items