Skip to content

Conversation

@OleksandrChmyrNAV
Copy link
Contributor

  1. Opprettet EventRegistrationService.
  2. Lagt til registrering av meldingsdetaljer for innkommende meldinger.
  3. Liten refaktorisering: fjernet @OptIn(ExperimentalUuidApi::class) merknad fra klasser.

@OleksandrChmyrNAV OleksandrChmyrNAV requested a review from a team as a code owner May 6, 2025 11:17
Copy link
Contributor

@kfh kfh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bare litt småtteri fra meg ellers ser jo dette bra ut 👍

}
}

class EventRegistrationServiceFake : EventRegistrationService {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Litt nitpicky, men navngivningen bør være FakeEventRegistrationService.

Her kan du også implementere dette som en funksjon som beskrevet ovenfor. Du får da:

fakeEventRegistrationService( ... )

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hvordan er FakeEventRegistrationService bedre enn EventRegistrationServiceFake ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MyService, FooService, BarService er jo typisk et pattern vi vil følge.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hvorfor har vi slike viljer?
Det siste gang jeg spurte, så hadde teamet vårt ingen kodestandard.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hva mener du ? Dette er helt STANDARD navngivning.

Copy link
Contributor Author

@OleksandrChmyrNAV OleksandrChmyrNAV May 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hver gang når jeg prøvde å bruke noe standard i eMottak, så fikk jeg avslag og flere klager fordi
vi eksperimenterer og ingenting er skrevet på stein
Jeg prøver å forstå hvorfor det ble plutselig ikke lov til å eksperimentere med navngivelse?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kort fortalt så ser det litt rart ut. Hvis det hadde vært konsistent, dvs ALLE service-implementasjoner hadde blitt post-fixet med implementasjon, ala: MyServiceFoo, MyServiceBar, MyServiceFake hadde det hvertfall vært gjennomført og konsistent.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Og det er akkurat slik akkurat nå.
EventRegistrationServiceImpl og EventRegistrationServiceFake er de eneste service-implementasjoner i hele prosjektet (kanskje i hele eMottak også) resten av services er vanlige klasser uten den interface overengineering som bare forstyrer smidighet.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Det ser fortsatt rart ut og EventRegistrationServiceFake leser ikke noe godt, imho. Det er hvertfall ukonvensjonell måte å navngi på. Jeg skal ikke blokke PR'en pga av dette, men min personlige preferanse er at du hadde implementert interfacet via en funksjon slik jeg foreslo. Da hadde du også sluppet unna med denne redundante bruken av Impl i klassenavnet og brukt elegante features i Kotlin. For meg føles dette veldig Java'ish ut.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Takk for at du er konstruktiv! 🙌

@OleksandrChmyrNAV OleksandrChmyrNAV merged commit 8bcc1a5 into main May 8, 2025
1 check passed
@OleksandrChmyrNAV OleksandrChmyrNAV deleted the #202-registrere-meldingsdetaljer-for-innkommende-meldinger branch May 22, 2025 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants