Dissertation Repaired
Dissertation Repaired
Dissertation Repaired
net/publication/340479626
CITATIONS READS
0 58,738
1 author:
SEE PROFILE
All content following this page was uploaded by Md. Muminur Rahman on 07 April 2020.
By
Year 2017
Abstract
The aim of the project was to build a responsive online application for restaurant
which helps customers to order foods online. Along with this, the application needs to
be responsive as the application can be accessed through devices with different size of
screens. One of big problem while ordering online is trust. Social media websites play
a vital role to attract customers and make trust on their mind. Hence, Facebook API is
integrated to the application. So, customers trust the quality and attract to order online
when they see the reviews and likes of their friends and relatives who used the service
earlier. To address this functionalities, a deep research has been made on the earlier
works for automating the food ordering processes. Laravel 5.4 PHP framework has
been used to develop the backend of the system and Bootstrap 4 framework used for
developing the responsive frontend. After developing the system, different testing
methods have been used to find bugs in the system and ensure the quality.
2
Acknowledgements
In first, I am grateful to the Almighty Allah for the wellbeing and health that were
necessary to complete this project.
3
Table of Contents
Abstract .......................................................................................................................... 2
Acknowledgements ........................................................................................................ 3
1. Introduction .......................................................................................................... 11
2. Literature Review................................................................................................. 15
2.3. PHP................................................................................................................ 20
4
2.4. Laravel ........................................................................................................... 20
3. Methodology ........................................................................................................ 24
3.1.3. Analysis.................................................................................................. 25
5
4.4. User Interface Design .................................................................................... 37
5. Implementation .................................................................................................... 44
5.1. Views............................................................................................................. 44
6. Testing.................................................................................................................. 52
6
6.3.3. Responsiveness of Interface ................................................................... 64
9. Bibliography ........................................................................................................ 73
7
List of Tables
Table 1: Scope of the project. ...................................................................................... 14
Table 2: Comparison between SDLCs based on different criteria (Dennis, Wixom and
Roth, 2012). ................................................................................................................. 27
Table 3: Test cases for black box testing. .................................................................... 52
8
List of Figures
Figure 1:Typical flow for food ordering in PDA-based system (Cheong, Chiew and
Yap, 2010).................................................................................................................... 16
Figure 2: MVC pattern ecosystem (Jailia et al., 2016). ............................................... 22
Figure 3: Steps of the research methods in Waterfall model. ...................................... 24
Figure 4: Phases of Extreme Programming (XP) (Dennis, Wixom and Roth, 2012). . 29
Figure 5: Context diagram of the system. .................................................................... 32
Figure 6: DFD of processes of customer for ordering food. ........................................ 34
Figure 7: DFD for processes of Admin........................................................................ 35
Figure 8: Entity relationship diagram of the system. ................................................... 37
Figure 9: Difference of screen layouts for different size of screens (Tan, 2013). ....... 37
Figure 10: Homepage layout. ....................................................................................... 38
Figure 11: Home page layout for small screen. ........................................................... 39
Figure 12: Menu list page layout. ................................................................................ 40
Figure 13: Menus page layout for small screen. .......................................................... 41
Figure 14: Menu details page layout. ........................................................................... 42
Figure 15: Menu details page layout for small screen. ................................................ 43
Figure 16: Homepage of the application. ..................................................................... 45
Figure 17: Homepage of the application in small screen. ............................................ 46
Figure 18: Menu list page of application. .................................................................... 46
Figure 19: Mobile view of menu list page. .................................................................. 47
Figure 20: Menu details page. ...................................................................................... 47
Figure 21: Facebook login successful. ......................................................................... 55
Figure 22: Redirected Facebook login page. ............................................................... 55
Figure 23: Successful login with Facebook. ................................................................ 56
Figure 24: Showing total for one menu. ...................................................................... 56
Figure 25: Total of multiple menus. ............................................................................ 57
Figure 26: New information inputted in form.............................................................. 57
Figure 27: Confirmation message after upload new product. ...................................... 58
Figure 28: New menu (Coca Cola) shown in database. ............................................... 58
Figure 29: The image of the new menu uploaded to the folder. .................................. 59
Figure 30: New menu in the menu list page. ............................................................... 59
Figure 31: Menu list page. ........................................................................................... 60
Figure 32: Product price is edited. ............................................................................... 61
Figure 33: Update of product price in menu list page. ................................................ 62
Figure 34: SEO test result by Lighthouse. ................................................................... 62
Figure 35: Ease of use of the application. .................................................................... 63
Figure 36: Percentage of views on user friendliness. .................................................. 64
Figure 37: Percentage of views on responsiveness. ..................................................... 65
9
Figure 38: Screen size of devices facing problem with UI. ......................................... 66
Figure 39: Satisfaction about speed and performance. ................................................ 66
Figure 41: Facebook analytics page for the restaurant application.............................. 68
Figure 42: Scan copy of ethical approval. ................................................................... 89
Figure 43: Scan copy of project progress report for meeting 1. .................................. 90
Figure 44: Scan copy of project progress report for meeting 5. .................................. 91
Figure 45: Scan copy of project progress report for meeting 10. ................................ 92
10
1. Introduction
This chapter starts with a high-level overview of the project. It then describes the
specific aims and objectives of the project. Finally, it analyses the feasibility of the
project and provides with a feasibility report of the system.
When it comes to buying goods or foods online, customers want to be ensured about
the quality of the foods that s/he is going to buy. People tend to eat foods that is
suggested by their friends or nearest one. This thing can be achieved in an online food
ordering system by utilising and integrating social media properly. A study performed
by OTX Research found that two out of every three customers are influenced in their
buying decision through information they find in social media. Nearly, 67% of
customers are likely to pass this information on to other customers and over 60% of
customers trust information they find through social media such as Facebook, Twitter
and other social media sites (Shankararaman and Lum, 2013). Suraworachet et al.
(2012) studied the effect of Facebook’s features such as “like” and observed a
positive impact on consumer’s attitude to buying products. In summary, social media
has served as a new form of word-of-mouth and influence customer decision-making
while buy something online. So, social media will be implemented with the
application. Facebook API will be used with the system, so that customers can login
with their Facebook credential and like any menu. Along with this, Twitter sharing
system also integrated to the system.
The ubiquitous connectivity and internet makes different kinds of devices interact to
web applications. A web application now can be accessed from different types of
devices including desktop personal computer, laptop or notebook PCs, portable tablets
and smartphones. So, a modern web application should be optimised for every kind of
devices. But the existing restaurant websites are not in a good level. For instance, 51
11
percent of all mobile searches on Google are for restaurants, yet as few as 5 percent
have mobile-optimised websites (Oddle, 2016).
1. An extensive literature review will be conducted to find out the past work
done to automate the food ordering process of restaurant.
3. Laravel 5.4 and Bootstrap 4 will be used for developing the backend and
frontend of the system.
4. Social Media will be integrated to the system. So, customer can login and
register through their social media account and share their views about menu.
5. The system will be tested properly to ensure the quality of the system.
There are also some problems of traditional food ordering system, which results
wasting time and making conflicts. In existing system there are few problems:
• For placing orders, customers have to visit restaurants to know about food
items and then place order and pay. In this method time and manual work is
required.
12
• Some restaurants take order via phone. While placing an order over the phone,
customer lacks the copy of available menu items in restaurant.
• Every restaurant needs certain employees to take the order over phone or in-
person. In today’s market, labour rates are increasing day by day making it
difficult to find employees when needed (Patel, 2015).
To solve these issues, an Online Food Order System has been developed which is
originally designed for small scale business. But this system is applicable in any
restaurant. The main advantage of this online system is that it greatly simplifies the
food ordering process for both of the customer and the restaurant. The anticipated
benefits of the project are:
3. This will avoid long queues at the counter due to the speed of execution and
number of optimum screens to accommodate the maximum throughput.
4. The system will be less probable to make mistake, since it’s a machine.
5. The top benefit of online ordering was a savings in labour, since employees
are not tied up on the phone or at the counter.
On the other hand, social websites and media play a vital role for business. Every
business can use social media to get information about potential customers, analyse
sentiments and better relationship with customers. A study by Alagoz and Hekimoglu
(2012) shows that trust is one of the main drivers to place order online in restaurant.
Today, a recommendation from friends via social media plays as a word of mouth in
building trust while ordering online (Shankararaman and Lum, 2013). Hence, Social
media can be integrated to restaurant web app to ensure customers about the food
quality. New customers can choice their desired products by studying reviews made
by other users.
13
1.5. Scope of the Project
The following the table shows the scope of the project:
14
2. Literature Review
This chapter discusses the different approaches for automating the ordering processes
of restaurant. After that, it explains the web application development tools and
technologies used in this project.
Xiang, Zhou and Chowdhury (2004) developed a PDA based in-house meal ordering
system for restaurant named iMenu. It is one of the first systems that introduced PDA-
based ordering in restaurant industry. The developers used .NET platform for
developing the system.
Hongzhen, Bin and Wenlin (2009) developed a web service and wireless system
which can be used through desktop and personal digital assistant (PDA). In this
system, the access of data to the servers can be wired and wireless. The food ordering
functions served through both desktop computers and PDAs over a wired/wireless
integrated local area network. These PDAs were used to see menus and make orders.
After the customer made orders through PDA, the manager can see the orders through
computer. They implemented the system using .NET and C#.
15
Figure 1:Typical flow for food ordering in PDA-based system (Cheong, Chiew and Yap, 2010).
• Sharing same PDAs among many customer may help in spreading contagious
diseases (Samsudin et al., 2011).
16
• Customers are required to be present physically to make order using the PDA-
based system. Thus, customers have no alternatives to make early order before
coming to the restaurant. This implies that customers have to accommodate
waiting time for food preparation (Samsudin et al., 2011).
There are some problems with this system, which are follows:
• These systems is focused only the customers who have the membership cards;
not all customers get the service as well.
17
2.1.3. Mobile Application Based System
Samsudin et al. (2011) recognised the limitations of PDA based food ordering system
and developed a food ordering system with Microsoft Access database and ASP.NET
and VB.NET for Microsoft Windows based smartphones. Customers can order foods
remotely from this application. As Android based smartphones took over Windows
based smartphones, Shinde et al. (2014) developed an application for Android
operating system based smartphones where they used Java and SQLite. The order
processing speed of this Android application is faster than PDA based ordering
system. The application can play a media between customer, restaurant manager and
kitchen. Dhore et al. (2014) also proposed an Android based system to automate
ordering process of the restaurant, through which one or more customers can order
food, book table, and also make payment remotely. Both of these to works
implemented almost same functionalities. Leong (2016) also developed a system for
Android operating system, which can be used for ordering food online. In this system,
computers need to be installed in kitchen and manager’s desk, so they can view and
check orders and payment.
Recently, Saeed et al. (2016) implemented an Android based smart restaurant system,
which helps customers finding free parking lot and free table, ordering foods and
paying bills from their mobile phone. On the other hand, the management can monitor
the whole work properly. This system is comprised of different technologies such as
Mobile and Web applications, Internet of Things (IoT), Near-Field Communications
(NFC) sensors, and cloud computing. This Smart Restaurant Management System
provides with two interfaces for the two types of users in restaurants; an Android
mobile application for customers and a web application for restaurant staff members.
These proposed and developed smartphone based systems let customers order foods
online before arriving to restaurant. But these systems have also some limitations as
follows:
• Customers need to install the restaurant mobile application for getting the
benefits of smart restaurant system.
18
2.1.4. Web Application Based System
To overcome the device and operating system centric approach for automating
restaurant operation, K et al. (2016) proposed an online web application which can be
accessed through internet. For using this application, computer screen will be placed
on each table of restaurant for customers to order. Customers can order food for take
away and make payment through the application. However, the idea is innovative, but
a little bit weird as computers need to be installed in every table. Sometimes it may
create complex problem rather than making a solution. Patel (2015) developed an
online food ordering system with Java in backend system and HTML with CSS in
frontend. It was a robust and nice application. But the responsive development
method was not used in the application. Hence, the application cannot viewed
properly with a smart phone. Tan (2013) developed a web based application with ASP
.Net and Bootstrap to automate the ordering process of the restaurant and make it
paperless. But the system is only focused on the management of the restaurant. There
is no option for customers to order food online. The system was responsive.
• None of them tried to make the online ordering system more trustable to
customers.
• They did not integrated social media to the system which can make customer
registration and login process easier.
On the other hand, the systems which is developed to order food remotely are device
or operating systems oriented. For obtaining the benefits of the system, customers
need to use a smartphone with specific operating system like Windows or Android.
No one tried to find a solution which does not depend on any specific device, while a
web application can be accessed by through kind of devices with internet connection
from anywhere. Moreover, there is no need for installing extra software for browsing
a web application. If the web application is developed using modern mobile friendly
manner properly, it will give a good performance on any kind and size of device.
19
The proposed solutions also lack the use of the power of social community, which can
be a big marketing medium for the restaurant and help influencing new customers to
have a food experience in the restaurant. The earlier part of this paper stated that the
digital restaurant ordering is growing 300 percent faster than dine-in traffic (Beltis,
2016). So, the restaurants should embrace internet technology to make a solid
appearance on the internet and provide the service in a wider range of customers
within minimum cost and time.
2.3. PHP
PHP is acronym for PHP: Hypertext Preprocessor. PHP is an “open source general-
purpose scripting language that is especially suited for web development and can be
embedded into HTML” (The PHP Group, 2018). PHP is mainly used in dynamic web
page, including CLI (command line interface) and GUI (graphical user interface)
program. It has the feature of good across-platforms and easy transplant (Lei, Ma and
Tan, 2014). PHP is not an object-oriented language like Java. But according to
Haydar (2007), PHP 5 implements almost complete object-oriented features.
83.1% of all the websites use PHP as server-side programming language and 14.1 of
all websites use ASP.NET as server side language by January 2018 (W3Techs, 2018).
Along with this, nearly 60% of web servers are running on Apache with PHP
(Hayder, 2007). Hence, many researchers tried to compare between these two
languages. According to a study of MVC frameworks from PHP and .NET by Jailia et
al. (2016), .NET gives better result for page loading time, time to first byte and time
to last byte compared to PHP based web applications. While PHP based website gives
much more promising result for request and response transfer speed. Bounnady et al.,
(2016) also made a comparison between PHP and .NET in five different parameters:
load static webpage, algorithms processing, managing database, uploading file and
reading/writing files. The study concluded that PHP performs better than .NET in
managing database operations and uploading files.
2.4. Laravel
Today, web applications are mostly developed using a framework. Surguy (2014)
defines PHP framework as follows:
20
“A PHP Web application framework is a set of classes, libraries or components
written in PHP server-side scripting language that aim to solve common web
development problems and promote code reuse.”
Frameworks are so popular precisely because they dramatically decrease the amount
of work (Gilmore, 2015). Laravel is a PHP open source framework that prefers the
rapidness of development. The framework is developed based on Model-View-
Controller (MVC) design pattern. Along with this, the framework also implements
Object Oriented Programming (OOP), Dependency Injection (DI) and Object
Relational Mapping (ORM) (Bean, 2015). The following lines briefly describe the
features of the framework.
21
Figure 2: MVC pattern ecosystem (Jailia et al., 2016).
22
raw PHP, CodeIgniter (CI) and Laravel frameworks where Laravel performed
better than raw PHP and CodeIgniter (CI).
2.5. Bootstrap
As the number of Internet users on mobile devices is growing every moment, websites
are no longer built only for the desktop machines. The mobile-first philosophy
demands the sites to be fully compatible for all available and future mobile devices.
Bootstrap allows and easily enables to design and develop websites congenial to all
devices including various screen readers.
Bootstrap is a free CSS and JavaScript framework that allows developers to rapidly
build responsive web interfaces. The framework was first conceived by Mark Otto
and Jacob Thornton while working at Twitter in 2010. Since its release as an open
source project in August of 2011, Bootstrap has become a household name among
frontend web developers (Jakobus and Marah, 2016).
Bootstrap is the most starred project in GitHub since 2012. Bootstrap is largely based
on CSS3 that is currently the latest version of Cascading Style Sheet (CSS) and
included with powerful capabilities like Media queries, Selectors, Cascading and
Inheritance, Template layouts, Namespaces, Flexible and Grid layouts etc. (Bhaumik,
2015). Bootstrap 4 has improved grid system and inclusion of flexbox. For regular
grid, another regular grid level is introduced for better targeting smartphones
(Lambert, 2016).
There are many other frontend frameworks like Zurb, Foundation etc. But the most
powerful thing of Bootstrap is its popularity. Hence, it is much easier to find solutions
with bootstrap (Gerchev, 2017).
23
3. Methodology
This chapter of the report aims to provide a clear vision on methods and
methodologies used for this project. In first, it describes the methodology and
methods selected for the research and gives rational why these methods and
methodology have been used. Then it discusses about software development
methodology and give rational for it.
Initial
Study
Data
Collection
Implementation
Analysis
Critical Analysis
of the System
There are different models for research. Among them, waterfall model is chosen as it
is easy to understand and implement. Hence, many beginners use this methodology
for research (Dawson, 2009). Hence, this methodology is used for research in this
project. Following steps have been used to formulate the hypothesis and determining
project requirements:
24
3.1.1. Initial Study
This is the first step of the research. In this step, different topics and subject area has
been reviewed to find problem. After setting the goal to developing restaurant system,
the study has been narrowed to online food ordering system.
3.1.3. Analysis
After data collection, an overview on the system has been gained. Then different
methods (Data Flow Diagram, Entity Relationship Diagram etc.) of Structured System
Analysis & Design Methodology (SSADM) is used to analyse the system and make
logical structure for it.
3.1.4. Implementation
After getting the logical structure of the system, the implementation step began. In
this step, the logical structure converted to physical architecture through coding and
development of the system. The frontend and backend of the system has been
developed and tested.
25
3.2. System Development Methodology
For developing any information system, a System Development Methodology should
be used which will provide a structured way for development of an IT based systems.
SDLC refers to System or Software Design Life Cycle. It is phases of processes taken
down to build a system properly.
The main aim of SDLC process is to help provide a system that is effective, cost-
efficient, and of high quality. SDLC methodologies typically has the following stages:
Analysis (requirements and design), construction, testing, release, and maintenance
(response). But the phases can be changed in deferent SDLC mythologies. There are
many software development models for different types of projects. In following lines,
only popular three of them will be discussed.
3.2.1. Waterfall
The waterfall model is a well-known structured methodology for software
development. The whole process of system development is divided into distinct
phases. The model has been introduced in 1970s. Every phase has a unique output. It
was the first SDLC model to be used widely. So that, sometime it is referred to
Waterfall by SDLC. The waterfall model is used when the system requirements are
well known, technology is understood and the system is a new version of an existing
product (Dennis, Wixom and Roth, 2012).
Mainly there are six phases in Waterfall model. If there is a problem faced in any
phase of the cycle, the system goes to the previous phase. The phases of Waterfall
method are:
Requirements Gathering & Analysis: In this phase, all possible requirements of the
system are captured and documented in a requirement specification doc.
System Design: The requirements documented in previous phase are studied in this
phase and the system design is prepared.
Implementation: With inputs from system design, the system is developed in several
unites. Then the units are tested.
Integration & Testing: The units of the program developed in previous phase are
integrated into a system. Then the whole system is tested.
Deployment of the System: When the all kind of testing is done, the product is
deployed in the customer environment.
Maintenance: There are some issues which are found in the client environment.
Patches are released to fix those issues.
26
3.2.2. System Prototyping
There are many models related to this methodology. The most famous ones include
Scrum, lean, and Extreme Programming (XP).
There are different criteria for selecting appropriate SDLC for developing an IT
system, because none of the SDLCs is best. Every SDLC has own advantages and
disadvantages. So, the SDLC should be chosen carefully based on the type of the
project. Dennis, Wixom and Roth (2012) discussed about different criteria for
selecting the appropriate development methodology for a project. SDLC selection
criteria provided by them is shown in the table below.
Table 2: Comparison between SDLCs based on different criteria (Dennis, Wixom and Roth,
2012).
27
That are complex Good Poor Poor
Table 2 illustrates that agile development is the best solution when the time is short,
deadline is visible and the system should be reliable. It also has excellent performance
when the requirements of system is not clear. Its performance is poor when the system
complex. However, the system that is going to be built is not a complex system and
the system should be developed within a short time. Therefore, it has been considered
that agile methodology is the best SDLC for making the system.
On the other hand, Waterfall methodology is good for developing complex and
reliable system. But its performance is poor when the schedule is short and deadline is
visible. The System Prototyping method has an excellent performance with unclear
requirements and within short time schedule. So, it could be a good choice for
building this restaurant system. But the reliability of product developed with System
Prototyping is poor. No one wants to build a system that he or she cannot rely on. In
these criteria, Agile Development provides good result. So, the Agile Methodology
has been chosen as the software development methodology for the system.
28
Figure 4: Phases of Extreme Programming (XP) (Dennis, Wixom and Roth, 2012).
As the figure above shows, there are mainly four phases in Extreme Programming
method. These phases are discussed below:
• Planning: Extreme Programming starts with the planning stage. In this phase,
the requirements for the system have been collected and documented. In this
step, the plan, time, and costs of carrying out the iterations is prepared.
• Analysis: In this phase, the logical model of the system has been developed.
SSADM is used to make the logical structure of the system. A bottom-up
approach is used for analysis of the system, as there is not any previous
system. The system will be developed from scratch. Along with these, the user
interface requirements are also analysed.
• Design: In this phase of the SDLC, the logical model of database and the
interface of the system is designed. The normalisation of the database schema
is done in this phase.
29
iteration, feedback has been taken. Then all the phases began for the next
iteration.
30
4. Requirements & Design
This chapter illustrates the approaches taken to design the system for restaurant. The
chapter first addresses different types of requirements of the system. Then it discusses
about the system design and gives an overview of the systems processes. Then, the
database schema of the system is illustrated. Lastly, the user interface design has been
developed.
• The application must have registration and sign in option with Facebook API.
• The application must have password recovery system with email address for
users and admins.
• The application must have menu add and edit options for admin.
31
• The user interface must be mobile-friendly.
32
The above context diagram shows the processes of two entities, User and Admin, with
the restaurant system. Both of the entities have four processes with the system.
The box represents when a piece of data is stored. The between the boxes and oval
shape shows the flow of data. The main purpose of a DFD is to show the flow of data
while doing a process. Figure 6 shows the DFD of ordering foods process for users.
33
1 System
User
Menu Details
Check Available
Menus
2 System
D2 Users
Valid Info
3 System
Cart Items
Valid Info
Order Details
Payment
D4 Order
Process 1 shows that whenever a visitor request the menus page, the system makes a
query in the menu table of the database and acquires available menus and returns the
menu list to visitor. If visitor likes to add any menu the menu list (shopping cart), s/he
hits “Add to Menu” button. Then in Process 2, the systems checks if the user is logged
in. If the user is not logged in, the system requests user to log in by redirecting
him/her to the log in page. After getting user’s credential, the system compares the
credential against the user database. In Process 3, if the user credential matched with
the credentials saved in User table in database, the system adds the menu to Cart table
34
and redirects to the cart page. In Process 4, if user orders the menu, the order details
saved in the Order table.
1 System
Admin
Admin information
Check Admin
Credentials
D1 Admins
2 System
D2 Menus
3 System
Updated Data
Update Menu
Delete Request
4 System
Delete Menu
New Menu
Admin
5 System
Add Menu
35
Figure 7 illustrates the processes of admin in for manipulating Menus table of the
database. There are five processes for admin in this application. Process 1 depicts the
login of admin to the system. When admin gives credentials and send login request to
system, the system checks the credentials against the Admins table of the database and
gives access. Process 2 illustrates the acquisition of available menu list for admin. In
Process 3, the update process of menu has been depicted. In Process 4, deletion of
menu has been illustrated. In Process 5, adding process of new menu is shown.
P
id
K
name Facebook
CartItem
email Cart P
P user_id
id K
K
P
password id
K provider_user_id
cart_id
role user_id provider
menu_id
remember_token created_at created_at
created_at
created_at updated_at updated_at
updated_at
updated_at
Users
P
id
K
rememberToken
created_at Menu
updated_at P
id
K
email P
id description
K
password
name category
provider_id
created_at image
rememberToken
updated_at price
created_at
created_at
updated_at
updated_at
36
Figure 8: Entity relationship diagram of the system.
The crow foots shows the links between entities. A line with crowfoot in one side and
normal line in another side means many-to one or one-to- many relationship. The
ERD shows that, there is not any relationship between admin table and other tables in
the database. User table has relationship with Facebook and Cart tables. The Menu
table has a relationship with CartItem and Category tables. The Cart table has a
relationship with CartItem and User tables.
Figure 9: Difference of screen layouts for different size of screens (Tan, 2013).
4.4.1. Homepage
The homepage is the index page of the application. This is the page that is shown to
visitor when s/he accessed the website through URL. Figure 10 illustrates the layout
of the homepage in large screen.
37
Figure 10: Homepage layout.
The homepage of the application consists of a menu bar with company name, a
Jumbotron, featured food item and footer. The login and registration links appear in
the top right side of the menu bar, if the user is logged in. If the user is logged in,
there will be dropdown button for logging out with displaying the username.
38
Figure 11: Home page layout for small screen.
The homepage layout will change when someone visits the website from a smaller
screen. When the website is visited from a device with small screen, the menu bar is
toggled under a button. If the toggle button pressed, the menu bar comes out in
stacked manner. The header and footer layout is constant for all of the pages of the
site.
39
Figure 12: Menu list page layout.
When this page appears in a small screen, the layout of the page will change to show
the page to viewers more effectively. Figure 13 shows the changes of the menu list
page when it appears in a small screen.
40
Figure 13: Menus page layout for small screen.
41
Figure 14: Menu details page layout.
As Figure 14 shows, Facebook and Twitter share button will be shown in this page.
Facebook comments are shown in bottom left of the page. On the other hand, Figure
15 shows the layout of the menu details page in small screen. The layout is drastically
changes in small screen as there are too many buttons for social media sharing and
adding menu to cart.
42
Figure 15: Menu details page layout for small screen.
43
5. Implementation
This chapter provides an overview of the implementation process. In first, the
implementation of the frontend part is described. After that, different backend
functionalities have been discussed and evaluated.
5.1. Views
The user interface of the application is responsive. So, the interface can occupy the
full screen in any kind of device. For making the user interface of the application
mobile friendly, Bootstrap 4 is used. Laravel uses blade templating engine for making
views and presentation layer of applications. Blade templating engine is used to
develop and present the views. There is a main frontend view is developed, which has
been extended for different views of different pages. The following code snippet
shows the main view of the application.
<!DOCTYPE html>
@include('layouts.header')
<body>
@include('layouts.navbar')
@yield('content')
@include('layouts.footer')
</body>
</html>
We can see that the main view extends and includes three other views which are
header, navbar and footer. The header file is the HTML header files, which contains
metatags of page. The navbar blade contains the navigation bar of the application. The
footer blade contains the footer of the application. The footer blade also contains
some JavaScript files needed for the application. For example, it contains the
JavaScript file for connecting to Facebook API.
The following code snippet shows the header blade. The header blade contains the
metatags and CSS links.
44
<html lang="{{ app()->getLocale() }}">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1,
shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title> @yield('title')</title>
45
The page can be viewed in any kind of devices. The following image shows the view
of the page in a smart phone screen.
46
The view of the page in a mobile screen is as below;
47
As we can see that, the pages of the application is responsive.
For adding the product into cart and showing the subtotal of the product another
function is added.
public function store(Request $request, $item)
{
$menu = Menu::find($item);
$cartItem = Cart::add([
'id' => $menu->id,
'name' => $menu->name,
'qty' => 1,
'price' =>$menu->price
]);
Cart::associate($cartItem->rowId, 'App\Menu'); // Display an image to
cart Page
Session::flash('status', 'Product added to cart');
return redirect('/cart');
}
Whenever a user adds any product to cart, the system is redirected to cart page where
all of the products are available. Users can remove items from the cart.
48
public function destroy($id)
{
Cart::remove($id);
Session::flash('status', 'Product removed from cart');
return redirect()->back();
}
Some new functions have been added in Login Controller to handle the login with
Facebook function. It checks if a user is in User table. If there is not any user, it
creates a new user using Facebook credential. If the user exists, it lined the Facebook
account the User table through provider_id field.
49
public function redirectToFacebook()
{
return Socialite::driver('facebook')->redirect();
}
/**
* Return a callback method from facebook api.
* @return callback URL from facebook
*/
public function callback()
{
$user = Socialite::driver('facebook')->user();
$authUser = $this->findOrCreateUser($user);
Auth::login($authUser, true);
return redirect('/');
}
public function findOrCreateUser($user)
{
$account = Facebook::whereProvider('facebook')
->whereProviderUserId($user->getId())
->first();
if ($account) {
return $account->user;
} else {
$account = new Facebook([
'provider_user_id' => $user->getId(),
'provider' => 'facebook'
]);
$user = User::whereEmail($user->getEmail())->first();
if (!$user) {
$user = User::create([
'email' => $user->getEmail(),
'name' => $user->getName(),
]);
}
$account->user()->associate($user);
$account->save();
return $user;
}
}
On the other hand, JavaScript code have been used to handle the Facebook like and
share. The code is provided by Facebook API. The snippet of the code needs to be
pasted in the desired location of the view file.
<script>
window.fbAsyncInit = function() {
FB.init({
appId : '161117594497266',
xfbml : true,
version : 'v2.11'
50
});
FB.AppEvents.logPageView();
};
(function(d, s, id){
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) {return;}
js = d.createElement(s); js.id = id;
js.src = "https://connect.facebook.net/en_US/sdk.js";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));
</script>
Snippet 8: JavaScript code for adding Facebook like & share button.
51
6. Testing
This chapter elaborates the test process of the application and shows the result of
testing.
52
Test Check Facebook 1. Go to The window As Pass
2 login functionality registration is redirected expected
with non-logged in page homepage
Facebook user with showing
2. Click on “Login the Facebook
with Facebook” timeline name
button on the top
right of the
3. Enter Facebook bar.
username and
password on the
next page
4. Press sign in
button
53
Test Add new menu into 1. Fill up the add A As Pass
5 database menu form confirmation expected
message will
2. Press add button be shown.
New menu
added to
database. The
image of the
menu
uploaded to
images folder
with menu
name.
4. Click update
6.1.1. Test 1
Go to registration page and click on “Login with Facebook” button. The window
should redirected to Facebook, then to homepage with showing the Facebook timeline
name on the top right of the bar.
54
Figure 21: Facebook login successful.
6.1.2. Test 2
As the user is not logged in, when s/he presses on “Login with Facebook” button the
page will be redirected to Facebook login.
After submission of correct credentials for Facebook, the page will be redirected to
the homepage with logged in user.
55
Figure 23: Successful login with Facebook.
6.1.3. Test 3
When a logged in user added a menu to menu list, the page should be redirected to the
cart page with correct subtotal and total.
6.1.4. Test 4
Whenever multiple menus added, the changes should be shown in the total price.
56
Figure 25: Total of multiple menus.
6.1.5. Test 5
The admin filled in the new menu form with information of a new product and
pressed add menu button.
57
Figure 27: Confirmation message after upload new product.
The image of the new menu should be uploaded to the images folder directory.
58
Figure 29: The image of the new menu uploaded to the folder.
59
6.1.6. Test 6
The admin navigated to the index of menu page and pressed edit button for Coca
Cola.
60
Figure 32: Product price is edited.
61
Figure 33: Update of product price in menu list page.
Figure 34 shows that the restaurant app passed 7 tests out of 8 tests. The test result
shows that the metadata for page is not used in header section of the page which may
cause inappropriate result in search engine. The application gets overall 88 percent
marks.
62
6.3.1. Ease of use
The first question of the questionnaire is for addressing the ease of use of the system.
Figure 35 illustrates the result of this question.
As the bar chart shows, 11 persons of 20 is ticked that the application is very easy and
5 found the application is moderately easy. Only 4 persons found the application is
slightly easy or not at all.
63
Figure 36: Percentage of views on user friendliness.
64
RESPONSIVNESS OF UI
Yes No Have isues
45%
55%
0%
There can be many issues that can make problem in responsiveness. It has been tried
to find some of them. Who have problem with UI of the website, their screen size data
collected and analysed. The result is shown in the bar chart in Figure 38.
Screen Size
8
0
5 inch or more Below 5 inch
65
Figure 38: Screen size of devices facing problem with UI.
We can see, most of respondents who face problem in responsiveness use a device
with a screen smaller than 5 inch. So, UI should be optimised for smaller screens.
10
8
Very Satisfied
6 Moderatly Satisfied
Slightly Satisfied
4
Not at All
2
According to pie chart, 47% of respondent is very satisfied with the performance and
speed and 32% of respondent is moderately satisfied with the system.
66
7. Results & Evaluations
This chapter provides an overview of the project and its outcomes. The outcomes of
the project also is also analysed and evaluated.
67
like, share and comment through Facebook social media plugin. The like button
shows the friend names of user who liked the menu previously. Users can directly
share the menu in personal timeline by clicking on the share button or can comment to
express their thought about the menu. This helps the management about the
impression of the food menu on the users. Then, the management can take steps to
improve the quality of the food.
The integration of Facebook API also helps the management in keeping track of users
and get different kinds of insights about the users. As the developed restaurant
application has not any in-app business intelligence tool, the Facebook analytics can
give the management a good overview of the online customers. In-app analytics
application development can make expand the length of the project. But it is good tool
for management. Restaurant owners can make decisions more informatively if they
have a business intelligence. The lacking of in-app business analytics tool can be
minimised by utilising the Facebook analytics tool.
The Facebook API also eased user registration and login process. New users can
register for ordering food by tapping one button. New users do not need to fill up
registration form which is a boring thing for most people. On the other hand, existing
users can login by pressing one button.
68
Whenever a user uses Facebook or Twitter for sharing food menus, their friends and
followers can know about the restaurant. As they know the restaurant through their
friends, they will feel trust about the quality of the restaurant.
69
8. Conclusions and Recommendations
This chapter concludes the report of this project. This chapter starts with discussing
the achievements of this project. Following that, it describes the limitations in the
system. It then proposes and recommends some features to be added to the system.
Finality, the chapter ends by concluding remarks.
• Objective #1 was satisfied by reviewing the past works for automating the
restaurant food ordering process. Along with this, the web application
development technologies is briefly discussed.
• Objective #3 was satisfied by developing the system with Laravel 5.4 and
Bootstrap 4.
The project was time-consuming. It has been tried to implement as many features as
possible within the very limited timeframe. It has successfully satisfied the Functional
Requirements. Some Non-functional Requirements of the system is not implemented.
These requirements have top priority and reflect the most needed features. Some
requirements are not implemented due to time constraints. However, their absence
would not result in major operational issues as they are the lower priority features.
These features could be implemented in the future.
70
8.2. Limitations of the System
There are also some limitations of the system. The shopping cart of the system has
basic functionalities and does not support advanced cart modification features. Along
with this, validation functionalities and almost all functionalities of the application are
handled with server side programming. It makes extra load on the server, especially
when the application gets lots of viewers. This limitation can be minimised by
validating data using client side language like JavaScript or HTML 5. Along with this,
the order model has been developed. But the controllers and functions for pushing
data into order table is not written. So, the placed orders cannot be viewed.
71
8.4.2. Acquiring Programming Skills
To develop the application, I have to learn Laravel and Bootstrap. Learning Laravel
made my concept about object oriented programming clearer. I have also gained
some experiences on problem solving skills, as sometimes I had to brainstorm, search
and think for two or three days to solve a piece of code that was not working.
Sometimes it comes out a silly problem. Along with this, I was not good in
developing user interface.
72
9. Bibliography
Alagoz, S. M. and Hekimoglu, H. (2012) ‘A Study on Tam: Analysis of Customer
Attitudes in Online Food Ordering System’, Procedia - Social and Behavioral
Sciences, 62, pp. 1138–1143. doi: 10.1016/j.sbspro.2012.09.195.
Bounnady, K. et al. (2016) ‘Comparison the processing speed between PHP and
ASP.NET’, in. 2016 13th International Conference on Electrical
Engineering/Electronics, Computer, Telecommunications and Information
Technology (ECTI-CON), pp. 1–5. doi: 10.1109/ECTICon.2016.7561484.
Dennis, A., Wixom, B. H. and Roth, R. M. (2012) Systems Analysis and Design. 5th
Editon. John wiley & sons.
Dhore, V. B. et al. (2014) ‘Digital Table Booking and Food Ordering System Using
Android Application’, International Journal of Emerging Engineering Research and
Technology, 2(7), pp. 76–81.
73
Gayatri, P. V., Chaitanya, J. K. and Harikrishna, K. (2014) ‘Developing an Intelligent
e-Restaurant with a Menu Recommender for Customer-Centric Service using Wi-Fi
Technology’, International Journal of Computer Applications, 101(16).
Gould, H. (2016) Systems Analysis and Design. 1st Edition. BookBoon. Available at:
http://bookboon.com/en/systems-analysis-and-design-ebook (Accessed: 30 December
2017).
Hongzhen, X. U., Bin, T. and Wenlin, S. (2009) ‘Wireless food ordering system based
on web services’, in Intelligent Computation Technology and Automation, 2009.
ICICTA’09. Second International Conference on. IEEE, pp. 475–478.
Jailia, M. et al. (2016) ‘Behavior of MVC (Model View Controller) based Web
Application developed in PHP and .NET framework’, in. 2016 International
Conference on ICT in Business Industry Government (ICTBIG), pp. 1–5. doi:
10.1109/ICTBIG.2016.7892651.
Jound, I. and Halimi, H. (2016) Comparison of performance between Raw SQL and
Eloquent ORM in Laravel. Blekinge Institute of Technology. Available at:
http://www.diva-portal.org/smash/get/diva2:1014983/FULLTEXT02 (Accessed: 12
December 2017).
Kimes, S. E. (2011) ‘The current state of online food ordering in the US restaurant
industry’, Cornell Hospitality Report, 11(17), pp. 6–18.
74
Korth, H. F., Sudarshan, S. and Silberschatz, A. (2010) Database System Concepts.
McGraw-Hill Education.
Lei, K., Ma, Y. and Tan, Z. (2014) ‘Performance Comparison and Evaluation of Web
Development Technologies in PHP, Python, and Node.js’, in. 2014 IEEE 17th
International Conference on Computational Science and Engineering, pp. 661–668.
doi: 10.1109/CSE.2014.142.
Leong, W. H. (2016) Food Ordering System Using Mobile Phone. University Tunku
Abdul Rahman. Available at: http://eprints.utar.edu.my/1943/1/IA-2016-1203135-
1.pdf (Accessed: 12 January 2018).
Oddle (2016) 2016 Restaurant Industry Statistics That Made The Industry Tick,
Oddle. Available at: https://oddle.me/blog/2016/12/29/2016-restaurant-industry-
statistics-that-made-the-industry-tick (Accessed: 7 July 2017).
Olanrewaju, R. F., Islam, T. and Ali, N. (2015) ‘An empirical study of the evolution
of php mvc framework’, in Advanced Computer and Communication Engineering
Technology. Springer, pp. 399–410.
75
Parr, T. J. (2004) ‘Enforcing strict model-view separation in template engines’, in
Proceedings of the 13th international conference on World Wide Web. ACM, pp.
224–233.
Patel, K. J., Patel, U. and Obersnel, A. (2007) ‘PDA-based wireless food ordering
system for hospitality industry; A case atudy of Box Hill Institute’, in. 2007 Wireless
Telecommunications Symposium, pp. 1–8. doi: 10.1109/WTS.2007.4563314.
Patel, M. (2015) Online Food Order System for Restaurants. Master’s thesis. Grand
Valley State University. Available at: https://scholarworks.gvsu.edu/cistechlib/219/
(Accessed: 27 January 2018).
Statista (2017) Global social media ranking 2017, Statista. Available at:
https://www.statista.com/statistics/272014/global-social-networks-ranked-by-number-
of-users/ (Accessed: 2 January 2018).
Sullivan, K. (2015) The History of Restaurant POS Systems, Toast. Available at:
https://pos.toasttab.com/blog/the-history-of-restaurant-pos-systems (Accessed: 22
October 2017).
76
https://studentnet.cs.manchester.ac.uk/resources/library/thesis_abstracts/MSc13/FullT
ext/Tan-ChinLoong-fulltext.pdf (Accessed: 29 December 2017).
Tan, T.-H., Chang, C.-S. and Chen, Y.-F. (2012) ‘Developing an intelligent e-
restaurant with a menu recommender for customer-centric service’, IEEE
Transactions on Systems, Man, and Cybernetics, Part C (Applications and Reviews),
42(5), pp. 775–787.
Tatsubori, M. and Suzumura, T. (2009) ‘HTML templates that fly: a template engine
approach to automated offloading from server to client’, in Proceedings of the 18th
international conference on World wide web. ACM, pp. 951–960.
The PHP Group (2018) What is PHP?, PHP Official Website. Available at:
http://php.net/manual/en/intro-whatis.php (Accessed: 22 January 2018).
77
10. Appendices
10.1. Appendix A: Code Snippets
<?php
namespace App\Http\Controllers\AdminAuth;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Auth;
//Trait
use AuthenticatesUsers;
namespace App\Http\Controllers\AdminAuth;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Admin;
78
protected $redirectPath = 'admin_dashboard';
//Validates data
$this->validator($request->all())->validate();
//Create seller
$admin = $this->create($request->all());
//Authenticates seller
$this->guard()->login($admin);
//Redirects sellers
return redirect($this->redirectPath);
}
namespace App\Http\Controllers\AdminAuth;
use App\Menu;
use App\Category;
79
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Storage;
use App\Http\Controllers\AdminAuth\Session;
use Illuminate\Database\Query\Builder;
class MenuController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
//
$menus = Menu::all();
return view('admin.menu.menus', compact('menus'));
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
//
$categories = Category::all();
return view('admin.menu.add_menu', compact('categories'));
// echo "Ok";
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$extension = $request->file('image')->getClientOriginalExtension();
$this->validate($request, [
'image' => 'image|mimes:jpg,png,jpeg,gif,svg|max:2048',
80
'name' => 'unique:menus'
]);
/**
* Display the specified resource.
*
* @param \App\Menu $menu
* @return \Illuminate\Http\Response
*/
public function show(Menu $menu)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param \App\Menu $menu
* @return \Illuminate\Http\Response
*/
public function edit(Menu $menu)
{
//
$categories = Category::pluck('name');
return view('admin.menu.update_menu', compact('menu',
'categories'));
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param \App\Menu $menu
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
$menu = Menu::find($id);
81
if($request->hasFile('image')) {
$extension = $request->file('image')-
>getClientOriginalExtension();
$this->validate($request, [
'image' => 'image|mimes:jpg,png,jpeg,gif,svg|max:2048',
'name' => 'unique:menus'
]);
$menu->image = $fileName;
}
$menu->save();
return redirect('/menus/update/'.$id)->with('status', 'Menu
Updated');
}
/**
* Remove the specified resource from storage.
*
* @param \App\Menu $menu
* @return \Illuminate\Http\Response
*/
public function destroy(Menu $menu)
{
//deleting the image of menu from directory
// if(file_exists(storage_path('app/public/images/').$menu->image)
Storage::delete('public/images/'.$menu->image);
}
}
82
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Menu;
use Session;
use Cart;
$cartItem = Cart::add([
'id' => $menu->id,
'name' => $menu->name,
'qty' => 1,
'price' =>$menu->price
]);
Cart::associate($cartItem->rowId, 'App\Menu'); // Display an image
to cart Page
Session::flash('status', 'Product added to cart');
return redirect('/cart');
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
83
{
//
//dd($qty);
dd($id);
// dd($id);
break;
//$r = Cart::update($id, $request->qty);
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
//
Cart::remove($id);
Session::flash('status', 'Product removed from cart');
return redirect()->back();
}
}
namespace App\Http\Controllers;
use App\Menu;
use App\Category;
use Illuminate\Http\Request;
/**
* Display the specified resource.
*
84
* @param \App\Menu $menu
* @return \Illuminate\Http\Response
*/
public function show(Menu $menu)
{
$interested = Menu::where('id', '!=', $menu)->get()->random(2);
return view('menus.show', compact('menu','interested'));
}
}
@section('content')
<div class="container">
@if(Session::has('status'))
<div class="alert alert-warning alert-dismissible fade show" role="alert">
{{ Session::get('status') }}
<button type="button" class="close" data-dismiss="alert" aria-
label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
@endif
@foreach(Cart::content() as $menu)
<tbody>
<tr>
<td class="cart_product">
<a href=""><img src="{{ asset('/storage/images')."/".$menu-
>model->image }}" alt="" height="100px" width="100px"></a>
</td>
<td class="cart_description">
<h4><a href="">{{ $menu->name }}</a></h4>
</td>
<td class="cart_price">
<p>BDT {{$menu->price}}</p>
</td>
<td class="cart_quantity">
<div class="cart_quantity_button">
<input title="qty" id="qty" class="email input-text qty
85
text" value="{{ $menu->qty }}" type="text">
</div>
</td>
<td class="cart_total">
<p class="cart_total_price">BDT {{ $menu->subtotal }}</p>
</td>
<td class="cart_update">
<a href="{{ route('cart.update',['id' =>$menu->rowId,
'qty' =>$menu->qty]) }}"><button class="btn btn-warning">Update</button></a>
</td>
<td class="cart_delete">
<a href="{{ route('cart.delete',['id' =>$menu->rowId])
}}" class="product-del remove" title="Delete"><button class="btn btn-
danger">Delete</button></a>
</td>
</tr>
<tr>
@endforeach
<th class="text-right">Shipping</th>
<td class="text-right">BDT 50</td>
</tr>
<tr>
<th class="text-right">Total</th>
<td class="text-right"><b>{{ Cart::subtotal() + 50 }}</b></td>
</tr>
</tbody>
</table>
</div>
<div align="center">
86
10.2. Appendix B: Questionnaire
Questionnaire for User Acceptance Test
☐ Very easy
☐ Moderately easy
☐ Slightly easy
☐ Not at all
☐ Very user-friendly
☐ Moderately user-friendly
☐ Slightly user-friendly
☐ Not at all
☐ Yes
☐ No
☐ Yes, but with some issues. (Please, specify your screen size)
4. Are you satisfied with the speed and performance of our application?
☐ Very satisfied
☐ Moderately satisfied
☐ Slightly satisfied
☐ Not at all
87
5. How can we improve our software?
Explanation:
88
10.3. Appendix C: Ethical Approval & Progress Report
89
90
91
Figure 44: Scan copy of project progress report for meeting 10.
92