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

Hanoi University of Science and Technology

School of Information and Communication Technology

Object-oriented Programming

Vietnam History App:


An Automated Tool for Data Exploration

Lecturer : Prof. Trinh Tuan Dat

Group 01 - Class 141182

Chu Minh Ha 20210293


Nguyen Trong Hieu 20210330
Phan Dinh Nhat 20210654
Nguyen Quoc Trung 20214976

Ha Noi, 06/2023
School of Information and Communication Technology
Object-oriented Programming - IT3100E
Semester 2022.2

Abstract
The Vietnam History App is a digital platform dedicated to immersing users in
Vietnam’s historical legacy. It leverages an automated data collection process to draw
information from three prominent websites, namely Người Kể Sử (https://nguoikesu.
com/), the Wikimedia Foundation (utilizing Wikidata and Wikipedia), and DBpedia.
Meticulously crawling data, the app captures a diverse range of historical entities,
including 25 dynasties, over 5725 historical figures, 107 cultural festivals, 452 significant
historical events, and 2653 landmarks and relics. This comprehensive dataset allows users
to delve deep into Vietnam’s rich history and culture.
With a user-friendly interface, the app offers seamless navigation through its exten-
sive historical database, empowering users to effortlessly locate specific figures, events, or
landmarks of interest. By providing detailed insights and information, the app fosters
historical awareness and promotes the preservation of Vietnam’s cultural heritage.
This report presents the architectural design, data collection methodology, and eval-
uation of the Vietnam History App, highlighting its significant role in historical explo-
ration and its impact on deepening understanding of Vietnam’s cultural heritage.
School of Information and Communication Technology
Object-oriented Programming - IT3100E
Semester 2022.2

Contents
1 Introduction 3

2 Project overview 3
2.1 User Case Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2 Project Flow Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5

3 Architectural Design 7
3.1 UML Design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.2 Design Explanation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.3 Technologies and Algorithms . . . . . . . . . . . . . . . . . . . . . . . . . . 23

4 Data Statistics and Analyze Results 24


4.1 Total Data Statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
4.2 Data Statistics by Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

5 User Guide and Program Demo 25


5.1 User Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.2 Visual Demonstration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

6 Conclusion 29

7 Task Allocation and Contribution 30

References 30
School of Information and Communication Technology
Object-oriented Programming - IT3100E
Semester 2022.2

1. Introduction
In the digital age, preserving and showcasing Vietnam’s rich historical legacy presents
unique challenges and opportunities. Accessing and comprehending the vast cultural her-
itage requires innovative solutions that leverage the power of technology. In response to
these challenges, the Vietnam History App was developed. This digital platform designed
to provide users with an immersive exploration of Vietnam’s history, offering a thorough
and engaging experience that delves into the depths of the country’s past.
Motivated by the desire to raise historical awareness and safeguard Vietnam’s cul-
tural heritage, this project has three primary objectives. Firstly, it aims to create a user-
friendly platform that seamlessly navigates users through the extensive historical data
collected. Secondly, it strives to provide detailed insights and information about histori-
cal figures, festivals, landmarks, and events to foster a deeper understanding of Vietnam’s
history and culture. Lastly, it seeks to contribute to the preservation of Vietnam’s cultural
heritage by making historical knowledge more accessible and engaging.
This report serves as a comprehensive documentation of the Vietnam History App
project. It begins with an overview of the project flow and process, describing the key steps
and processes followed in its development. The architectural design section includes UML
diagrams, such as the package dependency diagram and class diagram, which illustrate
the system’s structure and organization. The design explanation delves into the purpose
and functionality of different packages/modules, explains the conceptual classes and their
relationships, and discusses the applied object-oriented programming techniques.
Additionally, the report highlights the technologies and algorithms employed, pro-
viding a list of frameworks used and explanations of notable algorithms or techniques
implemented. The data statistics and analysis results section presents an overview of
the collected data, including the number of historical figures, festivals, landmarks, data
attributes for each entity type, and the number of links between entities. Analysis and
insights derived from the data are also discussed.
To assist users in navigating the app effectively, a brief user guide with important
program demo images is provided. The conclusion summarizes the project outcomes and
includes a reflection on lessons learned and future improvements, addressing limitations
and proposing areas for further development.
Finally, the report includes an explanation of task allocation among team members,
detailing how tasks were divided, and quantified contribution percentages for each team
member. The references section lists the sources and materials used in the project.

