LongTB ASM1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

Undergraduate Final Year Project Proposal

MVC Model

Thang Bao Long

Bachelor of Science (Honours) Computing

GCH17072

1 Overview

These days, many businesses are moving part or all of their business by electronic means.
Buying and selling products or services through the internet and other electronic devices
is a hot trend. Therefore, in this project, I will use PHP programming language and MVC
model to develop an online shopping site. Admin of website can add, delete and update
information of products. Customers can view information of product and buy product.
I use PHP because PHP is easy to use and can run on various platforms such as Window,
Linux and Mac OS. Moreover, I use MVC model because it provides faster development
process, easier to modify and maintenance. It is also way of or organizing my code
following Model, View and Controller.

2 Aim

The aim of this project is developing an online shopping site by using PHP language
and follow MVC model.

3 Objectives

Objective 1. To understand about MVC model


Activities:
Research about MVC model
Deliverables:
A report (500 words) about MVC model
Objective 2. To select a Software Development language for this project
Activities:
1. Research about some programming languages (Java, PHP, .NET, etc.…)
2. Select a programming language for this project
Deliverables:
A report (1000 words) about some programming languages
Objective 3. To gather requirements for the system
Activities:
Read books/journals/papers about the product
Deliverables:
Requirement specification documentation
Objective 4. To analyze the system
Activities:
1. Create Context diagram
2. Create Use case diagrams
3. Describe the use cases (use case narratives, activity diagrams)
Deliverables:
1. Create Context diagram
2. Create Use case diagrams
3. Set of use cases descriptions
Objective 5. To design the system
Activities:
1. To create informational design (DB Design - ERD)
2. To create functional design (Class diagrams)
3. To do algorithm design (pseudo codes, flow-charts)
4. Interaction Design (or just GUI Design)
Deliverables:
1. A report about design principles
2. ERD
3. Set of class diagrams
4. Set of pseudo codes/flowcharts for the
algorithms used
5. GUIs
Objective 6. To implement the system
Activities:
1. Select an appropriate programming language (PHP)
2. Select an appropriate DBMS (phpMyAdmin)
3. Select an appropriate IDE
4. Code
1. A report about selected programming language
2. A report about selected DBMS
3. A report about IDE
4. The software
Objective 7. Testing
Activities:
1. Select test strategy, Black box, White box, Mixed
(optional)
2. Write test cases
3. Do test
4. Write test result evaluations
Deliverables
1. A report about selected test strategy (optional)
2. Set of test cases
3. Set of test results
4. Test result evaluations
Objective 8. Evaluations
Activities
1. Describe about the product built (screenshots + guide steps -> user manual)
2. Analyse Strengths/Weaknesses of the products
3. Analyse Strengths/Weaknesses of the selected technologies in this case
4. Analyse Strengths/Weaknesses of the selected software development methodology
in this case
Deliverables:
1. A report about product built
2. A report about Strengths/Weaknesses of the products
3. A report about Strengths/Weaknesses of the selected technologies in this case
4. A report about Strengths/Weaknesses of the selected software development
methodology in this case
Objective 9. Conclusion and future works
Activities:
1. Write the conclusion
2. Write the future work
Deliverables:
1. A report about the conclusion
2. A report about the future work
Objective 10. To write the final report
Activities:
1. Write the first draft
2. Proof read the first draft
3. Complete the final report
Deliverables:
1. The first draft
2. The complete/final report

4 Legal, Social, Ethical and Professional

Legal: This website must conform to the Data Protection Act & GDPR. This site must
state how any personal data is handled and processed. Moreover, I also have method to
protect user’s personal data if this website face to attack of hackers.
Social: This website can be accessed in many different countries. Therefore, the
website needs to match the culture of each country.
Ethical: This website avoiding plagiarism or the unethical or even illegal use of
software components built by others. I also need refusing to work for companies
involved in activities that might be interpreted as being harmful to society.
5 Planning (see appendix A)

I use grantt chart to plan and control the project.

6 Initial References

Banzal, S. (2015). PHP, MYSQL and Apache Server. Firewall media.


Beak, A. (2017). PHP 7 Zend Certification Study Guide: Ace the ZCE 2017-PHP
Exam. Apress.
Bramer, M. (2015). Web Programming with PHP and MySQL: A Practical Guide.
Springer.
Tarr, A. (2012). PHP and MySQL 24-Hour Trainer. Wrox Press.

7 The requirement specification for the project

7.1 Research on other product


These days, e-Commerce is hot trend buying or selling of products on online services,
and it has a lot of advantages for organization. In Vietnam, there are many sites e-
Commerce such as Tiki, FPT Shop and Lazada. I’m going to review about FPT Shop.
I choose FPT Shop which is an e-Commerce website to review because FPT is a big
and prestigious brand in Vietnam. That website is designed in a profession way. GUI
is organized extremely detail. It also includes almost all features of an e-Commerce
website. For examples, it supports so many platforms such as Window, iOS,
mobile…Design functionalities is best and flexible to custom. Customers could be
supported available 24/7. It easy for customer to buy or looking for a product.
Moreover, each product in FPT Shop website has customer score to take recommend
from people who have used that product.

