Update Technical future / Andreas

Andreas Svanberg 2025-02-12 11:38:17 +01:00
parent bb6649195d
commit e80e1d0238

@ -2,47 +2,49 @@
* Inject a reference to a `JpaRepository` instead of a `EntityManagerFactory` in `AbstractServiceImpl`
* Remove usage of QueryDSL in services
* Remove interface `QueryDslPredicateExecutor` (it should be an implementation detail within the repository)
1. Never return `@Entity` classes from services
1. Never return `@Entity` classes from repositories.
2. Never return `@Entity` classes from services
3. Never return `@Entity` classes from repositories.
* Stop using "Open EntityManager In View" pattern and use `EntityManagerFactory` rather than a "shared" `EntityManager`
1. No Jakarta Persistence API usage in `core` Maven module.
4. No Jakarta Persistence API usage in `core` Maven module.
* Keep repository interfaces in `core`
* Move repository implementations to their own module and isolate Jakarta Persistence API to their implementations.
1. Stop with the "1 table-1 entity-1 repository-1 service" thing
5. Stop with the "1 table-1 entity-1 repository-1 service" thing
* A service should work with some context, such as final seminar from a supervisors point-of-view, not the SQL table called "final_seminar"
* A repository can manage multiple `@Entity`s (and therefore tables)
1. Remove manual transaction handling inside workers (`AbstractWorker` base class)
1. Make all notifications event-based rather than direct calls from other service methods
1. Make event handling asynchronous (such that a failure or slowdown in an event consumer does not interfere with the event producer)
6. Remove manual transaction handling inside workers (`AbstractWorker` base class)
7. Make all notifications event-based rather than direct calls from other service methods
8. Make event handling asynchronous (such that a failure or slowdown in an event consumer does not interfere with the event producer)
* Replay events if a consumer fails?
1. Introduce automated [Checkstyle](https://checkstyle.org/) analysis with no allowed violations
9. Introduce automated [Checkstyle](https://checkstyle.org/) analysis with no allowed violations
* Start with no rules just to have it set up
* Add rules over time and fix the violations simultaneously
1. Replace Jersey (JAX-RS client) with Spring's RestClient?
10. Replace Jersey (JAX-RS client) with Spring's RestClient?
* To get rid of a rather large dependency
1. Use Spring Boot Maven plugin / main method to start SciPro
11. Use Spring Boot Maven plugin / main method to start SciPro
* Will automatically start Docker dependencies
* Faster reloading on changes
* How to solve secrets for Daisy integration?
1. Use a local database running in Docker
12. Use a local database running in Docker
* Requires good test data in `DataInitializer`
1. Create a mock Docker container for Daisy API
13. Create a mock Docker container for Daisy API
* Removes the need for secrets
* Makes it easier to test integration with known answers
1. Try to minimize / move to edges the Daisy integration to make as much functionality as possible useable without it
14. Try to minimize / move to edges the Daisy integration to make as much functionality as possible useable without it
* `DaisyAPI` service should not reside in the `core` module
1. Make it easier to schedule new jobs
15. Make it easier to schedule new jobs
* Right now you need a bean for the scheduling, a bean for the worker, and finally a bean for the actual job (unless you do it in the worker)
1. Replace Wicket with Spring Web (REST API) + React (TypeScript)
16. Replace Wicket with Spring Web (REST API) + React (TypeScript)
* Must have a transition period where both work together simultaneously with smooth transition
1. Automatic deployment to production after pull request is merged
1. Do not accept `null` as a method parameter
17. Automatic deployment to production after pull request is merged
18. Do not accept `null` as a method parameter
* Add overloads without it
* Specify it as `Optional<T>`
1. Remove stack traces from Maven test output
1. Fix all warnings during Maven build
1. Do not use repositories directly in Wicket components
1. Improve the creation of test data
19. Remove stack traces from Maven test output
20. Fix all warnings during Maven build
21. Do not use repositories directly in Wicket components
22. Improve the creation of test data
* Allow creating a new file that adds test data to minimize merge conflicts
* Should be easy to do repetitive tasks (such as create a user) in each new file
1. Create some "How to work in Gitea" guide
23. Create some "How to work in Gitea" guide
24. "Make the change easy then make the easy change"
* When making changes to the system, if it is not easy to do, make it easy first