2. Project overview
In this section, we provide an overview of the Vietnam History App project, focusing
on its key features, user capabilities, and project flow. Understanding the app’s objectives,
scope, and functionalities is crucial for gaining valuable insights into its development and
value.

3
School of Information and Communication Technology
Object-oriented Programming - IT3100E
Semester 2022.2

To provide a visual representation of the app’s functionalities, we present a user case


diagram that illustrates the various interactions within the application. This diagram
offers a high-level view of the app’s features and facilitates understanding of the user
journey.
Additionally, a project flowchart outlines the step-by-step development process of
the Vietnam History App. This flowchart provides an overview of the tasks and activ-
ities involved, ranging from data collection and processing to user interface design and
functionality implementation.
Exploring the key features and project flow in this section offers a comprehensive
understanding of the Vietnam History App. It serves as a foundation for a more detailed
exploration of its design and functionality in subsequent subsections, providing a deeper
insight into the project’s structure and user experience.

2.1 User Case Diagram

Figure 1: Use Case Diagram

The Vietnam History App offers several key user capabilities, which are depicted in
the use case diagram. Users have the ability to view the app’s information, including a
brief introduction about the app and details about the team members who developed it.

4
School of Information and Communication Technology
Object-oriented Programming - IT3100E
Semester 2022.2

This feature provides users with an understanding of the app’s purpose and the people
behind its creation.
Another important functionality of the app is the ability to browse different types of
historical entities. Users can choose from categories such as dynasties, figures, landmarks,
events, and festivals. Upon selecting a specific category, the app presents a list of entities
that fall under that category. Each entity is displayed with its unique identifier, name,
and brief information, allowing users to explore the available entities within their area of
interest.
Furthermore, users have the option to view detailed information about a specific
entity. By selecting an entity from the list, users can access comprehensive details about its
historical background, significance, and other relevant information. This feature enables
users to gain in-depth knowledge about the chosen entity and its role in Vietnam’s history.
To facilitate easy access to specific entities, the app provides a search functionality
for each entity type. Users can enter keywords or names related to their specific interest
and search within the selected entity type. The app then displays the search results,
allowing users to access detailed information about their desired entities.
The Vietnam History App also offers a feature that presents related entities when
viewing the detailed information of a specific entity. Users can explore the connections
and relationships between different historical entities by clicking on the related entities.
This feature allows users to navigate backward or forward and delve deeper into the
interconnected nature of Vietnam’s historical legacy.

2.2 Project Flow Chart


In addition to the use case diagram, a project flowchart provides a clear visual
representation of the sequential steps followed during the development of the Vietnam
History App. This flowchart outlines the key stages and activities involved, offering an
overview of the project’s progression.
First, to ensure a comprehensive collection of data for the Vietnam History App, we
utilized multiples sources, including Wikimedia Foundation (Wikipedia and Wikidata),
DBPedia, and Người Kể Sử.
The first step in the data collection process was accessing multiple sources, including
Wiki Foundation (Wikipedia and Wikidata), DBpedia, and Người Kể Sử.
We started with Wikipedia, a vast source of information on historical figures, land-
marks, festivals, and events. Each entity on Wikipedia is linked to its corresponding entry
in Wikidata, which provides a more organized and structured representation of the data.
To extract the relevant data from Wikidata, we accessed the Wikidata Raw data and
using the Wikidata Query Builder. By utilizing the country property (P17) and setting
its value to ’Vietnam’ (Q881), we narrowed down the data to focus on entities associated
with Vietnam.
However, not all entities retrieved were directly related to Vietnam. Therefore, we
filtered the data further, focusing on entities with properties that directly relevant to Viet-

5
School of Information and Communication Technology
Object-oriented Programming - IT3100E
Semester 2022.2

nam. After that, we transformed the Wikipedia data into a human-readable format and
categorized the entities into five distinct categories: dynasty, figure, festival, landmark,
and historical events.
Project Flow Chart

Wikipedia

Data Sources Wikidata Raw Vietnam entities Human-readable

DBpedia Raw Wiki VN entities Category Split

Người Kể Sử Raw Wiki format Merge

Final data Adjust merge

GUI

Vietnam History App

