Tải bản đầy đủ (.pdf) (77 trang)

Phương pháp tính giá thành sản phẩm trong ngành chế biến gỗ

Bạn đang xem bản rút gọn của tài liệu. Xem và tải ngay bản đầy đủ của tài liệu tại đây (3.21 MB, 77 trang )

PROJECT’S NAME: BUILDING AN APPLICATION FOR TRACKING EFFECTIVE RUNNING WITH GPS INTEGRATION
Thai Dong Khuong

THE UNIVERSITY OF DA NANG
DANANG UNIVERSITY OF SCIENCE AND TECHNOLOGY
FACULTY OF INFORMATION TECHNOLOGY

GRADUATION THESIS
INFORMATION TECHNOLOGY FACULTY

PROJECT NAME:

BUILDING AN APPLICATION FOR TRACKING
EFFECTIVE RUNNING WITH GPS
INTEGRATION

Supervisor
Student
Student ID
Class

:
:
:
:

MSc. HO PHAN HIEU
THAI DONG KHUONG
102150108
15T2


Da Nang, December 2019


THE UNIVERSITY OF DA NANG
DANANG UNIVERSITY OF SCIENCE AND TECHNOLOGY
FACULTY OF INFORMATION TECHNOLOGY

GRADUATION THESIS
INFORMATION TECHNOLOGY FACULTY

PROJECT NAME:

BUILDING AN APPLICATION FOR TRACKING
EFFECTIVE RUNNING WITH GPS
INTEGRATION

Supervisor
Student
Student ID
Class

:
:
:
:

MSc. HO PHAN HIEU
THAI DONG KHUONG
102150108
15T2


Da Nang, December 2019


INSTRUCTOR’S COMMENTS
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................

...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................


REVIEWER’S COMMENTS
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................

...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................
...........................................................................................................................................


SUMMARY

Topic title: Building an application for tracking effective running with GPS integration
Student name: Thai Dong Khuong
Student ID: 102150108
Class: 15T2
The purpose of this project was to create a system which offers services that
focuses on gathering and managing sports data (specially for running) in order to
motivate people to do sports and to link like-minded people. All relevant sports data
(duration, distance, calories consumption, average pace, average speed) can be tracked
via my app. Tracking Running (name of my app) makes your running more exciting because after all, sports are supposed to be fun.
I use Laravel framework for building API and Admin Web Page, React Native for
buiding Mobile Application, MySQL for designing database. In addition, I use
Cloudinary for storing image and Amazon Web Services for deployment.


THE UNIVERSITY OF DANANG
UNIVERSITY OF SCIENCE AND TECHNOLOGY
INFORMATION TECHNOLOGY FACULTY


SOCIALIST REPUBLIC OF VIET NAM

Independence – Freedom – Happiness

GRADUATION PROJECT REQUIREMENTS
Student Name: Thai Dong Khuong
Student No.: 102150108
Class: 15T2
Department: Information Technology
Major: Software Engineer
1. Name of project:
Building an application for tracking effective running with GPS integration
2. This project’s results: ☐ Are protected by an intellectual property agreement
3. Initial data:
Data collected from internet and typed by hand
4. Project contents:
I need to complete all of the content below to build the my system:
- Analysis and design database structure
- Implementing all features in the system and public as RESTful API web
service.
- Design and build up an Android application for client (include: UI, security
and business logic).
5. Charts and drawings (please specify the drawing type and size):
- Use case diagram
- Activity diagram
- Class diagram
- Package diagram
6. Supervisor: M.S. Ho Phan hieu
7. Date of assignment: 06/09/2019
8. Date of completion: 20/12/2019

Da Nang, day 20 month 12 year 2019
Head of Division
Supervisor


ACKNOWLEDGEMENTS
I would first like to thank my instructor, M.S. Ho Phan Hieu for his continuos
support, supervision, motivation, and guidance throughout the tenure of my project in
spite of his hectic schedule. He remained a driving spirit in my project and his experience
gave me the understanding in handling research projects as well as helping me to clarify
the complicated concepts, requiring knowledge and perception, handling critical
situations and in understanding the objective of my work.
I also want to thank my family and friends, who gave me the strength and confidence
during the time of learning and implementation phase of this project. They have given a
lot of love and encouragement for me which helped pass over the difficulties and
struggles.
Without their generous help, my senior year would not have been successful.
Sincerely,

Thai Dong Khuong

i


GUARANTEE

