LIST OF ACRONYMS TISS: Technology Information Sharing System Uhomepage: Unauthenticated user homepage Ahomepage: Authenticated user homepage... The objects of research subjects on practi
Trang 1CONTENTS
CHAPTER 1 INTRODUCTION 1
1.1 Problem 1
1.2 Current situation 1
1.3 Proposed solution 1
1.3.1 Purpose 1
1.3.2 Research object 2
1.3.3 Scope 2
CHAPTER 2 TECHNOLOGIES 3
2.1 Overview of ASP.NET Core 3
2.1.1 Introduction to ASP.NET Core 3
2.1.2 Features 3
2.1.3 Introduction to Web APIs in ASP.NET Core 3
2.1.4 Advantages of Asp.NET Core 4
2.1.5 ASP.NET Core in Project 5
2.2 Angular Framework 5
2.2.1 Introduction to Angular 5
2.2.2 Angular concepts 5
2.3 ASP.NET Core Identity 6
2.3.1 Introdution to Identity Server 6
2.3.2 Identity Server in Project 6
CHAPTER 3 REQUIREMENTS 7
3.1 User requirements 7
3.1.1 Main functions 7
3.1.1.1 Unauthenticated User’s functions: 7
3.1.1.2 Authenticated User’s functions 7
3.1.1.3 Manager’s functions 7
3.1.1.4 Admin’s functions 8
Trang 23.2 System requirements 9
3.2.1 Actors 9
3.2.1.1 Table of the main functions of the actor 9
3.2.1.2 Usecase structure 11
3.2.2 Usecase Diagram 14
3.2.3 Usecase Description 15
3.2.3.1 Functional requirements of “Unauthenticated User” 15
3.2.3.1.1 Use case “Register Account” 15
3.2.3.1.2 Usecase “Login” 17
3.2.3.1.3 Use case “Search Post” 19
3.2.3.1.4 Use case “View Detail Post” 20
3.2.3.2 Functional requirement of “Authenticated User” 21
3.2.3.2.1 Use case “Create Post” 21
3.2.3.2.2 Use case “Vote Post” 23
3.2.3.2.3 Use case “Report Post” 24
3.2.3.2.4 Use case “Edit Personal Post” 26
3.2.3.2.5 Use case “Comment Post” 27
3.2.3.2.6 Use case “Reply Comment” 29
3.2.3.2.7 Use case “Edit Personal Information” 31
3.2.3.3 Functional requirements of “Manager” manage post 32
3.2.3.3.1 Use case “View List Post” 32
3.2.3.3.2 Use case “Update Post” 33
3.2.3.3.3 Use case “Delete Post” 35
3.2.3.4 Functional requirements of “Manager” manage report 36
3.2.3.4.1 Use case “View List Reports” 36
3.2.3.4.2 Use case “Delete Report” 37
3.2.3.5 Functional requirements of “Manager” manage statistic 39
3.2.3.5.1 Use case “Statistic new account monthly” 39
3.2.3.5.2 Use case “Statistic comment monthly” 40
Trang 33.2.3.5.3 Use case “Statistic new post monthly” 41
3.2.3.6 Functional requirements of “Manager” manage comment 43
3.2.3.6.1 Use case “View List Comment” 43
3.2.3.6.2 Use case “View Details Comment” 44
3.2.3.6.3 Use case “Delete Comment” 46
3.2.3.7 Functional requirements of “Manager” manage roles 48
3.2.3.7.1 Use case “Manage roles” 48
3.2.3.7.1.1 Use case “Create Role” 48
3.2.3.7.1.2 Use case “Update Role” 49
3.2.3.7.1.3 Use case “Delete Role” 51
3.2.3.7.2 Use case “Set function for role” 52
3.2.3.8 Functional requirements of “Manager” manage categories 54
3.2.3.8.1 Use case “Create Category” 54
3.2.3.8.2 Use case “Update Category” 56
3.2.3.8.3 Use case “Delete Category” 58
3.2.3.9 Functional requirements of “Manager” manage user 59
3.2.3.9.1 Use case “Set role for user” 59
3.2.3.9.1.1 Use case “Add Role” 59
3.2.3.9.1.2 Use case “Delete Role” 61
3.2.3.9.2 Use case “Create User” 63
3.2.3.9.3 Use case “Edit User” 65
3.2.3.9.4 Use case “Delete User” 67
3.2.4 Non-functional requirements 68
3.2.4.1 Usability of website 68
3.2.4.2 Reliability of website 68
3.2.4.3 Availability of website 68
3.2.4.4 Security of website 68
3.2.4.5 Durability of website 69
3.2.4.6 Ability of website 69
Trang 43.2.5 Entity-Relationship Diagram (ERD) 69
CHAPTER 4 SYSTEM DESIGN & IMPLEMENTATION 70
4.1 System architecture 70
4.2 Activity Diagram 72
4.2.1 Search Post 72
4.2.2 Vote Post 73
4.3 Class Diagram 74
4.3.1 Class diagram 74
4.3.2 Class diagram description 74
4.3.2.1 Class “ActivityLog” 74
4.3.2.2 Class “Attachment” 75
4.3.2.3 Class “Category” 75
4.3.2.4 Class “Command” 75
4.3.2.5 Class “Comment” 76
4.3.2.6 Class “Function” 76
4.3.2.7 Class “KnowledgeBase” 76
4.3.2.8 Class “Label” 77
4.3.2.9 Class “Permission” 78
4.3.2.10 Class “Report” 78
4.3.2.11 Class “User” 78
4.3.2.12 Class “Vote” 79
4.4 Database Diagram 79
4.4.1 Physical diagram 79
4.5 Sequence Diagram 81
4.5.1 Register 81
4.5.2 Login 82
4.5.3 Create new post 83
4.6 State Machine Diagram 84
4.6.1 Login 84
Trang 54.7 Component Diagram 85
4.7.1 Backend server api 85
4.8 User interface 87
4.8.1 End-user Website 87
4.8.1.1 SCU001 UHomePage Screen 89
4.8.1.2 SCU002 Login Screen 90
4.8.1.3 SCU006 Post Details Screen 92
4.8.1.4 SCU007 Create New Post Screen 94
4.8.1.5 SCU008 Personal Post Screen 96
4.8.1.6 SCU009 Profile Screen 97
4.8.2 Admin Website 98
4.8.2.1 SCA001 Login Screen 100
4.8.2.2 SCA002 HomePage Screen 102
4.8.2.3 SCA003 Manage Posts categories Screen 103
4.8.2.4 SCA004 Manage Posts Screen 105
4.8.2.5 SCA005 Manage comments Screen 106
4.8.2.6 SCA006 Bad news management Screen 107
4.8.2.7 SCA007 Registration information each month Screen 108
4.8.2.8 SCA008 Information posts per month Screen 109
4.8.2.9 SCA009 Information monthly comment Screen 110
4.8.2.10 SCA010 Manage functions Screen 111
4.8.2.11 SCA011 Authority management Screen 113
4.8.2.12 SCA012 Manage permissions groups Screen 114
4.8.2.13 SCA013 User management Screen 115
4.9 Implementation development environment 116
4.9.1 Software process 116
4.9.2 Tools in Project 117
4.9.3 Technologies in Project 117
CHAPTER 5 SYSTEM TESTING 119
Trang 65.1 Test Plan 119
5.1.1 Test Scenarios 119
5.2 Testcases & test results 120
5.2.1 Unauthenticated user - Login 120
5.2.2 Authorized user - Create post 122
5.2.3 Manager - Update post 127
5.2.4 Admin - Add an user 130
CHAPTER 6 CONCLUSION 134
6.1 Result 134
6.2 Advantage 134
6.3 Disadvantage 134
6.4 Future plan 134
REFERENCES 135
Trang 7LIST OF ACRONYMS
TISS: Technology Information Sharing System
Uhomepage: Unauthenticated user homepage
Ahomepage: Authenticated user homepage
Trang 8LIST TABLES
Table 3.1 - Unauthenticated User’s functions 7
Table 3.2 - Authenticated User’s functions 7
Table 3.3 - Manager’s functions 8
Table 3.4 - Admin’s functions 9
Table 3.5 - The main functions of the actor 11
Table 3.6 - Usecase structure 13
Table 3.7 - Usecase “Register Account” 16
Table 3.8 - Use case “Login” 18
Table 3.9 - Use case “Search Post” 20
Table 3.10 - Use case “View Detail Post” 21
Table 3.11 - Use case “Create Post” 23
Table 3.12 - Use case “Vote Post” 24
Table 3.13 - Use case “Report Post” 26
Table 3.14 - Use case “Edit Personal Post” 27
Table 3.15 - Use case “Comment Post” 29
Table 3.16 - Use case “Reply Comment” 30
Table 3.17 - Use case “Edit Personal Information” 32
Table 3.18 - Use case “View List Post” 33
Table 3.19 - Use case “Update Post” 35
Table 3.20 - Use case “Delete Post” 36
Table 3.21 - Use case “View List Reports” 37
Table 3.22 - Use case “Delete Report” 39
Table 3.23 - Use case “Statistic new account monthly” 40
Table 3.24 - Use case “Statistic comment monthly” 41
Table 3.25 - Use case “Statistic new post monthly” 42
Table 3.26 - Use case “View List Comments” 44
Table 3.27 - Use case “View Details Comment” 45
Table 3.28 - Use case “ Delete Comment” 47
Table 3.29 - Use case “Create Role” 49
Table 3.30 - Usecase “Update Role” 51
Table 3.31 - Use case “Delete Role” 52
Table 3.32 - Use case “Set function for role” 54
Table 3.33 - Use case “Create Category” 56
Table 3.34 - Use case “Update Category” 57
Table 3.35 - Use case “Delete Category” 59
Trang 9Table 3.36 - Use case “Add Role” 61
Table 3.37 - Use case “Delete Role” 63
Table 3.38 - Use case “Create user” 65
Table 3.39 - Use case “Edit user” 66
Table 3.40 - Use case “Delete user” 68
Table 4.1 - Class “ActivityLog” description 75
Table 4.2 - Class “Attechment” description 75
Table 4.3 - Class “Category” description 75
Table 4.4 - Class “Command” description 76
Table 4.5 - Class “Comment” description 76
Table 4.6 - Class “Funtion” description 76
Table 4.7 - Class “KnowledgeBase” description 77
Table 4.8 - Class “Label” description 77
Table 4.9 - Class “Permission” description 78
Table 4.10 - Class “Report” description 78
Table 4.11 - Class “User” description 79
Table 4.12 - Class “Vote” description 79
Table 4.13 - Physical diagram description 80
Table 4.14 - Component of backend server api description 86
Table 4.15 - Interface specification for Unauthenticated user and Authenticated user 88 Table 4.16 - Description of UHomePage Screen 90
Table 4.17 - Description of Login Screen 91
Table 4.18 - Description of Post Details Screen 93
Table 4.19 - Description of Create New Post Screen 96
Table 4.20 - Description of Personal Post Screen 97
Table 4.21 - Description of Profile Screen 97
Table 4.22 - Interface specification for Admin 100
Table 4.23 - Description of Login Screen 101
Table 4.24 - Description of HomePage Screen 103
Table 4.25 - Description of Manage Posts categories Screen 105
Table 4.26 - Description of Manage Posts Screen 106
Table 4.27 - Description of Manage comments Screen 107
Table 4.28 - Description of Bad news management Screen 108
Table 4.29 - Description of Registration information each month Screen 109
Table 4.30 - Description of Information posts per month Screen 110
Table 4.31 - Description of Information monthly comment Screen 111
Table 4.32 - Description of Manage functions Screen 112
Trang 10Table 4.33 - Description of Authority management Screen 113
Table 4.34 - Description of Manage permissions groups Screen 114
Table 4.35 - Description of User management Screen 115
Table 4.36 - Tools using for project 117
Table 4.37 - Technologies using for project 118
Table 5.1 - Test Scenarios 119
Table 5.2 - Test results of Login function 121
Table 5.3 - Test results of Create post function 125
Table 5.4 - Test results of Update post function 129
Table 5.5 - Test results of Add a user function 132
Trang 11LIST IMAGES
Figure 3.1 - Usecase diagram 14
Figure 3.2 - Entity Relationship Diagram (ERD) 69
Figure 4.1 - Overview of architectural design for system 70
Figure 4.2 - Activity diagram “Search Post” 72
Figure 4.3 - Activity diagram “ Vote Post” 73
Figure 4.4 - Class diagram 74
Figure 4.5 - Physical diagram 79
Figure 4.6 - Sequence diagram “Register” 81
Figure 4.7 - Sequence diagram “Login” 82
Figure 4.8 - Sequence diagram “Create new post” 83
Figure 4.9 - State machine diagram “Login” 84
Figure 4.10 - Component diagram “Backend server api” 85
Figure 4.11 - Screen flow for unauthenticated and authenticated user 87
Figure 4.12 - UHomePage Screen 89
Figure 4.13 - Login Screen 90
Figure 4.14 - Post details Screen 92
Figure 4.15 - Create new post Screen 94
Figure 4.16 - Personal post Screen 96
Figure 4.17 - Profile Screen 97
Figure 4.18 - Screen flow for Admin 98
Figure 4.19 - Login Sreen 100
Figure 4.20 - HomePage Screen 102
Figure 4.21 - Manage posts categories Screen 103
Figure 4.22 - Manage posts Screen 105
Figure 4.23 - Manage comments Screen 106
Figure 4.24 - Bad news management Screen 107
Figure 4.25 - Registration information each month Screen 108
Figure 4.26 - Information posts per month Screen 109
Figure 4.27 - Information monthly comment Screen 110
Figure 4.28 - Manage functions Screen 111
Figure 4.29 - Authority management Screen 113
Figure 4.30 - Manage permissions groups Screen 114
Figure 4.31 - User management Screen 115
Figure 4.32 - Agile-Model 117
Figure 5.1 - Expected & Actual result of TC_LI_01 121
Trang 12Figure 5.2 - Expected & Actual result of TC_LI_02 121
Figure 5.3 - Expected & Actual result of TC_LI_03 122
Figure 5.4 - Expected & Actual result of TC_CK_01 126
Figure 5.5 - Expected & Actual result of TC_CK_02 126
Figure 5.6 - Expected & Actual result of TC_UK_01 130
Figure 5.7 - Expected & Actual result of TC_UK_02 130
Figure 5.8 - Expected & Actual result of TC_AU_01 133
Figure 5.9 - Expected & Actual result of TC_AU_02 133
Trang 13CHAPTER 1 INTRODUCTION 1.1 Problem
Information technology is one of the sciences that is growing strongly and is widely applied in all fields and industries Along with the development of technology, the need
to find out information as well as look up and answer the problems and questions that people encounter in the study, work, or any field Therefore, the application of information technology to the creation of a Web site in general and a forum, in particular, to help people share problems is considered a trend With the above trend, the main purpose is to help people improve their knowledge
The application of information technology aims to create a common forum, meeting the actual needs of everyone, which is to learn about technology And it has been and is being seen as the popular web application that every developer is aiming for and more interested in
1.2 Current situation
Currently, the application of information technology is a trend that brings many benefits to all countries in the world, and the most typical example is Vietnam The field of information technology is considered to be very large, so the demand for exploitation and use of people is also increasing, and above all it is the need to search and lookup information to serve the work, learning in life On the other hand, creating
a common forum by applying technologies into practice is considered an inevitable thing that has been and is being given top priority Therefore, in order to solve the above problem, the implementation team has focused on understanding and implementing the topic of building a system of “TECHNOLOGY INFORMATION SHARING SYSTEM” to help meet the most urgent and practical needs of humans
1.3 Proposed solution
1.3.1 Purpose
The technology information sharing system was built to help users post articles, questions, and problems encountered on the system, which the system will receive, browse and display for everyone to see This is considered a place where many people participate, share experiences or solutions for everyone's preference Additionally, posts will include problem descriptions and solutions
Trang 14for people to share their problems and solutions Over time, a technology information system will be created for everyone, or simply post questions and answers From there, students can learn from their experiences and find solutions to their problems Not only that, in addition to commenting to answer questions, the forum also allows users to vote for good, useful, and bad comments and articles for posts that are considered spam or have problems abuse Thereby helping users feel loved and contribute more actively to the forum
1.3.2 Research object
The project was conducted around two focus objects, including the technologies and the practical knowledge about the management and operation of the technology information sharing system
In which the object of technologies includes compulsory research objects: monolithic architecture, open-source ASP.NET Core, RESTful APIs, Angular framework, MS SQL Server database Technologies used to deploy and operate the system include Identity Server
The objects of research subjects on practical knowledge about the management and operation of technology information sharing systems, including comment, vote, report, user and admin management, statistics, and analysis of website activities
1.3.3 Scope
The scope of the research is set at a general level, understands the general knowledge of the research content and applies each knowledge content to the actual product, without putting heavy theories and non-application
Trang 15CHAPTER 2 TECHNOLOGIES 2.1 Overview of ASP.NET Core
2.1.1 Introduction to ASP.NET Core
ASP.NET is a popular web-development framework for building web apps on the NET platform.[1]
ASP.NET Core is the open-source version of ASP.NET, that runs on macOS, Linux, and Windows ASP.NET Core was first released in 2016 and is a re-design of earlier Windows-only versions of ASP.NET.[1]
2.1.2 Features
− No-compile developer experience (i.e compilation is continuous, so that the developer does not have to invoke the compilation command).[2]
− Modular framework distributed as NuGet packages.[2]
− Cloud-optimized runtime (optimized for the internet).[2]
− Host-agnostic via Open Web Interface for NET (OWIN) support[15][16] – runs in IIS or standalone.[2]
− A unified story for building web UI and web APIs (i.e both the same) [2]
− A cloud-ready environment-based configuration system.[2]
− A light-weight and modular HTTP request pipeline [2]
− Build and run cross-platform ASP.NET Core apps on Windows, Mac, and Linux .[2]
− Open-source and community-focused.[2]
− Side-by-side app versioning when targeting NET Core.[2]
− In-built support for dependency injection.[2]
2.1.3 Introduction to Web APIs in ASP.NET Core
ASP.NET Web API is a framework for building HTTP services that can be accessed from any client including browsers and mobile devices It is an ideal platform for building RESTful applications on the NET Framework.[3]
The ASP.NET Web API is an extensible framework for building HTTP based services that can be accessed in different applications on different platforms such as web, windows, mobile etc It works more or less the same way as
Trang 16ASP.NET MVC web application except that it sends data as a response instead
of html view It is like a webservice or WCF service but the exception is that it only supports HTTP protocol.[3]
ASP.NET Web API Characteristics
+ ASP.NET Web API is an ideal platform for building RESTful services.[3] + ASP.NET Web API is built on top of ASP.NET and supports ASP.NET request/response pipeline.[3]
+ ASP.NET Web API maps HTTP verbs to method names.[3]
+ ASP.NET Web API supports different formats of response data Built-in support for JSON, XML, BSON format.[3]
+ ASP.NET Web API can be hosted in IIS, Self-hosted or other web server that supports NET 4.0+.[3]
+ ASP.NET Web API framework includes new HttpClient to communicate with Web API server HttpClient can be used in ASP.MVC server side, Windows Form application, Console application or other apps.[3]
2.1.4 Advantages of Asp.NET Core
− Fast - It is a lightweight, high-performance web framework.[4]
− Integration of Modern UI Framework - ASP.NET Core support modern, a Client-side framework like AngularJs, ReactJs and React with Redux etc.[4] ASP.NET framework supports client-side framework templates like AngularJs, ReactJs and React with Redux etc.[4]
− Hosting - It has the ability to host on IIS, Apache, Docker or Self Hosting [4]
− Cross Platform - ASP.NET Core web application can run on Windows, Mac, Linux development tools.[4]
− Support Built-In Dependency Injection - It supports built-in Dependency Injection.[4]
− Supports Modular - It support modular HTTP request.[4]
− Open-Source - It is an open-source and community-focused web framework [4]
− Side-by-side app versioning - ASP.NET Core runs on NET Core which supports the simultaneous running of multiple versions of applications.[4]
Trang 17− A unified story for building web UI and web APIs.[4]
2.1.5 ASP.NET Core in Project
− Use to build web portal và backend server
2.2 Angular Framework
2.2.1 Introduction to Angular
Angular is a platform and framework for building single-page client applications using HTML and TypeScript Angular is written in TypeScript It implements core and optional functionality as a set of TypeScript libraries that you import into your applications.[5]
2.2.2 Angular concepts
− Module: Angular NgModules differ from and complement JavaScript (ES2015) modules An NgModule declares a compilation context for a set of components that is dedicated to an application domain, a workflow, or a closely related set of capabilities An NgModule can associate its components with related code, such as services, to form functional units.[5]
− Components: Every Angular application has at least one component, the root component that connects a component hierarchy with the page document object model (DOM) Each component defines a class that contains application data and logic, and is associated with an HTML template that defines a view to be displayed in a target environment.[5]
− Templates, directives, and data binding: A template combines HTML with Angular markup that can modify HTML elements before they are displayed Template directives provide program logic, and binding markup connects your application data and the DOM.[5]
− Services and dependency injection: For data or logic that isn't associated with a specific view, and that you want to share across components, you create a service class A service class definition is immediately preceded by the @Injectable() decorator The decorator provides the metadata that allows other providers to be injected as dependencies into your class.[5]
Trang 18− Routing: The Angular Router NgModule provides a service that lets you define a navigation path among the different application states and view hierarchies in your application.[5]
2.3 ASP.NET Core Identity
2.3.1 Introdution to Identity Server
IdentityServer is an authentication server that implements OpenID Connect (OIDC) and OAuth 2.0 standards for ASP.NET Core It's designed to provide a common way to authenticate requests to all of your applications, whether they're web, native, mobile, or API endpoints.[6]
[7] Designed for flexibility andcustomization
Can be used stand-alone or can interop with other providers
− Becomes your applications' identity platform [8]
2.3.2 Identity Server in Project
− Identity Server applied to authentication and authorization
Trang 19CHAPTER 3 REQUIREMENTS 3.1 User requirements
With the results of collecting and examining the current systems, we will build an to-use website that is decentralized to admin and users
easy-3.1.1 Main functions
3.1.1.1 Unauthenticated User’s functions:
1 Login Log in to the system to use more functions
2 View posts by category See a list of posts by category
3 View post details See the detailed content of the post
4 Search posts by keyword Search for a list of posts that match the
entered keyword
Table 3.1 - Unauthenticated User’s functions
3.1.1.2 Authenticated User’s functions
1 Create Post Post post by category
2 Vote Post Can press to vote for good posts
3 Report Post Can report posts with inappropriate content
4 Edit Personal Post Can edit personal posted content
5 Comment Post Can comment and reply to any post in the
system
6 Edit Personal Information Can edit personal information
Table 3.2 - Authenticated User’s functions
3.1.1.3 Manager’s functions
Trang 201 Manage Post
The manager can manage all posts in the system including viewing, adding, editing, deleting posts
2 Manage Report
The manager can manage all reports of posts
in the system including viewing and deleting reports
3 Manage Statistical Table
The manager can view all the statistical information of the website such as the number
of registered users by month, the number of articles created by month, the number of comments
4 Manage Comment
The manager can manage all comments of the posts in the system including viewing, replying, deleting comments of all users in the system
Table 3.3 - Manager’s functions
2 Set Funtions For Role The administrator set function details for
roles
3 Manage Categories The administrator manage post categories
including create, update, delete categories
4 Manage User The administrator can manage and assign roles
to all users in the system, including create,
Trang 21update, delete users from the system
Table 3.4 - Admin’s functions
− Authenticated User: can create the post and view, vote, report, comment
on the post Can manage personal information and manage personal post
− Manager: Under admin's control, use the system with the main role such
as managing posts, managing comments, managing reports
− Admin: Monitor maintenance and have ultimate authority in the system Allow and authorize management and users to use the system with roles
3.2.1.1 Table of the main functions of the actor
No Main function Unauthenticated
Trang 2329 Delete user x
Table 3.5 - The main functions of the actor
3.2.1.2 Usecase structure
Functions of “Unauthenticated User”
Use case “Register Account”
Use case “Login” Use case “Login with
Functions of “Authenticated User”
Use case “Create post”
Use case “Vote post”
Use case “Report post”
Use case “Edit personal post”
Use case “Comment post” Use case “Reply comment”
Use case “Edit personal infomation”
Functions of “Manager” manage post
Trang 24Use case “Manage post”
Use case “View list post” Use case “Update post” Use case “Delete post”
Functions of “Manager” manage report
Use case “Manage Report” Use case “View list report”
Use case “Delete report”
Functions of “Manager” manage statistic
Use case “Manage Statistical table”
Use case “Statistic new account monthly”
Use case “Statistic comment monthly”
Use case “Statistic new post monthly”
Functions of “Manager” manage comment
Use case “Manage comment”
Use case “Delete comment”
Functions of “Admin” manage roles
Use case “Manage roles” Use case “Create role”
Use case “Update role” Use case “Delete role” Use case “Set functions for
role”
Functions of “Admin” manage categories
Use case “Manage categories” Use case “Create category”
Trang 25Use case “Update category”
Use case “Delete category”
Functions of “Admin” manage user
Use case “Manage users” Use case “Set role for user”
Use case “Create user” Use case “Edit user”
Use case “Delete user” Use case “View list user”
Table 3.6 - Usecase structure
Trang 263.2.2 Usecase Diagram
Figure 3.1 - Usecase diagram
Trang 273.2.3 Usecase Description
3.2.3.1 Functional requirements of “Unauthenticated User”
3.2.3.1.1 Use case “Register Account”
USE CASE – TISS_UC_01
Use Case No TISS_UC_01 Use case version 1.0
Use case name Register Account
• Succeeded: The user successfully registered an account as a member
• Failed: Error “ Registration failed”
Main Success Scenario:
1 Unauthenticated user clicks
“Đăng nhập” on the right side of The website redirects to login page
Trang 28the navigation bar
2 Unauthenticated user clicks
“Register new account” The website redirects to register page
3
Unauthenticated user types
his/her name, password, email
and phone number on the
The website redirects to home page
On the right side of the navigation bar there will be the username of user
Alternative Scenario:
1 Unauthenticated user types
Unauthenticated user leaves
username or password or both
fields empty
Errors appear under the username or password input “Không được để trống trường này!”
2
Username is not from 6 to 15
characters length, has special
character or blank space
Errors appear under the username or password input “Tên đăng nhập không hợp lệ!”
3 Password is not from 6 to 15
• Password: must be 6 – 15 characters length and cannot be left empty
Table 3.7 - Usecase “Register Account”
Trang 293.2.3.1.2 Usecase “Login”
USE CASE – TISS_UC_02
Use Case No TISS_UC_02 Use case version 1.0
Use case name Login
• Succeeded: Website redirects to home page
• Failed: Error “ Invalid User”
Main Success Scenario:
1
Unauthenticated user clicks
“Đăng nhập” on the right side of
the navigation bar
The website redirects to login page
2 Unauthenticated user types [Exception 1]
Trang 30his/her username and password
on the login form
The website redirects to home page
On the right side of the navigation bar there will be the username of user
Alternative Scenario:
1 Unauthenticated user types
“Enter”
The register form will be submitted and the website redirects to home page
Exceptions:
1 Unauthenticated user leaves
username or password or both
fields empty
Errors appear under the username or password input “Không được để trống trường này!”
2
Username is not from 6 to 15
characters length, has special
character or blank space
Errors appear under the username or password input “Tên đăng nhập không hợp lệ!”
3 Password is not from 6 to 15
• Password: must be 6 – 15 characters length and cannot be left empty
Table 3.8 - Use case “Login”
Trang 313.2.3.1.3 Use case “Search Post”
USE CASE – TISS_UC_03
Use Case No TISS_UC_03 Use case version 1.0
Use case name Search Post
• Succeeded: Search results matching the keyword are displayed
• Failed: Error “Không tìm thấy bài đăng phù hợp”
Main Success Scenario:
1
Unauthenticated user click on
text input on the center of
website
Trang 322 Unauthenticated user types
his/her keyword what they want
1 Unauthenticated user types
“Enter”
The website displays search results for the keywords entered
Exceptions:
1 Unauthenticated user clicks “Tìm
• Keywords must match one of the titles of the posts in the system
Table 3.9 - Use case “Search Post”
3.2.3.1.4 Use case “View Detail Post”
USE CASE – TISS_UC_04
Use Case No TISS_UC_04 Use case version 1.0
Use case name View Detail Post
Actor:
Trang 33Main Success Scenario:
1 Unauthenticated user click on
the title of the post
The website displays content detail of the post for the title of the post
Alternative Scenario:
Exceptions:
Relationships:
Business Rules: N/A
Table 3.10 - Use case “View Detail Post”
3.2.3.2 Functional requirement of “Authenticated User”
3.2.3.2.1 Use case “Create Post”
USE CASE – TISS_UC_05
Trang 34Use Case No TISS_UC_05 Use case version 1.0
Use case name Create Post
• Failed: Error “Không thể đăng bài”
Main Success Scenario:
1
Authenticated user clicks “Đăng
bài mới” below the navigation
bar
The website redirects to create page
2
Authenticated user types
information on fields on the
create form
[Exception 1]
4
Authenticated user types captcha
on a text box below fields
Trang 35[Exception 2]
Alternative Scenario:
1 Authenticated user click on
image captcha Captcha has been changed
Exceptions:
1 Authenticated user leaves any
fields or all fields
Errors appear under the username or password input “Không được để trống trường này!”
2 Authenticated user has typed a
• All fields must be required
Table 3.11 - Use case “Create Post”
3.2.3.2.2 Use case “Vote Post”
USE CASE – TISS_UC_06
Use Case No TISS_UC_06 Use case version 1.0
Use case name Vote Post
Actor:
• Authenticated User
Trang 36• Succeeded: the number of votes of the post increased by 1
Main Success Scenario:
1 Authenticated user clicks “Vote” The number of votes of the post
increased by 1
Alternative Scenario:
Exceptions:
Relationships:
Business Rules: N/A
Table 3.12 - Use case “Vote Post”
3.2.3.2.3 Use case “Report Post”
USE CASE – TISS_UC_07
Use Case No TISS_UC_07 Use case version 1.0
Use case name Report Post
Trang 37Date 15/06/2021 Priority Medium
• Succeeded: Report information has sent to the manager
Main Success Scenario:
1 Authenticated user clicks “Báo
cáo”
Popup “ Báo cáo bài viết ” has displayed on screen
2 Authenticated user types the
report content on a text box
3
Authenticated user types captcha
on a text box below report text
1 Authenticated user click on
image captcha Captcha has been changed
2 Authenticated user types
“Enter”
Dialog “Báo cáo thành công” has displayed on screen
Exceptions:
Trang 38No Actor Action System Response
1 Authenticated user has typed a
wrong captcha
Errors appear “Mã xác nhận không chính xác”
Relationships:
Business Rules: N/A
Table 3.13 - Use case “Report Post”
3.2.3.2.4 Use case “Edit Personal Post”
USE CASE – TISS_UC_08
Use Case No TISS_UC_08 Use case version 1.0
Use case name Edit Personal Post
Trang 39• Failed : Content of post haven’t been changed
Main Success Scenario:
1 Authenticated user clicks “Bài
đăng của tôi”
The website redirects to “Bài đăng của tôi” page
2 Authenticated user clicks “Chỉnh
sửa”
The website redirects to “chỉnh sửa bài đăng” page
3
Authenticated user types his/her
information what they want to
change on fields of edit post form
Alternative Scenario:
Exceptions:
1 One of the fields have been
• All fields are required
Table 3.14 - Use case “Edit Personal Post”
3.2.3.2.5 Use case “Comment Post”
USE CASE – TISS_UC_09
Trang 40Use Case No TISS_UC_09 Use case version 1.0
Use case name Comment Post
• Succeeded: a comment was displayed below the post
Main Success Scenario:
1
Authenticated user types
comment what they want to text
area
2
Authenticated user types captcha
on a text box below comment
1 Authenticated user click on
image captcha Captcha has been changed
2 Authenticated user types Comment is display below the post