https://github.com/saraobialero/java17-apachetomcat-springboot-java_evolution_project
This project demonstrates the evolution of a simple bookstore management system through four distinct implementations, showcasing the progression of Java development techniques and technologies.
https://github.com/saraobialero/java17-apachetomcat-springboot-java_evolution_project
csv-files jdbc-database servlet spring-boot tomcat-server
Last synced: about 1 month ago
JSON representation
This project demonstrates the evolution of a simple bookstore management system through four distinct implementations, showcasing the progression of Java development techniques and technologies.
- Host: GitHub
- URL: https://github.com/saraobialero/java17-apachetomcat-springboot-java_evolution_project
- Owner: saraobialero
- License: mit
- Created: 2024-08-12T17:09:37.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-04T17:15:01.000Z (over 1 year ago)
- Last Synced: 2025-01-24T05:42:14.598Z (over 1 year ago)
- Topics: csv-files, jdbc-database, servlet, spring-boot, tomcat-server
- Language: Java
- Homepage:
- Size: 1.18 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# π Bookshop Evolution Project
[](https://www.oracle.com/java/technologies/javase/jdk17-archive-downloads.html)
[](LICENSE)
This project demonstrates the evolution of a Bookshop application through different implementations, each with a unique approach to data management and system architecture.
## π Table of Content
1. [V1 - Basic management with HashSet](#v1---basic-management-with-hashset)
2. [V2 - Reading and writing to CSV file](#v2---reading-and-writing-to-csv-file)
3. [V3 - Database integration with JDBC](#v3---database-integration-with-jdbc)
4. [V4 - Servlet implementation and DAO pattern](#v4---servlet-implementation-and-dao-pattern)
5. [V5 - RESTful API with Spring Boot](#v5---restful-api-with-spring-boot)
## Project Evolution
```mermaid
graph LR
V1[V1: HashSet] -->|Add CSV| V2[V2: CSV]
V2 -->|Add Database| V3[V3: JDBC]
V3 -->|Add Web UI| V4[V4: Servlet & DAO]
V4 -->|Add REST API| V5[V5: Spring Boot]
V1 --- F1[In-memory data, Basic CRUD]
V2 --- F2[File persistence]
V3 --- F3[Database operations]
V4 --- F4[Web interface, MVC]
V5 --- F5[API, ORM, Dependency Injection]
```
## π Main Features
### 1. Book Catalog Management
- Add, edit, and remove books from the catalog
- Search books by title, author, or ISBN
- View detailed book information
- Track book availability and quantity
### 2. User Management
- User registration and authentication
- User roles (e.g., Admin, Librarian, Member)
- User profile management
- Password reset functionality
### 3. Book Lending System
- Check out books to users
- Track due dates and overdue books
- Implement reservation system for popular books
- Generate lending reports and statistics
### 4. Advanced Features (varies by version)
- Data persistence (CSV, Database)
- Web interface for easy access
- RESTful API for integration with other systems
- Scalable architecture for growing libraries
## π Technologies Used
Category
Technologies
Backend
Database
Testing
## π Quick Start
```bash
git clone https://github.com/saraobialero/Java17-ApacheTomcat-SpringBoot-Java_Evolution_Project.git
cd bookshop-evolution
git checkout v1-hashset # or any other version you want to try
# Follow the README instructions in the specific branch
```
## πΈ Project Versions
### [V1 - Basic management with HashSet](https://github.com/saraobialero/Java17-ApacheTomcat-SpringBoot-Java_Evolution_Project/tree/v1-hashset)
Basic implementation of the bookshop using HashSet for in-memory data management.
```
src/
βββ main/
β βββ java/org/evpro/bookshopV1/
β β βββ Book
β β βββ BookException
β β βββ Bookshop
βββ test/java/
```
### [V2 - Reading and writing to CSV file](https://github.com/saraobialero/Java17-ApacheTomcat-SpringBoot-Java_Evolution_Project/tree/v2-io)
Evolution that introduces data persistence using CSV files.
```
src/
βββ main/
β βββ java/org/evpro/bookshopV2/
β β βββ Book
β β βββ BookException
β β βββ Bookshop
β β βββ FileException
β βββ resources/
β βββ BookList.csv
βββ test/java/
```
### [V3 - Database integration with JDBC](https://github.com/saraobialero/Java17-ApacheTomcat-SpringBoot-Java_Evolution_Project/tree/v3-jdbc)
Implementation that uses JDBC for connection and data management with MySQL database.
```
src/
βββ main/
β βββ java/org/evpro/bookshopV3/
β β βββ db/
β β β βββ DatabaseManager
β β βββ exception/
β β β βββ BookException
β β β βββ DataBaseException
β β β βββ ErrorResponse
β β βββ model/
β β βββ Book
β β βββ Bookshop
β β βββ PublicBookView
β β
β βββ resources/
β βββ data.sql
β βββ database.properties
β βββ logback.xml
β βββ schema.sql
βββ test/java/
```
### [V4 - Servlet implementation and DAO pattern](https://github.com/saraobialero/Java17-ApacheTomcat-SpringBoot-Java_Evolution_Project/tree/v4-servlet)
Introduction of the MVC pattern with Servlets and implementation of the DAO pattern for data access.
```
src/
βββ main/
β βββ java/org/evpro/bookshopV4/
β β βββ DAO/
β β β βββ implementation/
β β βββ exception/
β β βββ filter/
β β βββ model/
β β β βββ requests/
β β β βββ enums/
β β βββservice/
β β β βββ functionality/
β β βββ servlet/
β β β βββ listener/
β β βββ utilities/
β βββ resources/
β β βββ database.properties
β βββ webapp/
β βββ WEB-INF/
β β βββ web.xml
βββ test/java/
```
### [V5 - RESTful API with Spring Boot](https://github.com/saraobialero/Java17-ApacheTomcat-SpringBoot-Java_Evolution_Project/tree/v5-springboot)
Implementation of RESTful API using the Spring Boot framework.
```
src/
βββ main/
β βββ java/org/evpro/bookshopV5/
β β βββ config/
β β βββ controller/
β β βββ exception/
β β βββ filter/
β β βββ model/
β β β βββ DTO/
β β β βββ request/
β β β βββ response/
β β βββ repository/
β β βββ service/
β β βββ utils/
β βββ resources/
β βββ application.properties
βββ test/
βββ java/org/evpro/bookshopV5/
```
## π Comparison
| Feature | V1: HashSet | V2: CSV | V3: JDBC | V4: Servlet | V5: Spring Boot |
|------------------|-------------|---------|----------|-------------|-----------------|
| Data Persistence | β | β
| β
| β
| β
|
| Web Interface | β | β | β | β
| β
|
| API | β | β | β | β
| β
|
| Scalability | Low | Low | Moderate | Moderate | High |
| Complexity | Low | Low | Moderate | High | Moderate |
## βοΈ Testing
Each version includes a test suite to verify the correct functionality of the implemented features.
## π Learning Outcomes
- Evolution of a simple application into a full-fledged web service
- Different data persistence strategies
- Transition from monolithic to layered architecture
- Implementation of design patterns (DAO, MVC)
- Integration of frameworks and libraries
- Best practices in Java development across different paradigms
## π«Ά Contributing
Contributions are welcome! Please read the contribution guidelines before getting started.
## π License
This project is distributed under the [MIT License](LICENSE).