Parallel to the Wikipedia data collection, we obtained raw data from DBpedia,
which also provides structured data. While the DBpedia JSON files contained simpler
data, they also contained some inaccuracies. To ensure accuracy and relevance, we filtered
the DBpedia data by focusing on entities with links to Wikipedia and selecting properties
that shared the same data type. This allowed us to synchronize and merge the DBpedia
data with the previously filtered Wikipedia data, ensuring consistency and relevance to
the Vietnam History App. After this step, we transformed the DBPedia data to match
the Wiki format, preparing it for the merging stage.
Additionally, we extracted information from Người Kể Sử, which provided data in
HTML format. By extracting specific tags such as <th> and <td>, we obtained the
raw data as a hashmap, with <th> representing the key and <td> as the corresponding
value. This data was then transformed and synchronized with the Wiki format, aligning
it with the rest of the data sources.
The next step in the project involved merging the filtered data from the three sources.

6
School of Information and Communication Technology
Object-oriented Programming - IT3100E
Semester 2022.2

The merging process combined the relevant data into a unified dataset, eliminating redun-
dancies and ensuring data consistency. After the initial merge, we performed additional
filtering to extract and refine the specific data related to Vietnam. This involved remov-
ing irrelevant entities and retaining only the information that aligned with the project’s
scope and objectives.
The next phase of the project involved merging the filtered data from the three
sources. This merging process combined the relevant data into a unified dataset, elimi-
nating redundancies and ensuring data consistency. After the initial merge, we performed
additional filtering to extract and refine the specific data related to Vietnam, remov-
ing any irrelevant entities and retaining only the information aligned with the project’s
objectives and scope.
With the structured data in place, the Vietnam History App’s graphical user in-
terface (GUI) was designed and implemented to provide a seamless and intuitive user
experience. The interface incorporated features such as a home screen with app informa-
tion, entity browsing options, search functionality, and detailed entity views. The design
process considered usability, aesthetics, and functionality to create an engaging platform
for users. Rigorous testing and quality assurance measures were employed to ensure the
app’s performance, functionality, and reliability, resulting in a stable and user-friendly
app.
Finally, the completed Vietnam History App was deployed and made available to
users, allowing them to explore and engage with Vietnam’s historical legacy at their
convenience. Ongoing monitoring and maintenance efforts ensured the app remained
up-to-date and provided an optimal user experience.

3. Architectural Design
After gaining an overview of the project in the previous sections, the inner workings
of the application are explored. This section delves into the implementation details and
architectural design of the Vietnam History App, providing valuable insights into its
structure and development strategies. It encompasses UML diagrams, explanations of
design choices, highlights of applied object-oriented programming techniques, and a list
of technologies and frameworks used in the project.

3.1 UML Design


The UML (Unified Modeling Language) diagrams provide a visual representation
of the architectural design and class structure of the Vietnam History App. This part
presents two key UML diagrams: the Class Diagram and the Package Diagram.

3.1.1 Class Diagram


1. Crawler Class Diagram

7
School of Information and Communication Technology
Object-oriented Programming - IT3100E
Semester 2022.2

8
Figure 2: Crawler Class Diagram Part 1
School of Information and Communication Technology
Object-oriented Programming - IT3100E
Semester 2022.2

Figure 3: Crawler Class Diagram Part 2

Figure 4: Crawler Class Diagram Part 3

9
School of Information and Communication Technology
Object-oriented Programming - IT3100E
Semester 2022.2

Figure 5: Crawler Class Diagram Part 4

10
School of Information and Communication Technology
Object-oriented Programming - IT3100E
Semester 2022.2

Figure 6: Crawler Class Diagram Part 5

11
School of Information and Communication Technology
Object-oriented Programming - IT3100E
Semester 2022.2

Figure 7: Crawler Class Diagram Part 6

12
School of Information and Communication Technology
Object-oriented Programming - IT3100E
Semester 2022.2

Figure 8: Crawler Class Diagram Part 7

13
School of Information and Communication Technology
Object-oriented Programming - IT3100E
Semester 2022.2

2. GUI Class Diagram

Figure 9: GUI Class Diagram Part 1

14
School of Information and Communication Technology
Object-oriented Programming - IT3100E
Semester 2022.2

Figure 10: GUI Class Diagram Part 2

15
School of Information and Communication Technology
Object-oriented Programming - IT3100E
Semester 2022.2

3.1.2 Package Diagram


1. Crawler Package Diagram

Figure 11: Crawler Package Diagram - Wikimedia and DBpedia

Figure 12: Crawler Package Diagram - NKS

2. GUI Package Diagram