We guarantee:
1. The contents of this senior project are performed by myself following the
guidance of supervisors M.S. Ho Phan Hieu.
2. All references used in this senior project thesis, are quoted with the author’s

name, project name, time and location to publish clearly and faithfully.
3. All invalid copies, educated statute violation or cheating will be borne the
full responsibility by myself.

Students,

Thai Dong Khuong

ii


TABLE OF CONTENT
Instructor’s comments
Response’s comments
Abstract
Graduation project requirements
Acknowledgements

i

Guarantee

ii

Table of content

iii

List of tables and figures
v

INTRODUCTION ..................................................................................................... 1
1.

Project Overview .......................................................................................... 1

1.1.

Context ..................................................................................................... 1

1.2.

Purpose .................................................................................................... 1

2.

Theories ........................................................................................................ 1

2.1.

Technologies ............................................................................................ 1

2.2.

Tools and environment development ....................................................... 2

3.

Structure of the thesis .................................................................................. 2

Chapter 1: THEORIES AND TECHNOLOGY ..................................................... 3

1.1. PHP Programming Language ..................................................................... 3
1.2. Laravel Framework ..................................................................................... 4
1.3. React Native ................................................................................................. 7
1.4 MySQL ......................................................................................................... 8
1.5. Cloudinary .................................................................................................... 9
1.6. Amazon Web Services (AWS) ................................................................... 11
1.7. RESTful APIs ............................................................................................. 14
Chapter 2: ANALYSIS AND DESIGN ................................................................. 19
2.1. Requirement analysis ................................................................................. 19
2.1.1. General requirements ............................................................................ 19
2.1.2. Main features ......................................................................................... 19
2.2. System analysis ........................................................................................... 20
2.2.1. System architecture ................................................................................ 20
2.2.2. Use case diagram ................................................................................... 21
2.2.3. Description for the main use case .......................................................... 22
2.2.4. Activity diagram ..................................................................................... 35
iii


2.3. System design ............................................................................................. 41
2.3.1. Class diagram ........................................................................................ 41
2.3.2. Package diagram ................................................................................... 42
2.3.3. Database design ..................................................................................... 43
2.4. Conclusion .................................................................................................. 49
Chapter 3: IMPLEMENTATION AND DEMO ................................................... 50
3.1. Development environment ......................................................................... 50
3.2. Demo main feature ..................................................................................... 50
3.2.1. Login – Logout....................................................................................... 50
3.2.2. Register .................................................................................................. 52
3.2.3. Start running ......................................................................................... 53

3.2.4. Join Challenge and group ..................................................................... 57
3.2.5. Social network ....................................................................................... 59
3.2.6. Update profile ........................................................................................ 60
3.2.7. Admin Web ............................................................................................ 61
3.3. Evaluation................................................................................................... 63
3.3.1. Advantages ............................................................................................. 63
3.3.2. Disadvantages ........................................................................................ 63
CONCLUSION ........................................................................................................ 64
1.

Achievement ............................................................................................... 64

2.

Future work ................................................................................................ 64

REFERENCES ........................................................................................................ 65

iii


LIST OF TABLES AND FIGURES
1. List of figures
Figure 1.1: PHP language ............................................................................................ 3
Figure 1.2: Architecture of Laravel MVC .................................................................... 5
Figure 1.3: React Native framework ............................................................................ 7
Figure 1.4: MySQL database ....................................................................................... 8
Figure 1.5: Cloudinary – Image Storage Service ....................................................... 10
Figure 1.6: Cloud computing ....................................................................................... 12
Figure 1.7: Amazon Web Services (AWS)................................................................... 12

