Skip to content

Releases: christianidas/lesson-squares

Lesson 6

05 Apr 04:47
5410ac6
Compare
Choose a tag to compare

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

04 Apr 04:02
40d4f88
Compare
Choose a tag to compare

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

04 Apr 03:13
f3b87ea
Compare
Choose a tag to compare

Lesson 5.1

01 Apr 18:07
3b44f89
Compare
Choose a tag to compare

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

01 Apr 03:37
5dd03d6
Compare
Choose a tag to compare

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

31 Mar 01:35
7183413
Compare
Choose a tag to compare

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

https://spring.io/guides/gs/spring-boot

Lesson 3

29 Mar 05:14
5652a45
Compare
Choose a tag to compare

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

29 Mar 04:31
a42335d
Compare
Choose a tag to compare

Accomplishments

Add services and controllers to make squares more robust.

  • Allow multiple grids
  • Tie people objects to the grids' squares so the square will reflect the person data even if it's changed separately
  • Update the CLI with better error handling

Full Changelog: 1...2

Lesson 1

28 Mar 05:26
Compare
Choose a tag to compare

Accomplishments

Build a squares application with a command line interface to manage the grid.

Full Changelog: https://github.com/christianidas/lesson-squares/commits/1