16
School of Information and Communication Technology
Object-oriented Programming - IT3100E
Semester 2022.2

Figure 13: GUI Package Diagram

3.2 Design Explanation


In this section, we delve deeper into the design of the Vietnam History App, explor-
ing the purpose and functionality of packages/modules, conceptual classes and relation-
ships, and the application of object-oriented programming (OOP) techniques.

3.2.1 Purpose and Functionality of Packages/Modules


The Vietnam History App utilizes different packages to encapsulate related func-
tionality, enabling a well-organized and structured design. Each package serves a specific
purpose and contributes to the overall functionality of the application.
1. Crawler Process Packages
Within the crawler package, the main CrawlData class is responsible for the data
retrieval and processing process for Wiki and DBpedia. The datamanage package
handles general data processing and management for the program. The wikidat-
acrawler package focuses on the crawl process for Wikipedia, while the dbpe-
diacrawler package is responsible for the DBpedia crawl process. Additionally,
myinterface package contains all the interfaces and summarizes the important
classes and their functionalities.
For the crawl process of Người Kể Sử, the main NKSCrawl class is also located in
the crawler package. The nks package contains the model and process for figures,
events, and historical sites. The util package handles general data management for
the Người Kể Sử crawl process.
2. GUI Packages
Within the gui package, the main App class is responsible for the graphical user
interface of the application. The model packages house the model classes for each
entity type, while the loader packages facilitate the loading of data from files into

17
School of Information and Communication Technology
Object-oriented Programming - IT3100E
Semester 2022.2

the corresponding entity categories. The controller package manages the screen
controllers using JavaFX FXML.
By organizing the functionality into separate packages, the Vietnam History App
achieves a modular and structured design. Each package has a clear purpose and plays a
vital role in the overall functionality and structure of the application.

3.2.2 Conceptual Classes and Relationships


In the crawl data process and GUI of the application, several conceptual classes
and their relationships are defined to organize the data and facilitate interactions. These
classes represent different components of the system and enable efficient data retrieval,
processing, and presentation.
1. Data Crawler Process
(a) crawler Package: The crawler package contains classes responsible for data
retrieval and processing from various sources.
• CrawlData: The main class responsible for the data retrieval and process-
ing process for Wiki and DBpedia. It coordinates the crawling workflow
and manages the retrieval of data from different sources.
• NKSCrawl: The main class responsible for the crawl process of Người
Kể Sử. It handles the crawling and processing of data specific to Người
Kể Sử.
(b) datamanage Package: The data manage package contains classes for general
data processing and management.
• DataHandling: Contains static methods for general data processing and
management. It provides functionalities such as filtering, sorting, and
transformation of data.
• DataFolder: Initializes shared folders used in scraping data for different
sites. It sets up the necessary directory structure to store crawled data.
• BruteForceData: An abstract class for the brute-force algorithm used
in crawling. It provides a common framework and methods for performing
brute-force crawling.
• Merge: Concatenates data together, handling conflicts and identical fields.
It ensures the integrity of the crawled data by resolving conflicts and merg-
ing redundant information.
• ModifyData: Modifies data by changing or deleting attributes and en-
tities. It allows for data refinement and customization based on specific
requirements.
(c) myinterface Package: The myinterface package defines interfaces represent-
ing different crawling methods and workflows.

18
School of Information and Communication Technology
Object-oriented Programming - IT3100E
Semester 2022.2

• WikiBruteForceCrawler: Interface representing the workflow of the


