Assignment 2 Application Development _FULL SOURCE CODE - MERIT, Assignments of Web Application Development

In this assignment, we implemented the code following the requirement and test case result, absolutely you will get MERIT point for this assignment.

Typology: Assignments

2022/2023

Available from 05/29/2023

phan-minh-tien-fgw-dn
phan-minh-tien-fgw-dn 🇻🇳

4.7

(12)

47 documents

1 / 98

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
ASSIGNMENT 2 FRONT SHEET
Qualification
BTEC Level 5 HND Diploma in Business
Unit number and title
Unit 30: Application Development
Submission date
Date Received 1st
submission
Re-submission Date
Date Received 2nd
submission
Student Name
Phan Minh Tiến
Student ID
GCD201914
Class
GCD1001
Assessor name
Nguyễn Văn Lợi
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
M3
M4
M5
D2
D3
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62

Partial preview of the text

Download Assignment 2 Application Development _FULL SOURCE CODE - MERIT and more Assignments Web Application Development in PDF only on Docsity!

ASSIGNMENT 2 FRONT SHEET

Qualification BTEC Level^5 HND Diploma in Business

Unit number and title Unit 30: Application Development

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 Nguyễn^ Văn Lợi

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

P4 P5 P6 M3 M4 M5 D2 D

 Summative Feedback:  Resubmission Feedback:

Grade: Assessor Signature: Date:

Internal Verifier’s Comments:

Signature & Date:

  • I. Introduction
  • II. Peer Preview and Feedback Analysis (P4-M3)
      1. Form Questionnaire
      1. Feedback Analysis
      1. Evaluate any new insights, ideas or potential improvements to your system (M3)
  • III. Application Development (P5 - M4)
    1. Folder Structure of the Application
      1. Implement code and result
      • 2.1 Implement code:
      • 2.2 Final Result:
      1. Tools, Techniques, and methodologies (M4)......................................................................................................
      1. Deploy Application by IIS (M4)
  • IV. Application Evaluation (P6-M5)
    • requirements (P6) 1. Review the performance of your business application against the Problem Definition Statement and initial
      • 1.1 Test plan..................................................................................................................................................
      • 1.2 Test cases
      1. Analyse the factors that influence the performance of the application (M5)....................................................
      1. Evaluate the strengths and weakness of the application (M5)
  • V. Conclusion
  • REFERENCES
  • Figure 1: Database diagram of project Table of Figures
  • Figure 2: Project’s Folder Structure
  • Figure 3: Models
  • Figure 4: Controller
  • Figure 5: View in Authenticated area
  • Figure 6: View in UnAuthenticated area.....................................................................................................................
  • Figure 7: ApplicationDbContext file
  • Figure 8: The file automatic create after migrate.......................................................................................................
  • Figure 9: appsetting.json
  • Figure 10: Program.cs
  • Figure 11: CreateDb
  • Figure 12: IAutoCreateDb
  • Figure 13: BookVM.cs
  • Figure 14: ConfirmEmailVM
  • Figure 15: ResetPasswordVM
  • Figure 16: ShoppingCartVM.cs....................................................................................................................................
  • Figure 17: _Layout.cshtml...........................................................................................................................................
  • Figure 18: _LoginPartial.cshtml
  • Figure 19: Book.cs
  • Figure 20: Cart.cs
  • Figure 21: Category.cs.................................................................................................................................................
  • Figure 22: Order.cs......................................................................................................................................................
  • Figure 23: OrderDetail.cs
  • Figure 24: User.cs........................................................................................................................................................
  • Figure 25: BookController.cs.......................................................................................................................................
  • Figure 26: CategoryController.cs
  • Figure 27: CartsControllers.cs
  • Figure 28: ManagementController.cs
  • Figure 29: UsersControllers.cs
  • Figure 30: Register form
  • Figure 31: Login form
  • Figure 32: Interface for Customer
  • Figure 33: Book Detail interface
  • Figure 34: Detail Cart
  • Figure 35: Order Summary..........................................................................................................................................
  • Figure 36: Place Order interface
  • Figure 37: My Order List interface
  • Figure 38: View Detail List...........................................................................................................................................
  • Figure 39: Search Book function
  • Figure 40: Profile interface
  • Figure 41: Help Screen
  • Figure 42: The Privacy Interface
  • Figure 43: The interface for Role Store Owner
  • Figure 44: List of Category
  • Figure 45: Create new Category
  • Figure 46: Message after I create new Category
  • Figure 47: List of Book.................................................................................................................................................
  • Figure 48: Create new Book
  • Figure 49: Dashboard..................................................................................................................................................
  • Figure 50: Interface of Admin Page
  • Figure 51: Request Page
  • Figure 52: Approve Message
  • Figure 53: Reject Request Message
  • Figure 54: User Table
  • Figure 55: Reset Password
  • Figure 56: The result after Admin lock out User’s account
  • Figure 57: Project’s on GitHub
  • Figure 58: All branchs of my team
  • Figure 59: GitHub’s commit
  • Figure 60: The Application after I deploy by IIS(Internet Information Services) with local........................................
  • Figure 61: First Analysis load page for Category.........................................................................................................
  • Figure 62: Second Analysis load page for Book