Figure 1.8: Elastic Beanstalk – a service of AWS ........................................................ 14
Figure 1.9: REST architecture ..................................................................................... 15
Figure 2.1: System architecture ................................................................................... 20
Figure 2.2: Use case diagram for Administrator ........................................................... 21
Figure 2.3: Use case diagram for User ......................................................................... 22
Figure 2.4: Use case diagram for User ......................................................................... 36
Figure 2.5: Activity diagram for register function ........................................................ 36
Figure 2.6: Activity diagram for main function ............................................................ 37
Figure 2.7: Activity diagram for join function ............................................................. 38
Figure 2.8: Activity diagram for updating profile function ........................................... 39
Figure 2.9: Activity diagram for deleting account function ........................................ 40
Figure 2.10: Class diagram of system .......................................................................... 41
Figure 2.11: Package diagram of system ...................................................................... 42
Figure 2.12: Database design ....................................................................................... 49
Figure 3.1: Login screen .............................................................................................. 52
Figure 3.2: Log out screen ........................................................................................... 53
Figure 3.3: Register screen .......................................................................................... 54
Figure 3.4: Activity screen........................................................................................... 55
Figure 3.5: Add post screen ......................................................................................... 56
Figure 3.6: Newsfeed screen ........................................................................................ 57
Figure 3.7: Progress screen .......................................................................................... 58
Figure 3.8: Group Detail screen ................................................................................... 59
Figure 3.9: Challenge screen........................................................................................ 60
Figure 3.10: Comment screen ...................................................................................... 61
Figure 3.11: Update profile screen ............................................................................... 62
Figure 3.12: Login page ............................................................................................... 63
Figure 3.13: Dashboard page (Accounts) ..................................................................... 63
iii



Figure 3.14: Manage Group page ................................................................................. 64
2. List of tables
Table 2.1: Use case description – Login....................................................................... 23
Table 2.2: Use case description – Logout..................................................................... 23
Table 2.3: Use case description – User – Register ........................................................ 24
Table 2.4: Use case description – Administrator – Manage accounts ........................... 24
Table 2.5: Use case description – Administrator –Magage roles .................................. 25
Table 2.6: Use case description – Administrator – Manage permissions ...................... 26
Table 2.7: Use case description – Administrator – Manage groups .............................. 27
Table 2.8: Use case description – Administrator – Manage challenges ........................ 28
Table 2.9: Use case description – Administrator – Manage posts ................................. 30
Table 2.10: Use case description – Administrator – Manage activities ......................... 30
Table 2.11: Use case description – User – Track running road ..................................... 31
Table 2.12: Use case description – User – History ....................................................... 31
Table 2.13: Use case description – User – Add post..................................................... 32
Table 2.14: Use case description – User – Social network ........................................... 33
Table 2.15: Use case description – User – Add friend .................................................. 33
Table 2.16: Use case description – User – Join group Table ........................................ 34
Table 2.17: Use case description – User – Update profile ............................................ 35
Table 2.18: Description of table: users ......................................................................... 43
Table 2.19: Description of table: auth_assignments ..................................................... 43
Table 2.20: Description of table: auth_items ................................................................ 44
Table 2.21: Description of table: auth_item_childs ...................................................... 44
Table 2.22: Description of table: friends ...................................................................... 44
Table 2.23: Description of table: groups ...................................................................... 44
Table 2.24: Description of table: group_user ............................................................... 45
Table 2.25: Description of table: challenges ................................................................ 45
Table 2.26: Description of table: challenge_user.......................................................... 46
Table 2.27: Description of table: posts ......................................................................... 46
Table 2.28: Description of table: comments ................................................................. 46

Table 2.29: Description of table: likes ......................................................................... 46
Table 2.30: Description of table: policies ..................................................................... 47
Table 2.31: Description of table: device_infos ............................................................. 47
Table 2.32: Description of table: results....................................................................... 47
Table 2.33: Description of table: activities ................................................................... 48

iii


Building an application for tracking effective running with GPS integration

INTRODUCTION

1.

Project Overview

1.1. Context
These days, people are leading a more sedentary lifestyle than ever before due to
the advent of many convenient facilities and equipment. Lack of exercises and outdoor
activities is the causes of many unwanted diseases such as obesity, cardiovascular
diseases, high cholesterol and high blood pressure.
Regular exercises will support your heart health as well as your flexibility and
running is one of the easiest and most suitable exercise for everyone at all ages.
However, many people sometimes find it hard to keep track of their daily running time
or lose their motivation in maintaining this activity. Therefore, I decided to make an
application named “Tracking Running” in order to help people with their daily running
exercise.
1.2. Purpose
This system helps people record their statistics, keep track of their running roads

and create a community to connect people who share the same interest.
- Admin is responsible for website management, including controlling users’
accounts, maintaining and solving any problems arising in the system.
- Users can get access to the system by signing in an account and logging in. After
logging, users can use the features that have been built in the system such as: sharing
their running results on a Social Network, keeping track of the running route on Google
Map, participating in Groups and taking challenges in Groups as well.
2.

Theories

2.1. Technologies
-

Laravel Framework for building API.

-

React Native for building Mobile Application and Admin Web Page.

-

