Welcome to the repository for "Software Architecture with Spring 6"! This book is a practical guide for software engineers, architects, and developers looking to master modern software architecture principles, especially in the context of Java and Spring Framework.
This book explores the journey of building robust, scalable, and maintainable applications using a structured approach. It covers a wide range of architectural styles and design principles, equipping readers with insights and strategies for architecting resilient systems. From monolithic applications to microservices, this guide walks through key concepts and provides actionable examples to enhance your software architecture skills.
The book provides sample code for each major chapter, allowing readers to experiment and implement concepts in real-world scenarios. Please check each chapter's directory for related code snippets and explanations.
-
The examples provided delve into fundamental architectural concepts, such as high and low coupling, cohesion, and the SOLID principles.
- ch1:
- 01-high-coupling-shopping-application
- 02-low-coupling-shopping-application
- 03-low-cohesion-usermanagement-application
- 04-high-cohesion-usermanagement-application
- 05-solid-srp-library-application
- 06-open-closed-library-application
- 07-liskov-substitution-library-application
- 08-interface-segregation-library-application
- 09-dependency-inversion-library-application
- ch1:
-
- ch4:
- docker/
- postgresql/
- init.sql -> SQL DDL and DML
- .env -> PostgreSQL credentials
- docker-compose.yml -> Run an image of PostgreSQL and populate it with data.
- postgresql/
- onlineauction/
- docker/
- Java 21 - Docker and Docker Compose - Maven 3.9.9
- Go the docker ch4/docker folder
- Execute the command:
docker-compose up -d
- Go to the project's folder: onlineauction
- Execute the command:
mvn clean package
- To run the project execute the command:
mvn spring-boot:run
- To connect to the PostgreSQL:
- Url: jdbc:postgresql://localhost:5432/auction_db
- User: auction_app
- Password: auction123
- Database: auction_db
- Access the URL at http://localhost:8080
- Click at login menu
- Enter with the credencial:
- Administrator
- Username: admin
- Password: test123
- User
- Username: user
- Password: test123
- Administrator
-
- ch5:
- docker/
- postgresql/
- init.sql -> SQL DDL and DML
- .env -> PostgreSQL credentials
- docker-compose.yml -> Run an image of PostgreSQL and populate it with data.
- postgresql/
- onlineauction/ -> Server application
- onlineauction-client-mobile -> Mobile application (Client)
- onlineauction-client-web -> Web application (Client)
- docker/
- ch5:
- Java 21 - Docker and Docker Compose - Maven 3.9.9 - Node.js and npm - React - React Native - Expo Go App
- Go the docker ch5/docker folder
- Execute the command:
docker-compose up -d
- Go to the project's folder: onlineauction
- Execute the command:
mvn clean package
- To run the project execute the command:
mvn spring-boot:run
- To connect to the PostgreSQL:
- Url: jdbc:postgresql://localhost:5432/auction_db
- User: auction_app
- Password: auction123
- Database: auction_db
- OpenAPI documentation can be accessed at http://localhost:8080/swagger-ui/index.html.
- Go to the project's folder: onlineauctiononlineauction-client-web
- Execute the command:
npm install
- Execute the command:
npm start
- Access the URL at http://localhost:3000/
- Enter with the credencial:
- Administrator
- Username: admin
- Password: test123
- User
- Username: user
- Password: test123
- Administrator
- Go to the project's folder: onlineauctiononlineauction-client-mobile
- Execute the command:
npm install -g expo-cli
- Execute the command:
npm install
- Execute the command:
expo doctor --fix-dependencies
- Execute the command:
npx expo-doctor
- Execute the command:
npx expo install --check
- Execute the command:
npm install expo@latest
- Execute the command:
npx expo install @expo/metro-runtime
- Execute the command:
npx expo start
- To see the application in the web browser, press w
- To see the application on the Expo Go app, install Expo Go on your mobile device and scan the QR code.
- Enter with the credencial:
- Administrator
- Username: admin
- Password: test123
- User
- Username: user
- Password: test123
- Administrator
PS: Some commands may not be necessary, but following these steps will allow you to run the application and view it through Expo Go. You may update the dependencies with the command
expo install <dependency>
. In this case, nothing is better than asking our friend to chat GTP or something else to provide us with the command. ;) - ch4:
- Software architects looking to deepen their knowledge of Spring-based architecture.
- Developers and engineers involved in designing, implementing, or evolving software systems.
- Technical leads aiming to improve scalability, performance, and security in distributed systems.
The author, Wanderson Xesquevixos, is a seasoned software engineer and architect with over 20 years of experience in Java, Spring, and cloud-native technologies. Wanderson brings practical insights from extensive experience across diverse projects in microservices, cloud computing, and software design.
Your feedback is invaluable! Feel free to contact us about issues, suggest improvements, or share your thoughts. This repository will be updated with any errata and additional resources to accompany the book.
Thank you for embarking on this journey in software architecture! Happy coding and architecting!