Skip to content
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

Is the HMPPSSoftwareSystem interface good for our purposes? #52

Open
sldblog opened this issue Aug 13, 2020 · 2 comments
Open

Is the HMPPSSoftwareSystem interface good for our purposes? #52

sldblog opened this issue Aug 13, 2020 · 2 comments
Labels
question Further information is requested

Comments

@sldblog
Copy link
Contributor

sldblog commented Aug 13, 2020

It's used for defining systems:

class NOMIS private constructor() {
companion object : HMPPSSoftwareSystem {
lateinit var system: SoftwareSystem
lateinit var db: Container
lateinit var prisonApi: Container

And it's used for defining a grouping for related teams:

class InterventionTeams private constructor() {
companion object : HMPPSSoftwareSystem {
lateinit var interventionServicesTeam: Person
lateinit var npsTreatmentManager: Person
lateinit var contractManagerForCRC: Person
lateinit var crcTreatmentManager: Person
lateinit var crcProgrammeManager: Person

I've just realised we might have made HMPPSSoftwareSystem overly specific, as CourtUsers [...]

Note In the example, InterventionTeams

[...] wants to conform to the same interface but isn't a software system. That's not a criticism of this PR, and shouldn't block merge, but we may want to rename the interface or create a more appropriate one – I'm guessing that would have model entities and relationships, but not views?

Originally posted by @spikeheap in #50

@sldblog
Copy link
Contributor Author

sldblog commented Aug 13, 2020

I like the current interface and the flexibility it gives me. People are (in my mind) at the same level and importance of software systems, and it reinforces this.

I can't say if we will ever create views for people. The overhead of adding an empty function is probably lower than keeping in mind which interface to use (we could have one for model items, relationships and views and compose them based on need).

The way it is can also help with contributions: it's explicit where parts have to go without having to build a mental model of what interface/class to use.

Should we rename it but keep the functions as-is? (For now?)

@spikeheap
Copy link
Contributor

Should we rename it but keep the functions as-is? (For now?)

I think that's the most sensible (read quickest, least impact) change. I agree that it's nice to treat people in the same way as systems, and we may end up wanting to generate views that revolve around them (?).

The cost of changing that later, or introducing a new interface, is pretty low too, so let's go with whatever feels right :)

@sldblog sldblog added the question Further information is requested label Aug 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants