
































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

































Qualification BTEC Level 5 HND Diploma in Computing
Unit number and title Unit 16 : Cloud Computing
Submission date Date Received 1st submission
Re-submission Date Date Received 2nd submission
Student Name Phan Minh Tiến Student ID GCD
Class GCD1001^ Assessor name Trần^ Trọng Minh
Student declaration
I certify that the assignment submission is entirely my own work and I fully understand the consequences of plagiarism. I understand that making a false declaration is a form of malpractice.
Student’s signature Tiến
Grading grid
P5 P6 P7 P8 M3 M4 D2 D
Grade: Assessor Signature: Date:
Internal Verifier’s Comments:
Signature & Date:
I. CONFIGURE A CLOUD COMPUTING PLATFORM
WITH A CLOUD SERVICE PROVIDER’S
FRAMEWORK (P5)
Visual Studio Code is a free editor that assists programmers in writing code, debugging it, and correcting it via the intelli-sense approach. In layman's words, it allows users to create code more easily. Many people claim it's half an IDE and half an editor, but that's up to the developers to decide.
Figure 1: Visual Studio Code I will use Visual Studio Code because: Cross – Platform Support: Traditionally, editors supported either Windows, Linux, or Mac systems. However, Visual Studio Code is cross-platform. As a result, it may be used on all three platforms. Also, the code runs on all three platforms; otherwise, the open-source and proprietary software codes were distinct. Support for multiple programming language: Several programming languages are supported. Previously, programmers needed Web-Support: a separate editor for each language, but it now has built-in multi language support. This also implies that it can readily discover any flaws or cross-language references.
even write code in another programming language (such as Python) without having to recompile the database. And, of course, PostgreSQL is free on Heroku.
Figure 3: PostgreSQL on Heroku
Step 1: Set up repository on GitHub to prepare deploy for my app.
Figure 4: Repository for Project Step 2: I coded project in Visual Studio Code then push all code to that repository when I just created
Figure 5: The command of Git I use to upload code Step 3: Create new application on Heroku The first thing you must do which click on the button new, next click-on create new app.
Then, I get a name for my app is “app-atnshop1”
Name of my App
Step 4 : Set up PostgreSQL on Heroku
After I download and configuration PostgreSQL success, It open PgAdmin 4 to create database in local server.
Figure 8: pgAdmin
Then I create Server Group have name is “HEROKU” and Register new PostgreSql to manage database of My app on Heroku
Figure 9: HEROKU SERVER
Next, I config the local server postgres for connection with heroku postgres.
Figure 11: Use Specific database of Heroku Postgres
Step 6: In local Server, I create three table includes: user, shop, and product to represent requirement of ATN Company.
Figure 12: Table for ATN database
Then, I insert some data into all table I created.
Figure 13: Data of Users Table
Figure 14: Data of shops table
Figure 15: Data of products table
Then, I click-on button view to display ATN shop app in heroku.
The APP will display as images below:
Figure 19: Test View APP
II. IMPLEMENT A CLOUD PLATFORM WITH OPEN-
SOURCE TOOLS (P6)
This project following MVC model so that I can handle source code easier.
Figure 20: MVC model
Model(M): This part is responsible for all functions of the project.
Figure 21: models
View(V): This part is used for display view for the project
Figure 22: views
Controller (C): This part has folder “routes”, which implemented all functions of the project
Figure 25: Authen function
In file “table_display.js”, in responsible of showing product information based on which user logs in, if user is “director” , they could see all products of all shops, if, user is “shop”, they just can see product of that shop. Moreover, I also make a form Table to display product and add, update, delete button. Espcially, I also add some css code to make color and align for table. In this file, I use two for loop to display all data from the database.