Code Monkey home page Code Monkey logo

marcketplace-in-java's Introduction

csci50700_spring2018_marketplace

In this code we are using database, so before all please edit makefile and change "/home/sakhors/OnlineMarket_2_4/mysql-connector.jar" with the address of your mysql connector, then:

To run the application successfully, follow the following steps:

1. Go to Implementation directory
2. run following commands:
	2.1. make
	2.2. make registry
3. Run the server one command window: make server
4. Run the Client in another window: make client 
5. In Client there is 2 option for Administrator and Customer  

ps 1: rmiregistry is using 60000 as its port, if you get error on make registry command, please find the PID of the rmiregistry with this port using "ps -ax|grep rmiregistry" and kill that process

ps 2: The following are valid functionalities: • Customer/Administrators Login & Registration • Browsing Items • Updating Items • Removing Items • Adding Items • Purchasing Items

ps 3: You can use the following are valid username/password for users: Admin: username: admin, password: admin Customer: username: customer, password:customer

ps 4: Please run the server on in-csci-rrpc01.cs.iupui.edu machine

ps 5: Please before purchase, select a product

ps 6: As a test of synchronization, we put a function call in line 33 of FrontController which call server.concurrencyTestSync(); in a synchronized fashion, you can see server command line to see what happen, a sample run has been added to documentation folder.

outlines of the files:

UserModel.java: The Model of users
UserInterface.java: The InterFace of users that is going to be implemented by AdministratorUser and CustomerUser
AdministratorUser.java: The implementation of UserInterface for Administrator users
CustomerUser.java: The implementation of UserInterface for Customer users

ProductModel.java: The Model of product
ProductInterface.java: The InterFace of Product that is going to be implemented by AdministratorProductInterface and CustomerProduct
AdministratorProduct.java: The implementation of ProductInterface for Administrator users
CustomerProduct.java: The implementation of ProductInterface for Customer users

GUIFactory.java: The abstraction of GUI for 2 type users
AdministratorFactory.java: The implementation of GUIFactory for Administrator users with their valid functionalities
CustomerFactory.java: The implementation of GUIFactory for Customer users with their valid functionalities
Application.java: The concrete class which gives a proper GUI to the client

ServerController.java: A class that is the controller of server sid and provides services to the RMI interface
ServerInterface.java: the Interface of RMI server side
MarketPlaceServer.java: the Implementation of ServerInterface
MarketPlaceClient.java: The Client side of RMI framework

Order.java: This is acting as a command
Invoker.java: Uses command pattern to identify which object will execute
LoginUser.java: Implements Order interface and will do actual command processing, request is user and command is login action

FrontController.java: Single handler for all kinds of requests coming to the application
Dispatcher.java: Front Controller uses dispatcher object which can dispatch the request to corresponding specific controller/view
AdminView.java: Plays view rule for administrator users
CustomerView.java: Plays view rule for customer users

marcketplace-in-java's People

Contributors

khorshidisamira avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.