MySQL for storing database.

-

Cloudinary for storing static assets such as image and video.

-


Amazon Web Services (AWS) for deployment.

-

Github for storing code.

Student: Thai Dong Khuong

Instructor: Ho Phan Hieu

1


Building an application for tracking effective running with GPS integration

2.2. Tools and environment development
-

Microsoft Visual Studio Code for Coding.

-

Postman for testing API.
Xampp environment.

-

Genymotion emulator.

3.


Structure of the thesis

INTRODUCTION – This chapter gives information about the context and
purpose of the project as well as giving the scope of the problems which will be focused
on the thesis.
Chapter 1: THEORIES AND TECHNOLOGIES – This chapter introduces
about all knowledge theories and technologies used in this project.
Chapter 2: ANALYSIS AND DESIGN – This chapter covers the main features,
software requirement specifications and database design of the project.
Chapter 3: IMPLEMENTATION AND RESULT EVALUATION – This
chapter shows an implementation of this project, including pictures and a brief
explanation for each main function.
CONCLUSION – The concluding section of the project simultaneously
emphasizes the problem solved, as well as presenting issues still unresolved and
provides recommendations and suggestions.
REFERENCES – Presentation about detail of referenced information used in
this thesis.

Student: Thai Dong Khuong

Instructor: Ho Phan Hieu

2


Building an application for tracking effective running with GPS integration

Chapter 1: THEORIES AND TECHNOLOGY


This system applies the current popular techlonogies and platforms that combine
to create a system responds to the services that users desire.
To learn more about technologiesm I would like to present the concept of some
key technologies that I used in this project.
1.1. PHP Programming Language
PHP, or Hypertext Preprocessor, is a programming language that allows for the
user to have more control over the HTML that makes up a web page. PHP allows for
many more functions than HTML does, such as DIV tables, login functions, and
graphical displays. PHP was originally known as Personal Home Page, which describes
the purpose of the language. PHP works alongside HTML within the same document
which allows for users to organize and display information within a web browser much
easier than other programming languages. PHP is easy to learn and allows for users to
make a web page look and behave exactly as they want it to.

Figure 1.1: PHP language
Benefits:


Easy to read:

PHP is preferred among users because it is easy to read and understand. Many
programming languages are complex and intimidating to new users while PHP is
organized, clean, and fluent.


Easy to edit:

PHP is also easy to edit as a user is able to quickly scan a PHP document for the
code that they are looking for and change it to suit their needs. Many other programming
languages require that you change multiple functions within several documents in order

to do the same thing that PHP can.

Student: Thai Dong Khuong

Instructor: Ho Phan Hieu

3


Building an application for tracking effective running with GPS integration



More control:
PHP offers more control over web browsers than other programming languages

do. Many other programming languages require large scripts to do simple tasks while
PHP can do the same thing with a few lines of code. PHP allows users to design web
pages to their exact specifications and it can even be used alongside other programming
languages to perform a wider variety of tasks.


Better performance:

PHP has better performance ratings than other programming languages do. PHP is
fast, efficient, and works great in almost any web browser as well as integrating into
almost any server.


PHP is free:


Another reason that PHP is preferred among users is that it is entirely free. While
many other programming languages require that the user obtains expensive programs
and pays for support files, PHP is open to anyone, anywhere, and any time.


PHP is widely available:
As PHP has become such a success on the open market, it is very difficult to come

across a web server that does not support PHP development. Users can also take
satisfaction in that both individual PHP tags as well as entire PHP documents can be
found on the Internet at no cost. Thousands of these predefined PHP commands are
available around every virtual corner and even those predefined documents can easily
be edited to suit the user's unique needs.
1.2. Laravel Framework
Laravel is a free, open-source PHP web framework, created by Taylor Otwell and
intended for the development of web applications following the model–view–
controller (MVC) architectural pattern and based on Symfony. Some of the features of
Laravel are a modular packaging system with a dedicated dependency manager,
different ways for accessing relational databases, utilities that aid in application
deployment and maintenance, and its orientation toward syntactic sugar.

Student: Thai Dong Khuong

Instructor: Ho Phan Hieu

4


Building an application for tracking effective running with GPS integration


Figure 1.2: Architecture of Laravel MVC
Benefits:


High security:

Every year there are numerous cyber attacks taking place. In such situations, you
need frameworks that safeguard yourweb apps.
One of the most important benefits of selecting Laravel for your web app
development is its capabilities to provide high-class security.
Laravel itself is a secured framework which does not allow any malware activities
or security threats to enter within the web app. That means your web app development
code is safe and secure.


