Releases: christianidas/lesson-squares
Lesson 6
Accomplishments
Connect the app to a document oriented DB
Full Changelog: 5.3...6
Additional Resources
https://spring.io/guides/gs/accessing-data-mongodb/
https://www.baeldung.com/spring-mongodb-dbref-annotation
Lesson 5.3
Accomplishments
Add some finishing touches to get our app closer for production ready.
Full Changelog: 5.2...5.3
Additional Resources
https://portswigger.net/web-security/cors
https://spring.io/guides/gs/rest-service-cors/
https://docs.oracle.com/javase/tutorial/java/package/namingpkgs.html
Lesson 5.2
Accomplishments
Add a simple html page at the root of our app to showcase.
Additional Resources
https://www.w3schools.com/html/default.asp
https://www.w3schools.com/js/default.asp
https://www.w3schools.com/css/default.asp
https://zetcode.com/springboot/static/
Full Changelog: 5.1...5.2
Lesson 5.1
Accomplishments
Create reusable abstract classes for all of our boilerplate CRUD (Create, Retrieve, Update, Delete) operations so we can avoid duplicating code for this common functionality across all of our entities.
- Creating a crud package with a repository, service and controller that has all of the basic CRUD operation logic
- Using generics so we can have common functionality that is agnostic of the class that it is dealing with so we can share code across our packages regardless of the class (Person, Grid)
- Extending each of these classes and interfaces in each of our packages (Person, Grid)
- Removing a lot of duplicate code in the process
Note: I didn't break this down into very small steps, so it may be helpful to get familiar with the concept of abstract classes, and generics in Java to understand what was done.
Full Changelog: 5...5.1
Additional Resources
https://www.w3schools.com/java/java_abstract.asp
https://www.baeldung.com/java-generics
Lesson 5
Accomplishments
Add Spring Data, and simplify our code for manipulating our data. We will have code that is very agnostic to the actual database schemas, and avoid the need to write any complicated queries to do simple things that the app needs.
- Adding Spring Data dependency
- Adding repositories for each of our entities to save and update data
- Setting up Spring Data and Hibernate to handle all of our entity relationships (grids-squares-owners)
Note: Because of 33e72bf we would now be able to avoid the need to setup our tables in our database ahead of time. Spring will do that for us as it sees necessary.
Full Changelog: 4...5
Additional Resources
https://spring.io/guides/gs/accessing-data-mysql
https://www.javaguides.net/2020/04/jpa-hibernate-one-to-many-mapping-example-with-spring-boot.html
Lesson 4
Accomplishments
Wrap the application in a Spring Boot web service, replacing our old Command Line Interface. After this, we should be able to make HTTP requests to control our grids and persons in the same way as our previous CLI.
- Adding Spring Boot Web dependencies
- Converting our controllers and services (most of the work in the controllers) to use Spring Boot in place of our old CLI
- Removing old CLI code
Full Changelog: 3...4
Additional Resources
Lesson 3
Accomplishments
Save data into a database.
- Create a MySQL database to store data
- Connect the java app to the database
- Replace service logic to store into database rather than in memory arrays
Full Changelog: 2...3
Additional Resources
https://docs.docker.com/compose/install
https://www.w3schools.com/MySQL/default.asp
https://www.baeldung.com/java-connect-mysql
Lesson 2
Lesson 1
Accomplishments
Build a squares application with a command line interface to manage the grid.
Full Changelog: https://github.com/christianidas/lesson-squares/commits/1