Questions tagged [object-design]

22 questions
1
vote
2 answers

Entity Framework: Object design with relationships and more

I have a .net solution (with Entity Framework, using the CodeFirst approach) about the administration of a university. The architecture of the project is like this: DataAccess (DbContext and Generic Repository) Entities (code first…
ascherman
  • 1,762
  • 2
  • 20
  • 41
0
votes
0 answers

How to model related objects without tight database coupling

I'm designing entities where one is related to another, but keeping application/database separate and also performance in mind. I've read on many architectual concepts (SOLID, separation of concerns, etc.). ORM frameworks solve this internally and…
0
votes
0 answers

An interface with one parameterized method or an interface with multiple non-parameterized methods

This is a language-agnostic question, more about object-oriented design and how to organize interfaces. Let’s consider we have an abstraction called Font. We have a bunch of classes that extend/implement this abstraction. The instances of these…
0
votes
1 answer

Suggestion on Pattern to solve concrete class specialization

Suppose that you have several data objects that share some common fields and inherit from a base object. class BaseProduct { String productId; String productType; // i.e. {A, B}. } class ConcreteProductA extends BaseProduct { ... String…
0
votes
1 answer

Force a derived class without implementing pure virtuals again

I have defined an interface class A which defines some basic functions. In my implementation I have a base class A0 which implements this interface and from this base class I have derived several other classes in a hierarchy. #include…
Devolus
  • 21,661
  • 13
  • 66
  • 113
0
votes
2 answers

Trying to avoid too much knowledge about a class in a different class

I need help with the design of an application that I am am writing. In the application employees can book their work within a project (the so called booking object). The booking objects optionally can have budgets. When the budget of a booking…
Yavuz
  • 630
  • 6
  • 20
0
votes
2 answers

vb.net - Object aggregation of inherited classes

I'm playing around with composition of a couple of objects. I have two classes (Note and task). The Task class is derived from the Note class as a task is an extented note. Each note has a property Property Child as list (of note) as a note or task…
Richard
  • 184
  • 7
1
2