Figure 1: FPT Shop Website


Next, I’m going to review about detail functional of FPT Shop website. People who
access this site could view list product by types or their price, or search product by
name, create a member account to get promotion Information and enter payment
information. Then, customers could choose products they want to buy to add to cart.
They also could pay for those products by using VISA card or directly pay when they
receive products from shipment.

7.2 Project specification


My project is a website used to sale product such as clothes, shoes and bags. That
website is built by PHP language and developed follow MVC model.
Project aim is developing a website can used by customers and staff and help
company can exchange their product.
The types of roles my website will have are admin, staff and customer.
That website help user could search products by name and categories, buy products
and create account. Staffs and admin could manage, add, edit and delete product list
and categories list. Moreover, the admin could manage, add, edit, delete and set roles
for customer.
If my website has some basic functions such as users could create account, buy, view,
search a product, staff and admin could manage products, categories and account; it is
success.
8 Literature reviews for this project

8.1 Model-View-Controller Model


In this project, I will use MVC Model to develop and handle my code. MVC Model
is a design method that allows programmers to separate their code into three parts
incudes Model, View and Controller (Myer, 2008). That help them become more
clearly and easier to develop and manage. Function of each part in Model is:
• Model: contain code to directly process data with database.
• View: contain code to display data and graphic user interface (GUI).
• Controller: contain code to create connection between Model and View.

Figure 2: MVC Model


MVC Model will help me manage my project better. If my code is not separated, it is
extremely difficult to check bug or develop, and wastes a lot of time to write page by
page of website. However, those become easier with MVC Model. For example, if
there is a bug in Model part, I just fix it and do not change anything in other parts. For
example, I could apply MVC model into my website by creating folders contain code
of each part Model, View and Controller.

Figure 3: Example folders contain MVC code in my project


Moreover, if I want create a page for user to register an account, this is steps I will do.
Firstly, I must code a file dbconnector.php to connect to database in folder Model:

Figure 4: Connecting database file


Next, I will create file m_account.php in folder to insert data of user’s account into
database. I must call function connectdatabase () and transmit SQL query:

Figure 5: Example Model file to insert an account into database by PHP and MVC model
Then, I will create file c_account.php in Controller folder. This file is connection
between View and Model. It will get data input from View and save data into
database through Model.

Figure 6: Example Controller to register an account


Finally, I will create a file register.php in folder View. In file, I will use both PHP and
HTML to get data from user and GUI for user.

Figure 7: PHP code in View register account

Figure 8: HTML code in View register account

8.2 PHP language


“PHP (Hypertext Pre-processor) is a wide-used, open source scripting language
and was created by Rasmus Lerdorf in 1994. PHP code often is used to embed
into HTML code to create a dynamic website; add, delete, update data in
database; control user access; encrypt data; create, open, read, write, delete,
close files on the server.” (Banzal, 2015)
I choose PHP language to develop this project beacause it has many advantages.
Firstly, PHP is easy to use. Syntax of PHP is quite similar to the C/C++ programming
language. Therefore, I can simply develop a web application with PHP. Secondly,
PHP can run on various platforms such as Window, Linux and Mac OS. Thirdly, it is
20 years since PHP was created so PHP is very stable. If bugs are found in my
project, it can be quickly searched and fixed by searching similar bugs in
Internet.Finally, PHP has a lot of built-in database connection module so you can
reduce time when developing web application.
I can apply PHP into my website by writing PHP code mixed with HTML and CCS
code. The below figure is a example:

Figure 9: Example code PHP

8.3 MySQL Database


In this project, I use MySQL to store my website data such as information of
products, customers and accounts. “MySQL is one of most database software. It was
created by Michael Wildenius and David Axmark back in 1995. The MySQL
Community Server edition is available as free software. Moreover, it is "server-
side" technologies – that is to say they reside on the web server.” (Bramer, 2015)
MySQL Database bring many advantages for my project include:
• Data integrity and high security
• Save storage space and cost
• Decrease application development time
• Effective data management
• Easy recovery data by a backup
• Create relationships between record by primary key and foreign key
• Avoid duplication data
I can apply and use MySQL Database by using PHP language to handle and process
data.

REFERENCES

Banzal, S. (2015). PHP, MYSQL and Apache Server. Firewall media.


Beak, A. (2017). PHP 7 Zend Certification Study Guide: Ace the ZCE 2017-PHP
Exam. Apress.
Bramer, M. (2015). Web Programming with PHP and MySQL: A Practical Guide.
Springer.
Myer, T. (2008). Professional CodeIgniter.
Tarr, A. (2012). PHP and MySQL 24-Hour Trainer. Wrox Press.

You might also like