II. Peer Preview and Feedback Analysis (P4-M3)

1. Form Questionnaire

Database diagram of our project

Figure 1: Database diagram of project

Form Questionnaire:

No Function to given

Description Creator Create Date Answer Answer Date Status

1 Register On request via SRS, The form for registration includes Email, Full Name, Password, Re-Password, Home Address. Is lack of the thing important?

Tester 10 /04/2023 From what we've see, the field Phone Number is really important to determine information of Users, so we add this field to form Register.

21/04/2023 Solved

2 Login How will the password reset function be implemented when the user forgets the password and wants to reset the password?

Tester 10/04/2023 We will add a confirmation email function before reset password function to ensure the safety of users and avoid bad objects from entering the account.

21 /04/2023 Solved

3 Create Category

How to manage the categories that the store owner creates?

Tester 10 /04/2023 To deal with this, we made a request to the Admin when the Store Owner created the Category. This will help admin manage the list of Categories that the Store Owner wants to create. Also has the Approve and Reject for that request permission.

21 /04/2023 (^) Solved

4 Create Book

How do you think the category will be used if there 2 or more Store Owner

Tester 10/04/2023 The Store Owner can be use the same category when they create books

21/04/2023 Solved

5 Store Owner Manage

Can Store Owner mange another Store Owner’s shop

Tester 10/04/2023 That’s not possible, once we’ve worked around that by showing store with userId on login, just showing only that userId’s store

21/04/2023 Solved

6 Edit Quantity

How to solve if the customer wants to fine-tune the number of books they wants to buy

Tester 10/04/2023 The problem has been fixed, the customer can fine-tune the product quantity while in the cart page

21/04/2023 (^) Solved

2. Feedback Analysis

In the world of software development, projects are often expected to be completed within a strict timeline. While this can be a challenging feat, it is not uncommon for some aspects of the project to remain incomplete due to time constraints. In this particular our project, there are several difficulties and issues that have arisen during the development process.

One of the most critical issues that have been identified is the matter of user information security. Given the sensitive nature of the information that is being handled, it is crucial that all necessary measures are taken to protect the data from unauthorized access or theft. Another issue is related to the number of users that can access the system simultaneously. This can pose a challenge, especially if there is a sudden influx of users that the system is not equipped to handle.

Another issue that has been identified is related to user authentication, particularly in the context of the store owner role. As store owners have access to sensitive data, it is essential that they are required to go through a higher level of authentication to ensure that only authorized individuals can access this information.

Furthermore, there are concerns about the user interface of the application. As this is a project that leans more towards the backend than the frontend, it is understandable that the interface may not be as visually appealing as desired. However, this issue is being addressed and will be developed and perfected in the future to provide a better user experience.

Last but not least, there is the issue of verifying the products uploaded by store owners. While the admin can control the types of books uploaded, it is challenging to manage each product individually, especially when products are uploaded in large quantities. This can lead to inaccuracies and errors, which can ultimately impact the user's experience and overall satisfaction with the application.

In conclusion, while the project is still under development, it is crucial to identify and address any issues that arise to ensure the final product meets the client's requirements and expectations. By acknowledging the current difficulties and developing a plan to address them, the project can be completed successfully and efficiently.

3. Evaluate any new insights, ideas or potential improvements

to your system (M3)

FPT Book Sell is an online platform that allows users to buy and sell books. Since its inception, it has been providing a convenient and user-friendly interface for users to purchase their favorite books from a wide range of categories. The platform has been successfully serving customers with its easy-to-use interface, fast delivery, and secure payment gateway.

However, with the rapid advancement in technology and increasing competition in the e-commerce industry, it is essential to continually evaluate and improve the FPT Book Sell system to maintain its

competitive edge. Therefore, in this section, we will discuss some new insights, ideas, and potential improvements to the FPT Book Sell system.

