Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 16 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,19 @@ For e2e testing, you can use Cypress. To run the e2e tests, follow these steps:
2. Run the e2e tests:
```bash
pnpm e2e
```
```

# Naming convention
## Packages
We use a context based java package structure. That means a package for each context. This is spelled singular, eg: 'user', not 'users'. Some goes for the
classes in that package. We try to group classes that belong to the same context. For instance: the keycloak admin service is placed in the user package since
it's used there. This can always change if the project grows and it's used in other places as well.\
This can of course apply to sub-packages as well. If the 'pod' package grows too big, we can create sub-packages like 'management', 'deployment', etc.

In the frontend this can be applied as well.

## DTO / data transfer objects
We try to use DTO's as much as possible. This means that we don't expose our entities or internal classes directly. This implies that we create classes
(or records whenever possible). There are two types of DTO's:
* a 'command' - to create or update data - typically these are named like `CreateUserCommand`
* a 'response' - to return data to the client - typically these are named like `UserDto`

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package org.frankframework.application.endpoints;
package org.frankframework.application.test;


import org.frankframework.application.models.TestResponse;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
Expand All @@ -11,7 +10,7 @@
@RequestMapping("/test")
public class TestController {
@GetMapping
public ResponseEntity<TestResponse> test() {
return ResponseEntity.ok(new TestResponse("Hello World!"));
public ResponseEntity<TestDto> test() {
return ResponseEntity.ok(new TestDto("Hello World!"));
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package org.frankframework.application.test;

public record TestDto(String data) {
}