-
Notifications
You must be signed in to change notification settings - Fork 3
Architecture Model
Architecture description: The software architecture used was MVC. This architecture was used because there are many ways to view and interact with the data from the users. There are customers, managers and employees that can all have their own interaction with the system. The model manages data and operations associated with data. The view manages how data is presented to the user and the controller manages the interactions with the users.
The Web Interface consists of HTML for the content of the web page, CSS for the styling/design and java script for interactive responses. Clients are able to send their request to the backend through the API controller in the form of HTTP requests to retrieve the necessary information from the database. The first main component of the web interface is the user login page which will grant access to different features in the grocery system depending on whether the user is a customer, manager, or employee. The second main component is the user home page which is the page that will welcome the user after they login and grant access to the main corresponding features depending on the user role such as adding products (for managers), access employee tab (for employees), access the shopping cart (for customers), etc.
The mobile interface consists of an Android developed app to guarantee users with quick and easy access to the grocery store wherever they are with an internet connection. Clients are able to send their request to the backend through the API controller in the form of HTTP requests to retrieve the necessary information from the database. The two main components of the mobile interface are the user login and the user home page. The first main component of the web interface is the user login page which will grant access to different features in the grocery system depending on whether the user is a customer, manager, or employee. The second main component is the user home page which is the page that will welcome the user after they login and grant access to the main corresponding features depending on the user role such as adding products (for managers), access employee tab (for employees), access the shopping cart (for customers), etc.
The user management component takes care of all the user account in the system. It keeps track of customers, employees and managers. Every user has a different role and has different permissions.
The store management component keeps track and updates the online store data. It logs all transactions made online as well as all the information associated with a specific order. It has methods that allow users to update the inventory and make payments.
The inventory management component is responsible for keeping track of the available and non-available items in the Grocery Store Application system. It updates the item count whenever a purchase is made or a product is updated.
All business methods sit in the controller component. The controller calls methods in the service sub-system in order to perform specific tasks, such as processing an order or creating a new employee schedule.
The REST API sub-system encapsulated all the API methods. These methods are called by the front-end and are mapped to a specific http//: request (i.e., GET, CREATE, PUT, DELETE).
The persistence layer allows the backend services to use CRUD operations to communicate to the model classes. The objects from the model classes can then send/retrieve data from the database which allows backend services to perform their operations (refer to backend).