Professional Documents
Culture Documents
A PROJECT DISSERTATION.
Submitted By:
MARCH 2021
1|Page
POST GRADUATE DEPARTMENT OF COMPUTER SCIENCE
NIELIT
Srinagar, Jammu & Kashmir.
CERTIFICATE
2|Page
Certificate
Certified that Saqib Farooq and Sheikh Abrar have carried out the project work
presented in this report entitle “FoodiZone” for the award of Master of Computer
Application from the University of Kashmir under my supervision. The report
embodies result of work and studies carried out by students themselves and the
contents of the report do not form the basis for the award of any other degree to
the candidate or to anybody else.
Date:-_____________________
Internal Guide
Table of Contents:
Chapter-1 Introduction
3
1.1 Abstract
1.2 Existing System
1.3 Proposed System
1.4 Feasibility
4.2 Tools
4.2.1 Visual Studio code
Chapter 5: Architecture
5.1 Introduction
5.2 Model
5.3 Views
5
5.4 Templates
5.5 URL Mapping
5.6 Django ORM
Chapter 6: Methodology
6.1 Incremental Approach
Chapter 7: Diagrams
7.1 Use Case Diagrams
7.2 Class Diagram
6
Chapter 10 Screenshots of the Final Project
Chapter 11 Screenshots of the Code Samples
Chapter 12 Conclusions &Future scope of the
Project
Chapter 13 Bibliography
7
Chapter 1: Introduction
8
1.1 Abstract
The Foodizone described in this document has been designed to
fill a specific niche in the market by providing new start-up
restaurants with the ability to offer their customers an online
ordering option without having their café or restaurant they can
start from their own kitchen with minimal budget . They can
simply register their restaurant on the website and can add menu
items to it. This system will be a great solution for many start
up food business, they can just start initially with less funds by
posting their menu online with this application. And for
Customer it will be will be a great solution for not visiting to the
number of restaurants locally or through websites to check their
menu, they can select any restaurant from the Foodizone and
check their menus and can order the food from their favourite
restaurant.
The website, which is the only component seen by the
customers/Restaurant owners, is built dynamically based on the
current state of the system. For Restaurant owners they will be
able to expand their business by just registering on the website
and it will be more helpful for new start up restaurants.
Customers, once registered, are then able to easily navigate the
selected restaurant’s menu, add food items to their order, and
specify delivery options with only a few clicks, greatly
simplifying the ordering process. Back in the restaurant, placed
orders are promptly retrieved and displayed in an easily readable
format for efficient processing.
9
The purpose of this document is to provide in-depth
descriptions of design and implementation details of the system,
as well as descriptions of all available functionality.
10
1.3 Proposed System
What I propose is an FoodiZone, originally designed for
new start-up restaurants/restaurants, and Customers to ease their
ordering food from their favourite restaurant or checking the
menu of any restaurant. The main advantage of my system is
that it greatly simplifies the ordering process for both the
customer and the restaurant. When the customer visits the
ordering webpage, they are presented with an interactive and up-
to-date menu, complete with all available options. After making
a selection, the item is then added to their order, which the
customer can review the details of at any time before checking
out. This provides instant visual confirmation of what was
selected and ensures that items in the order are, in fact, what was
intended.
The system also greatly lightens the load on the restaurant’s
end, as the entire process of taking orders is automated. Once an
order is placed on the webpage, it is placed into the database and
then retrieved, in pretty much real-time, by a desktop application
on the restaurant’s end. Within this application, all items in the
order are displayed, along with their corresponding options and
delivery details, in a concise and easy to read manner. This
allows restaurant employees to quickly go through the orders as
they are placed and produce the necessary items with minimal
delay and confusion.
11
While there are already a few systems like this in existence,
all those I have encountered have been designed specifically for
one restaurant, and thus cater only to their unique needs. Perhaps
the greatest advantage of my system is its flexibility. The web
order forms are built dynamically from the database, which can
be managed using a graphical user interface. This allows the
restaurant employees to not only set up and customize the
system on their own, but also allows them to make changes to
the menu in real time. For this reason, the exact same system can
be used by numerous businesses with absolutely no
modification, which greatly increases its usefulness.
1.4 Feasibility
At the present moment, the system is entirely functional,. A
user is currently able to register and log in to the website and
place an order. That order is then displayed, correctly and
completely, in the order retrieval desktop application. And also
restaurant owner is able to register his restaurant and add menu
items. Much of what is left to do focuses not on improving
functionality, but rather on improving user experience by
creating richer graphical interfaces for the user to interact with
and modifying the application’s icons and color schemes to
make them more pleasing to look at and use.
A second factor influencing feasibility is resources, which
also should not be a concern here. The online ordering system is
structured like a fairly standard web application, and as such
12
requires no special hardware and only basic software, namely
web and database servers, to function properly.
13
Chapter 2: Requirements
Specification
14
2.1 System Model
The structure of the system can be divided into three main
logical components. The first component must provide some
form of menu management, allowing the restaurant to control
what can be ordered by customers. The second component is the
web ordering system and provides the functionality for
customers to place their order and supply all necessary details.
The third and final logical component is the order retrieval
system. Used by the restaurant to keep track of all orders which
have been placed, this component takes care of retrieving and
displaying order information, as well as updating orders which
have already been processed.
15
2.2 Functional Requirements
As can be seen in the system model diagrammed above,
each of the three system components essentially provides a layer
of isolation between the end user and the database. The
motivation behind this isolation is twofold. Firstly, allowing the
end user to interact with the system through a rich interface
provide a much more enjoyable user experience, particularly for
the non-technical users which will account for the majority of
the system’s users. In addition, this isolation layer also protects
the integrity of the database by preventing users from taking any
action outside those which the system is designed to handle.
Because of this design pattern, it is essential to enumerate
exactly which functions a user will be presented and these
functions are outlined below, grouped by component.
16
For Customers:
Create an account..
Log in to the system.
Navigate the selected restaurant’s menu.
Select an item from the menu.
Add an item to their current order.
Review their current order.
Remove an item/remove all items from their current order.
Provide delivery
Place an order.
Receive confirmation in the form of an order number
17
For Restaurant Owners:
Create an account..
Log in to the system.
Add Restaurant name to the website.
Add an item to its Menu.
Edit an item from its Menu
Edit Price
Edit Food Name.
18
2.2.2 Menu Management System
The menu management system will be available only to
restaurant employees/owners and will, as the name suggests,
allow them to manage the menu that is displayed to users of the
web ordering system. The functions afforded by the menu
management system provide user with the ability to, using a
graphical interface:
Add a new/update item from the menu.
Add a new/update food category to/from the menu.
Add a new/update food item to/from the menu.
Update price for a given food item.
Update additional information (description, photo, etc.) for
a given food item.
It is anticipated that the functionality provided by this
component will be one of the first things noted by the restaurant
user, as they will have to go through it to configure their menu,
etc. before beginning to actually take orders. Once everything is
initially configured, however, this component will likely be the
least used, as menu updates generally do not occur with great
frequency.
19
2.2.3 Order Retrieval System
Of the three components, the order retrieval system is
functionally the simplest. Like the menu management system, it
is designed to be used only by restaurant employees, and
provides the following functions:
Retrieve new orders from the database.
Display the orders in an easily readable, graphical way.
Mark an order as having been
processed/Confirmed/accepted/rejected.
21
order is processed, the Restaurant owner/employee can change
the status to “Processing/Out For Delivery/Delivered” and the
change will reflect in the status of the customer who ordered the
food.
22
Chapter 3: System Design
23
3.1 System Design
24
Level 2: Web Ordering System Components
The web ordering system provides different interface for
two user :
1, For Customer
2, For Restaurant Owner
3.2 Customer:
For Customer there are the login form, registration form, the
main menu, the order form, the shopping cart, and the checkout
form. When the customer first arrives at the site, they are
presented with the login form. After either signing in or, if they
do not yet have an account, first registering and then signing in,
the user is taken to a welcome page with the main menu. From
here, user can select any restaurant from the list after selecting
the restaurant user can view the menu items of the selected
restaurant they can navigate the numerous menu items each of
which corresponds to a specific category of items, adding items
to their shopping cart along the way. At any time they can view
and modify their shopping cart and when they are finally ready
to place their order, they can proceed to the checkout form. The
checkout form uses the contents of the shopping cart to present a
summary of the order and to calculate the total cost.
25
Level 3: The Registration Form
The Registration form is standard for a form of this type. It
provides text fields for username, password, email id and
address, which the user must enter before registering in.
27
For Restaurant owner there are the login form, registration form,
When the Restaurant owner first arrives at the site, they are
presented with the login form. After either signing in or, if they
do not yet have an account, first registering and then signing in,
the restaurant owner is taken to a admin page with the list of
orders menu items
28
The simplest of the three components, the order retrieval system
shows the summary panel, which displays a list of all orders,.
When the restaurant employee logins first starts, the order
details of all orders in the list are displayed. From here,
Restaurant owner can edit, add menu items to its restaurant and
can also view the number of orders today and can change the
status of order with respect to preparations of order
Level 2: The Add Menu Form
The add menu form is standard for a form of this type. It
provides text fields for category, food name, food image and
food ingredients, which the restaurant employee or owner must
enter before adding menu item to its restaurant
Level 2: The Order Status Form
The Order status form is standard for a form of this type. It
provides drop down option for restaurant owner, to choose the
status of the order from the given options and then update the
status of the order.
Level 2: The Edit Menu Form
The Edit form is standard for a form of this type. It
provides the edit option for the food items of the restaurant
owner, the owner can edit the price, food name , description etc.
29
3.3 User Interface Design
The user interface design is designed in a simple manner, The
interface for this web app contains traditional forms comprised
of text fields and corresponding labels, along with save buttons
for each form.
30
3.5 Place an order
For the Menu Management System:
Add a new/update food category to/from the menu.
Add a new/update/delete food item to/from the menu.
Add a new/update/delete option for a given food item.
Update price for a given food item.
Update additional information (description, photo, etc.) for
a given food item.
For the Order Retrieval System:
Retrieve new orders from the database.
Display the orders in an easily readable, graphical way.
Mark an order as having been
Processed/Delivered/Cancelled
31
Chapter 4:Tools and
Technologies
32
4.1Technologies
4.1.1 Python:
33
Python makes the development and debugging fast because
there is no compilation step included in Python development,
and edit-test-debug cycle is very fast.
4.1.2 Django:
Django is one of the web frameworks which are written in
Python programming language. Hence, it becomes easier for
programmers to build web applications with clean, readable, and
maintainable code by taking advantage of syntax rules of
Python. In addition, the developers can easily curtail the
development time by building custom web applications without
writing additional code. Django is one of the most mature web
frameworks for Python. Its design rules focus extensively on
reducing web application development time. The features
provided by Django enable developers to build custom web
applications rapidly according to varying business requirements.
Nowadays, users access web applications on various devices and
platforms. Django enhances the accessibility of web applications
by supporting major operating systems like Windows, Linux and
MarcOS.
34
targeted security attacks – cross-site scripting, SQL injection
and cross-site request forgery. At the same time, the web
framework enhances the security of web applications by
preventing common security mistakes related to Python coding.
35
4.1.3 CSS
Cascading Style Sheets, fondly referred to as CSS, is a simple
design language intended to simplify the process of making web
pages presentable. CSS handles the look and feel part of a web
page. Using CSS, you can control the color of the text, the style
of fonts, the spacing between paragraphs, how columns are sized
and laid out, what background images or colors are used, layout
designs, variations in display for different devices and screen
sizes as well as a variety of other effects.
4.1.4 Bootstrap
Bootstrap is the most popular CSS framework for developing
responsive and Mobile-first websites Bootstrap 4 is the newest
version of Bootstrap. Bootstrap is The most popular HTML,
CSS, and JavaScript framework for developing Responsive,
mobile-first websites. Bootstrap is completely free to download
4.1.5 JavaScript
JavaScript is the Programming Language for the Web.
JavaScript can update and change both HTML and CSS.
JavaScript can calculate, manipulate and validate data
36
4.1.6 SQLite3
Sqlite3' is database file where all the data that you will be
generating will be stored. It is a local file as Django is a server-
side framework and it treats your computer as the host when you
actually run the server in command line/terminal.
SQLite3 provides an excellent development alternative for
applications that are predominantly read-only or require a
smaller installation footprint. SQlite3 can run dynamic websites
and web apps.
4.1.7 HTML
HTML stands for Hyper Text Markup Language. It is used to
design web pages using markup language. HTML is the
combination of Hypertext and Markup language. Hypertext
defines the link between the web pages. Markup language is
used to define the text document within tag which defines the
structure of web pages. This language is used to annotate (make
notes for the computer) text so that a machine can understand it
and manipulate text accordingly. Most markup languages (e.g.
HTML) are human readable. Language uses tags to define what
manipulation has to be done on the text.
HTML is a markup language used by the browser to manipulate
text, images and other content, in order to display it in the
required format.
37
4.2 Tools
38
Chapter 5:Architecture
39
5.1 Introduction
The Architecture used in this web app is a MVT (Model View
Template) architecture. It is a collection of three important
components Model View and Template. The Model helps to
handle database. It is a data access layer which handles the data.
The Template is a presentation layer which handles User
Interface part completely. The View is used to execute the
business logic and interact with a model to carry data and
renders a template.
Although Django follows MVC pattern but maintains its own
conventions. So, control is handled by the framework itself.
There is no separate controller and complete application is based
on Model View and Template. That’s why it is called MVT
application.
See the following graph that shows the MVT based control flow.
40
Here, a user requests for a resource to the Django, Django works
as a controller and check to the available resource in URL.
If URL maps, a view is called that interact with model and
template, it renders a template.
Django responds back to the user and sends a template as
a response.
5.2 Model
In Django, a model is a class which is used to contain essential
fields and methods. Each model class maps to a single table in
the database.
Django Model is a subclass of django.db.models.Model and
each field of the model class represents a database field
(column).
Django provides us a database-abstraction API which allows
us to create, retrieve, update and delete a record from the
mapped table. Model is defined in Models.py file. This file
can contain multiple models.
5.3 Views
A view is a place where we put our business logic of the
application. The view is a python function which is used to
perform some business logic and return a response to the user.
This response can be the HTML contents of a Web page, or a
redirect, or a 404 error.
41
All the view function are created inside the views.py file of
the Django app.
5.4 Templates
Django provides a convenient way to generate dynamic HTML
pages by using its template system.
A template consists of static parts of the desired HTML output
as well as some special syntax describing how dynamic content
will be inserted. Why we use Django template because In
HTML file, we can't write python code because the code is only
interpreted by python interpreter not the browser. We know that
HTML is a static markup language, while Python is a dynamic
programming language. Django template engine is used to
separate the design from the python code and allows us to build
dynamic web pages.
42
5.6 Django ORM:
ORM is an acronym for the object-relational mapper. The
ORM’s main goal is to transmit data between a relational
database and application model. The ORM automates this
transmission, such that the developer need not write any SQL.
ORM, as from the name, maps objects attributes to respective
table fields. It can also retrieve data in that manner.
This makes the whole development process fast and error-free.
43
the concept of ORM was introduced in web frameworks. ORMs
automatically create a database schema from defined classes/
models. They generate SQL from Python code for a particular
database. ORMs let the developer build the project in one
language that means Python. Django is shipped with its own
ORM. It is a very efficient ORM and is tightly coupled with the
Django framework. The migrations feature by Django is also a
part of Django ORM. The ORM has many benefits engulfing
those of migrations and Querysets. Django is the only
framework which is complete in itself.
44
Chapter 6:Methodology
45
6.1 Incremental Approach
In incremental model, the whole requirement is divided into
various builds. Multiple development cycles take place her,
making the life cycle a “multi-waterfall Cycle”. Cycles are
divided into smaller, more easily managed modules. Each
module passes through the requirements, design, and
implementation of testing phases. A working version of
software is produced during the first module, so you have
working software early on during the software life cycle. Each
subsequent release of the module adds function to the previous
release. The processes continues till the complete system is
achieved.
46
In this Incremental model, the whole requirement is divided
into various builds. During each iteration, the development
module goes through the requirements, design, implementation
and testing phases. Each subsequent release of the module adds
function to the previous release. The process continues until the
complete system is ready as per the requirement.
48
Chapter 7:Diagrams
49
7.1 Use Case Diagrams
A use case diagram is used to represent the dynamic behavior of
a system. It encapsulates the system's functionality by
incorporating use cases, actors, and their relationships. It models
the tasks, services, and functions required by a
system/subsystem of an application. It depicts the high-level
functionality of a system and also tells how the user handles a
system. The main purpose of a use case diagram is to portray the
dynamic aspect of a system. It accumulates the system's
requirement, which includes both internal as well as external
influences. It invokes persons, use cases, and several things that
invoke the actors and elements accountable for the
implementation of use case diagrams. It represents how an entity
from the external environment can interact with a part of the
system.
Following are the purposes of a use case diagram given below:
1. It gathers the system's needs.
2. It depicts the external view of the system.
3. It recognizes the internal as well as external factors that
influence the system.
4. It represents the interaction between the actors.
51
7.2 Class diagram
52
Base for component and deployment diagrams.
53
54
Chapter 8:Feasibility Study
55
Feasibility Study
Once scope has been identified (with the concurrence of
the customer), it is reasonable to ask: “Can we build
software to meet this Scope? Is the project feasible?”
All too often, software engineers such past these questions (or
are pushed past them by impatient mangers or customers), only
to become mired in a project that is doomed form the onset.
When we are developing the system (software), we must know
the proposed system will be feasible or i.e. practical
implemented or not it may possible the proposed (candidate)
system may not implemented due to many reasons like it may
take long time in development that the specified time limit, cost
may increase that proposed one etc. Therefore, we must analyze
the feasibility of the system.
Feasibility is the analysis of risks, costs & benefits
relating to economics, technology and User operations.
There are several types of feasibility depending on the aspect
they covers. Some important feasibility is as follows:-
Technical
Feasibility
Operational
Feasibility
Economical
Feasibility
56
8.1 Technical Feasibility:
The technically feasibility study centers on alternatives for
hardware, software and design approach to determine the
functional aspects of system. This project “Foodizone” is being
coded into Django python framework (python). SQLite3
database is being used for storing data. Hardware requirements
used are compatible with all Operating Systems. This System
can also be expanded as per the needs of requirements
specifications.
58
Chapter 9:Testing
59
9.1 Web Application Testing
Web application testing, a software testing technique
exclusively adopted to test the applications that are hosted on
web in which the application interfaces and other functionalities
are tested.
Techniques:
1. Functionality Testing - The below are some of the checks that
are performed but not limited to the below list:
Verify there is no dead page or invalid redirects.
First check all the validations on each field.
Wrong inputs to perform negative testing.
Verify the workflow of the system.
Verify the data integrity.
2. Usability testing - To verify how the application is easy to
use with.
Test the navigation and controls.
Content checking.
Check for user intuition.
3. Interface testing - Performed to verify the interface and the
dataflow from one system to other.
4. Compatibility testing- Compatibility testing is performed
based on the context of the application.
Browser compatibility
60
Operating system compatibility
Compatible to various devices like notebook, mobile, etc.
5. Performance testing - Performed to verify the server response
time and throughput under various load conditions.
Load testing - It is the simplest form of testing conducted
to understand the behaviour of the system under a specific
load. Load testing will result in measuring important
business critical transactions and load on the database,
application server, etc. are also monitored.
Stress testing - It is performed to find the upper limit
capacity of the system and also to determine how the
system performs if the current load goes well above the
expected maximum.
Soak testing - Soak Testing also known as endurance
testing, is performed to determine the system parameters
under continuous expected load. During soak tests the
parameters such as memory utilization is monitored to
detect memory leaks or other performance issues. The
main aim is to discover the system's performance under
sustained use.
Spike testing - Spike testing is performed by increasing the
number of users suddenly by a very large amount and
measuring the performance of the system. The main aim is
to determine whether the system will be able to sustain the
work load.
61
9.2 White Box Testing
White box testing is a testing technique that examines the
program structure and derives test data from the program
logic/code. The other names of glass box testing are clear box
testing, open box testing, logic driven testing or path driven
testing or structural testing.
62
Spots the Dead Code or other issues with respect to best
programming practices.
63
Develop test cases using various techniques (use case,
decision table, etc.).
64
Welcome Page
List of Restaurants
65
Menu Items Of The Restaurant
Cart Items
66
Order History/Status
67
Add Item Form for Restaurant Admin
68
Remove Item Form for Restaurant Admin
69
Chapter 11:Screenshots of the
Code Samples
70
71
72
73
74
75
76
Chapter 12:Conclusions and
Future work
77
Conclusion:
The main objective of this project is to fill a specific niche in the
market by providing new start-up restaurants with the ability to
offer their customers an online ordering option without having
their café or restaurant and for customer it will be will be a great
solution for not visiting to the number of restaurants locally or
through websites to check their menu, they can select any
restaurant from the Foodizone and check their menus and can
order the food from their favourite restaurant.
The following results have been achieved after
completing the system and relate back to the system’s
objective:
79
Future Work:
The following section describes the work that will
be implemented with future releases of the
software.
Bibliography
1.Websites Accessed
https://www.w3schools.com https://www.Google.com
https://www.StackOverFlow.com https://www.Google.com
2.Books
Django For Beginners Build Websites With Python And
Django by William S. Vincent
Django documentation
Python: The Complete Reference
Software Engineering (Roger Pressman)
81
82