brute-force method for the Wikipedia crawler. It defines the methods
and steps required for performing brute-force crawling on Wikipedia data.
• WikiSelectiveCrawler: Interface representing the workflow of the selec-
tive method for the Wikipedia crawler. It defines the methods and steps
required for performing selective crawling on Wikipedia data.
• WikiTableCrawler: Interface representing the workflow of the table
method for the Wikipedia crawler. It defines the methods and steps re-
quired for extracting data from tables in Wikipedia pages.
• WikiCrawler: This class implements the WikiBruteForceCrawler, WikiS-
electiveCrawler, and WikiTableCrawler interfaces to crawl data from Wiki.
It handles the data retrieval process by calling the respective methods from
each interface. Furthermore, it includes functionality for assigning associ-
ated entities and exporting the final data.
• NonWikiCrawler: Interface for non-Wikipedia crawlers (e.g., DBpedia,
Người Kể Sử). It defines the common methods and workflows for crawling
data from non-Wikipedia sources.
(d) wikidatacrawler Package: The WikiDataCrawler package contains classes
related to crawling data from Wikipedia.
• WikiFolder: Initializes directories for the analysis of data from Wikipedia.
It creates the necessary directories and sets up the folder structure for stor-
ing crawled data from Wikipedia.
• WikiBruteForceData: Inherits from the BruteForceData class and im-
plements the WikiBruteForceCrawler interface. It performs the brute-force
crawling method for analyzing entities related to Vietnamese history, sav-
ing them, and assigning URLs to associative entities.
• WikiSelectiveData: Inherits the "analyzeEntity" method from the Brute-
ForceData class and implements the WikiSelectiveCrawler interface. It
takes entities from specific URLs and assigns them as related to Viet-
namese history without any checking.
• WikiTableData: Implements the WikiTableCrawler interface. It re-
trieves data from tables provided on Wikipedia on specific pages and as-
signs it to entities. It matches properties in the table with the properties
in the data using entity IDs.
• WikiDataExport: Exports the final data to the data folder. It han-
dles the export process and ensures that the crawled data is saved in the
appropriate format and location.
• WikiData: Calls the above classes to perform the complete Wikipedia
crawl process. It coordinates the crawling workflow, manages data retrieval
and processing, and exports the final data.

19
School of Information and Communication Technology
Object-oriented Programming - IT3100E
Semester 2022.2

• WikiDataHandling: Contains static methods for handling different prop-


erties and entities in the Wikipedia data.
(e) dbpediacrawler Package: The DBPediaDataCrawler package contains classes
related to crawling data from DBpedia.
• DBPediaData: Inherits from the BruteForceData class, implements the
NonWikiCrawler interface, and overrides the "analyzeEntity" method. It
retrieves entities related to Vietnamese history from DBpedia, saves them,
analyzes URLs, and assigns them to associative entities. It also syncs the
data to match the format of the Wiki data.
(f) nks Package: The NKS package contains classes specific to the crawling
process of Người Kể Sử.
• NKSCharacter: Represents a character in Người Kể Sử and handles the
crawling process for character-related data. It retrieves and processes data
specific to characters in Người Kể Sử.
• NKSHistoricalEvent: Represents a historical event in Người Kể Sử and
handles the crawling process for event-related data. It retrieves and pro-
cesses data specific to historical events in Người Kể Sử.
• NKSHistoricalSite: Represents a historical site in Người Kể Sử and
handles the crawling process for site-related data. It retrieves and processes
data specific to historical sites in Người Kể Sử.
(g) util Package: The util package contains utility classes for data input/output
and synchronization.
• DataIO: Provides methods for handling input and output of data. It
supports reading and writing data from various formats and ensures proper
data handling during the crawl process.
• SyncData: Handles syncing and matching the format of Người Kể Sử
data with the Wiki format. It ensures the consistency and compatibility
of data between different sources.
• DataHandling: Contains static methods for general data processing and
management. It provides functionalities such as filtering, sorting, and
transformation of data.
• WikiDataHandling: Contains static methods for handling different prop-
erties and entities in the Wikipedia data.
• Merge: Concatenates data together, handling conflicts and identical fields.
It ensures the integrity of the crawled data by resolving conflicts and merg-
ing redundant information.
2. GUI Process
(a) gui Package: The GUI package contains classes related to the graphical user
interface of the application.

20
School of Information and Communication Technology
Object-oriented Programming - IT3100E
Semester 2022.2

• App: The main class responsible for starting the GUI application and
managing the scenes. It initializes the GUI, handles scene transitions, and
manages the overall application flow.
(b) model Package: Contains model classes representing different types of his-
torical entities.
• HistoricalEntity: The base class representing a historical entity with
common properties and methods.
• Dynasty: Represents a historical dynasty.
• Festival: Represents a historical festival.
• Figure: Represents a historical figure.
• HistoricalEvent: Represents a historical event.
• Landmark: Represents a historical landmark or place.
(c) loader Package: Contains data loader classes for loading historical entity
data from files.
• DataLoader<T>: A base abstract class for loading data from JSON
files. It provides a template method for loading data and returns an Ob-
servableList of objects. It also defines an abstract method to get the class
type of the objects to load.
• DynastyLoader: A class that extends DataLoader and is responsible for
loading dynasty data from JSON files. It specifies the folder path and the
class type of Dynasty objects.
• EventLoader: A class that extends DataLoader and is responsible for
loading historical event data from JSON files. It specifies the folder path
and the class type of HistoricalEvent objects.
• FestivalLoader: A class that extends DataLoader and is responsible for
loading festival data from JSON files. It specifies the folder path and the
class type of Festival objects.
• FigureLoader: A class that extends DataLoader and is responsible for
loading historical figure data from JSON files. It specifies the folder path
and the class type of Figure objects.
• LandmarkLoader: A class that extends DataLoader and is responsible
for loading place data from JSON files. It specifies the folder path and the
class type of Landmark objects.
(d) controller Package: Contains controller classes for different scenes.
• DetailSceneController: This controller handles the detail scene, where
the information of a specific historical entity is displayed. It initializes the
scene, handles the "Go Back" button press, and sets the data to display on

