-
Notifications
You must be signed in to change notification settings - Fork 0
#202 Registrere meldingsdetaljer for innkommende meldinger #135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#202 Registrere meldingsdetaljer for innkommende meldinger #135
Conversation
kfh
left a comment
There was a problem hiding this 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 👍
ebms-provider/src/main/kotlin/no/nav/emottak/ebms/util/EventRegistration.kt
Show resolved
Hide resolved
| } | ||
| } | ||
|
|
||
| class EventRegistrationServiceFake : EventRegistrationService { |
There was a problem hiding this comment.
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( ... )
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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! 🙌
EventRegistrationService.@OptIn(ExperimentalUuidApi::class)merknad fra klasser.