Introducing a Mobile App With the increasing use of smartphones, it is essential to have a mobile app for the FPT Book Sell system. A mobile app can provide a more personalized experience for users and make it easier for them to access the platform on-the-go. The app can include features like push notifications, personalized recommendations, and a more streamlined checkout process, making the user experience more convenient and hassle-free.  Incorporating Artificial Intelligence Incorporating Artificial Intelligence (AI) into the FPT Book Sell system can enhance the user experience by providing personalized recommendations based on their purchase history. AI can also be used to improve the search results by understanding the user's intent and providing more accurate results. Additionally, AI can be used to automate the shipping process, reducing the time taken to process orders.  Implementing a Referral Program Implementing a referral program can incentivize existing users to invite their friends and family to use the FPT Book Sell system. This can help to increase the user base and improve the brand's visibility. The referral program can offer discounts, cashback, or other rewards to both the referrer and the referred user.  Expanding the Product Range Expanding the product range to include other categories like stationery, journals, and office supplies can attract more users to the platform. This can help to increase the average order value and provide a one-stop-shop for all their stationery needs.  Introducing a Loyalty Program Introducing a loyalty program can encourage users to make repeat purchases and increase customer retention. The loyalty program can offer rewards based on the user's purchase history, like discounts, free shipping, or exclusive access to new products.

To sum up, the above improvements to the FPT Book Sell system can help to enhance the user experience, increase customer retention, and attract new users to the platform. While all the above improvements are valuable, some of them may require significant resources and time to implement. Therefore, the decision to include or exclude them must be based on the company's priorities, budget, and resources available.

III. Application Development (P5 - M4)

1. Folder Structure of the Application

Folder Structure:

Figure 4: Controller

View:

Because I want to manage the file for render View of Controller, so I also devide two folder View into 2 Folder in folder Authenticated and UnAuthenticated easy to manage.

 View in Authenticated area

Figure 5: View in Authenticated area

 View in UnAuthenticated area

Figure 6: View in UnAuthenticated area

Data:

In Data folder, there is a file to set Table for Database that is ApplicationDbContext.

Figure 7: ApplicationDbContext file

Migrations:

After I set Table for Database, in terminal I use command line “dotnet ef migrations add initDB” to migate data base on the DbSet I created with name initDB.

Figure 9: appsetting.jsonConnectionStrings: This section defines the database connection strings that the application will use to connect to three different SQL Server instances. Each connection string contains the server name, database name, and other parameters such as trust and multiple active result sets.  Logging: This section configures the logging level for the application. Here, the default logging level is set to "Information" and the logging level for Microsoft.AspNetCore is set to "Warning".  AllowedHosts: This setting specifies the allowed host names for the application. In this case, the asterisk symbol * means that any host is allowed to access the application.

Program.cs

Figure 10: Program.cs

Figure 11: CreateDb

This code implements the IAutoCreateDb interface. This class is responsible for automatically creating the database and adding roles and users to the database when the application starts. The CreateDb constructor takes three arguments: an instance of the ApplicationDbContext class, an instance of the UserManager class, and an instance of the RoleManager class. These classes are part of the Microsoft.AspNetCore.Identity namespace, and they are used to manage users and roles in the application. The CreateDB method is called to create the database and add roles and users to the database. The method first checks if there are any pending migrations using the _db.Database.GetPendingMigrations() method. If there are any pending migrations, it applies the migrations using the _db.Database.Migrate() method. The method then checks if the three default roles (Admin, StoreOwner, and Customer) exist in the database. If any of these roles do not exist, it creates them using the _roleManager.CreateAsync(new IdentityRole(roleName)) method. After creating the roles, the method creates an admin user using the _userManager.CreateAsync method. It then adds the admin user to the Admin role using the _userManager.AddToRoleAsync method. This class is used in the main Program.cs file to inject or execute the CreateDb class in the dependency injection container using the builder.Services.AddScoped<IAutoCreateDb, CreateDb>(); method.

IAutoCreateDb.cs

Figure 12: IAutoCreateDb This is an interface called IAutoCreateDb that defines a method called CreateDB(). Any class that implements the IAutoCreateDb interface must provide an implementation for the CreateDB() method. The CreateDB() method presumably creates the database and initializes it with any required data. The implementation of this method would be specific to the class that implements the IAutoCreateDb interface. By defining an interface for database creation, the code can more easily be extended and tested in the future. For example, if the implementation of the CreateDB() method needs to change, it can be done so without affecting the code that calls the method, as long as the new implementation still adheres to the IAutoCreateDb interface.

VM Folder:

BookVM.cs

Figure 13: BookVM.cs