21
School of Information and Communication Technology
Object-oriented Programming - IT3100E
Semester 2022.2

the scene. It also contains helper methods to display different sections of


data.
• ListEntityScene<T>: This controller handles the list entity scene, where
a list of historical entities is displayed. It sets the data to display on the
scene, including the entity list and the entity type. The scene provides
a search functionality that allows users to filter entities based on their
input. The filtered entities are dynamically updated in the TableView.
Additionally, users can double-click on a row to open the detail scene for
the selected entity.
• MainController: This is the base controller that other controllers extend.
It contains a method to handle the "About" menu click event.
• SidebarController: This controller handles the sidebar, which provides
navigation options to different entity types. It has methods to switch to
different scenes based on user selection.

3.2.3 Applied Object-oriented Programming Techniques


The implementation of applied object-oriented programming techniques in both the
GUI and Crawl components enhances the overall structure, modularity, and reusability of
the software system, while promoting code abstraction, encapsulation, and polymorphism.
1. Crawl Implementation:
• Inheritance: The CrawlData class inherits common functionality from the
BruteForceData, Merge, and ModifyData classes, allowing code reuse and
maintaining a consistent structure.
• Polymorphism: The WikiData class implements multiple interfaces (Wiki-
BruteForceCrawler, WikiSelectiveCrawler, and WikiTableCrawler) to exhibit
different behaviors and execute specific crawling methods based on the interface
implementation.
• Encapsulation: Each class in the crawl implementation encapsulates its spe-
cific functionality, data retrieval, and processing algorithms, ensuring modu-
larity and separation of concerns.
• Abstraction: The myinterface package defines interfaces (WikiBruteForce-
Crawler, WikiSelectiveCrawler, WikiTableCrawler) that abstract the workflow
and methods required for crawling data from different sources.
• Composition: The CrawlData class composes instances of WikiData and DB-
PediaData classes to perform crawling operations on Wikipedia and DBpedia
data sources.
2. GUI Implementation:
• Inheritance: The MainController class serves as the base controller class that
other controllers inherit from, inheriting common methods and behaviors.

22
School of Information and Communication Technology
Object-oriented Programming - IT3100E
Semester 2022.2

• Polymorphism: Polymorphism is demonstrated through the usage of dif-


ferent controller classes for different scenes, all implementing the necessary
methods and behaviors for their respective functionalities.
• Encapsulation: Each controller class encapsulates the logic and functional-
ity specific to its corresponding scene, providing an organized and modular
structure.
• Abstraction: The controller classes utilize JavaFX annotations and event
handling to abstract the user interface interactions and provide a consistent
user experience.
• Composition: The GUI implementation involves composing various UI com-
ponents and scenes to create the overall graphical user interface of the appli-
cation.
• Generics: The DataLoader<T>class is a generic class used in the loader
package to load data of different types from JSON files.

3.3 Technologies and Algorithms