Enhanced Performance:

Another stronger reason to choose Laravel is its capabilities to provide an excellent
performance of the web apps.


Powerful Authentication:

The Laravel PHP framework was developed by Taylor Otwell with a purpose to
help the website developers. He wanted to allow developers to create certain web app
functionalities much faster and even in a better way.
And, one of the extremely challenging functionality for web developers isdeveloping authentication for web apps.

Student: Thai Dong Khuong


Instructor: Ho Phan Hieu

5


Building an application for tracking effective running with GPS integration



Open Source & Powerful Community:
One another benefit for you to choose Laravel is that it is open-source. But, that is

enough for you to choose it over other PHP frameworks.
But, Laravel has a powerful community of developers and development companies
that constantly and continuously provide support to make it more flexible and scalable.


Blade Templating:
One of the key features of Laravel is its Blade Templating engine. This engine

allows the web developers to simply use the pre-defined templates to write certain codes.


Database Migration:

There is one more benefit of using the Laravel framework is Migrations of
databases. These migrations allow the developers to easily undo the changes made to
the database.
Using migrations, the developers can share the databases to other developers

within the team easily and smoothly. This was not possible earlier, but various Laravel
developers came up with such facilities.


MVC Architecture:
While discussing what is Laravel, the definition from Wikipedia explicitly says

that it follows a Model-view-controller architecture.
And, due to this MVC architecture, Laravel is said to be the best framework to use
for your web application development.
MVC architecture provides built-in functionalities which the developers can make
the best use of while developing your web app. The MVC architecture also provides
better documentation compared to other PHP frameworks.
And, using MVC architecture improves the performance of your web apps. And,
that’s the reason why you should choose Laravel.


Object Oriented Libraries:

Laravel comes up with Object Oriented libraries. These libraries are pre-installed
ones and one of them is Authentication library. These libraries are full of excellent
features that are easy-to-use and easy-to-implement for the developer.

Student: Thai Dong Khuong

Instructor: Ho Phan Hieu

6



Building an application for tracking effective running with GPS integration



Easy Unit Testing:
Another reason why you should consider choosing the Laravel framework for your

web development is that it provides easy unit testing.


Future-ready Apps:
The Laravel framework is evolving every day. In the beginning, we saw the

increasing trend of the Laravel PHP framework. That trend is allowing the developers,
companies and even the entire Laravel community to bring extraordinary functionalities
that stays on the top of the technology needs.


Developer-friendly Code:

The Laravel framework comes up with libraries, tools, and even templates that
make the lives of developers easy for web application development. And, when the
developers enjoy developing your web apps, they try to make it fully-functional and a
powerful one.
1.3. React Native
React Native is an open-source mobile application framework created by
Facebook. It is used to develop applications for Android, iOS, Web and UWP by
enabling developers to use React along with native platform capabilities.
React Native build mobile apps using only Javascript. It uses the same design as
React, letting you compose a rich mobile UI from declarative components.


Figure 1.3: React Native framework

Student: Thai Dong Khuong

Instructor: Ho Phan Hieu

7


Building an application for tracking effective running with GPS integration

Benefits:


Mobile app can be built with the help of Web technology which enables any web
developer to easily enhance his/her skills and create React apps.



React Native helps in building cross platform mobile apps.



Saves time and cost to build mobile apps on multiple platforms.



Building blocks which are used in iOS and Android apps are also used while
creating React Native based apps which means that React Native is a mobile

framework that compiles app components for native mobile applications in
JavaScript.



A React Native app ensures speed and agility for the mobile apps with
responsiveness and a great native app based user experience.

1.4. MySQL
MySQL is an open-source relational database management system (RDBMS). Its
name is a combination of "My", the name of co-founder Michael Widenius's daughter,
and "SQL", the abbreviation for Structured Query Language.
MySQL is free and open-source software under the terms of the GNU General
Public License, and is also available under a variety of proprietary licenses. MySQL was
owned and sponsored by the Swedish company MySQL AB, which was bought by Sun
Microsystems (now Oracle Corporation). In 2010, when Oracle acquired Sun, Widenius
forked the open-source MySQL project to create MariaDB.

Figure 1.4: MySQL database

Student: Thai Dong Khuong

Instructor: Ho Phan Hieu

8



×