Skip to content
Advertisement

Tag: software-design

What is the name of the design pattern where I dynamically pick the correct implementation based on data?

Originally I picked the correct User implementation, based on domain and realm data from the Java EE server. However that was company code, so I had to rewrite the example with numbers. I hope the underlying pattern is still understandable though. For those unfamiliar with CDI, @Inject Instance allows you to iterate through all implementations of an interface. Answer I

Understanding how to model UML Class/Database

I’m confused with designing a client software with database integration to what should be a member variable of the class or just a query to the database. Let me be specific with a trivial example: If I have, lets say, a Student class, which has a list of “friends” that are Student objects. Should my software design have an ArrayList<Student>

Advertisement