The project incorporates various technologies and frameworks to support its devel-
opment and functionality. These include:
1. Maven: Used in the GUI component, Maven is a build automation tool that man-
ages project dependencies and facilitates the building and packaging of the software.
2. SonarQube: Also used in the GUI component, SonarQube is a code quality man-
agement platform that performs static code analysis, detects bugs, and provides
code coverage reports.
3. JavaFX and JavaFX FXML Scene Builder: These technologies are employed
in the GUI component to create the user interface and manage the scene hierarchy.
JavaFX is a framework for building rich client applications, while JavaFX FXML
Scene Builder is a visual layout tool for designing UI components.
4. UML with Astah: UML is used to create visual representations of the software’s
architecture, design patterns, and class relationships. Astah is a UML modeling
tool that aids in creating and editing UML diagrams.
5. JSON libraries: The project employs different JSON libraries for data processing.
Gson is used in the Người Kể Sử crawling process, while Jackson is used in the GUI
for JSON serialization and deserialization. JSON (JavaScript Object Notation) is a
lightweight data interchange format that facilitates data transfer between systems.
6. Git and GitHub: Git is a distributed version control system utilized for track-
ing changes in the source code. GitHub is a web-based platform that hosts Git
repositories, enabling collaboration, version control, and code sharing.
These technologies and frameworks contribute to the project’s efficiency, code quality,
user interface design, data management, version control, and collaboration, enabling a
robust and well-rounded software solution.

23
School of Information and Communication Technology
Object-oriented Programming - IT3100E
Semester 2022.2

4. Data Statistics and Analyze Results


In the data statistics and analysis section, we present an overview of the collected
data for the Vietnam History App, including the number of entities, unique properties, en-
tity linkages. The data further categorized based on the specific data sources: Wikimedia
Foundation, DBpedia, and Người Kể Sử.

4.1 Total Data Statistics


The total data statistics for the Vietnam History App are as follows:

Entity Type Quantity Unique Properties


Figure 5725 337
Dynasty 25 40
Historical Event 452 120
Landmark and Relic 2653 195
Festival 107 35
Total 8962

Table 1: Total Data Statistics

Additionally, there are a total of 88815 entity linkages within the app.

4.2 Data Statistics by Sources


The data statistics for each specific data source are as follows:

Entity Type Quantity Unique Properties


Figure 5574 117
Dynasty 25 23
Historical Event 382 75
Landmark and Relic 2647 126
Festival 107 32
Total 8735

Table 2: Wikimedia Foundation Data Statistics

Entity Type Quantity Unique Properties


Figure 558 94
Dynasty 17 26
Historical Event 130 48
Landmark and Relic 134 45
Festival 3 4
Total 842

Table 3: DBpedia Data Statistics

24
School of Information and Communication Technology
Object-oriented Programming - IT3100E
Semester 2022.2

Entity Type Quantity Unique Properties


Figure 562 190
Dynasty 0 0
Historical Event 67 16
Landmark and Relic 13 47
Festival 0 0
Total 642

Table 4: Người Kể Sử Data Statistics

The analysis of the Vietnam History App’s data provides valuable insights into
Vietnam’s historical legacy. The dataset encompasses figures, dynasties, historical events,
festivals, and landmarks and relics, sourced from the Wikimedia Foundation (Wikipedia
and Wikidata), DBpedia, and Người Kể Sử. These diverse sources contribute to the app’s
rich content and enhance the user experience.
The Wikimedia Foundation is a primary source, offering landmarks and relics,
events, figures, cultural festivals, and dynasties. DBpedia and Người Kể Sử also provide
valuable information, enriching the app’s content. Through the app’s linking capabilities,
users can explore the interconnectedness between figures, events, festivals, landmarks, and
dynasties, gaining a comprehensive understanding of Vietnam’s historical narrative.
The collaborative efforts of the Wikimedia Foundation, DBpedia, and Người Kể Sử
play a crucial role in providing a diverse range of data, establishing the foundation for the
Vietnam History App. By leveraging these data sources, the app offers users an immersive
journey into Vietnam’s historical legacy.

5. User Guide and Program Demo


This section provides a user guide for the Vietnam History App, including instruc-
tions on how to run the application and navigate its key features. The Vietnam His-
tory App is a Java-based project that can be cloned from the following GitHub URL:
https://github.com/phannhat17/VietNamHistory.

5.1 User Guide


To run the application, please follow these steps:
1. Clone the project from the provided GitHub URL:
https://github.com/phannhat17/VietNamHistory.
2. Locate the main class of the project ‘com.vietnam.history.gui.App‘.
3. Run the ‘main‘ method of the ‘App‘ class to launch the Vietnam History App.
Once the application is running, users can explore its various features and function-
alities. Here is a brief overview of the main components:

25
School of Information and Communication Technology
Object-oriented Programming - IT3100E
Semester 2022.2

1. Home Screen: The home screen serves as the starting point for users’ historical
exploration journey.
2. Entity Browsing: The app allows users to browse through different categories of
entities, including dynasties, figures, landmarks, events, and festivals. By selecting
a specific category, users can view a list of entities within that category.
3. Search Functionality: The Vietnam History App provides a search bar at the
top, allowing users to search for specific entities within each category. Simply enter
a search query to retrieve the matching results.
4. Detailed Entity Views: When users select an entity from the list or search results,
the app displays a detailed view of the entity. This view provides comprehensive
information about the entity, including its name, description, related entities, and
other relevant details.
5. Navigation between Related Entities: Within the detailed entity view, users
can navigate to related entities by clicking on the links provided. This allows users
to explore the connections and relationships between different historical elements.
6. About Screen: The About screen offers insights into the app’s creation by provid-
ing an introduction to the Vietnam History App and information about the team
members involved in its development.

5.2 Visual Demonstration


For a visual demonstration of the Vietnam History App and its functionalities, please
refer to the following resources:
1. Video demo: https://youtu.be/fMUTJTSCy20
2. Important Demo Images:

26
School of Information and Communication Technology
Object-oriented Programming - IT3100E
Semester 2022.2

Figure 14: Main and About scene

Figure 15: List landmark

27
School of Information and Communication Technology
Object-oriented Programming - IT3100E
Semester 2022.2

Figure 16: Search by name

Figure 17: Search by aliases

Figure 18: Detail 1

28
School of Information and Communication Technology
Object-oriented Programming - IT3100E
Semester 2022.2

Figure 19: Detail 2

6. Conclusion
In conclusion, the project has successfully developed a comprehensive system for
retrieving and presenting historical data related to Vietnam. By leveraging object-oriented
programming techniques, we have created an application that offers users a user-friendly
interface to explore the country’s rich history.
Throughout the project, we utilized various technologies and frameworks to enhance
the functionality and efficiency of the system. Maven, SonarQube, JavaFX, and JavaFX
FXML Scene Builder were employed to build the graphical user interface (GUI) and en-
sure a smooth user experience. We employed UML diagrams to design and visualize the
project’s architecture. Git and GitHub facilitated effective version control and collabora-
tion among team members.
To handle data retrieval, we employed different JSON libraries such as Gson for the
Người Kể Sử crawling process, and Jackson for the GUI. This enabled us to parse and
process the data efficiently, ensuring accurate and consistent representation of historical
entities.
While the project achieved its primary goals, it is important to acknowledge certain
limitations. One of the limitations stems from the scarcity of official websites dedicated
to Vietnam’s history. This constrained our access to online sources for data crawling. To
address this in future projects, consideration could be given to alternative sources, such
as historical books or academic publications, to augment the available data.
Another challenge we faced was maintaining consistency throughout the project. As
novice developers, we encountered difficulties in ensuring a unified approach, resulting in

29
School of Information and Communication Technology
Object-oriented Programming - IT3100E
Semester 2022.2

the use of multiple libraries for handling different JSON formats. This could be improved
in future projects by adopting a more standardized and streamlined approach.
In conclusion, the project demonstrates the successful implementation of object-
oriented programming techniques and the effective utilization of various technologies and
frameworks. The GUI provides users with a seamless and intuitive platform to explore
Vietnam’s historical information. While limitations existed, such as the scarcity of online
resources and inconsistencies in the project, they serve as valuable lessons for future
endeavors. The project serves as a foundation for future enhancements, including the
exploration of additional data sources and improved collaboration among team members.

7. Task Allocation and Contribution


Our team consisted of four members, each with specific responsibilities and contri-
butions to the project:

Team Member Tasks Assigned Percentage


Handling DBpedia and Wikipedia data retrieval
Nguyen Trong Hieu 25%
Implementing brute force and selective methods
Handling Người Kể Sử data retrieval
Nguyen Quoc Trung 25%
Implementing WikiTable method
GUI development
Phan Dinh Nhat 25%
Creating slides, generating statistics, video demo
GUI development (back button), filtering data
Chu Minh Ha 25%
Merging all works, preparing the report

Table 5: Task Allocation and Contribution Percentage

References
[1] DBpedia, 2023. https://www.dbpedia.org/ (Retrieved on July 10, 2023).
[2] Người Kể Sử, 2023. https://nguoikesu.com/ (Retrieved on July 10, 2023).
[3] Wikidata, 2023. https://www.wikidata.org/ (Retrieved on July 10, 2023).
[4] Wikipedia, 2023. https://www.wikipedia.org/ (Retrieved on July 10, 2023).

30

You might also like