Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 549621
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:12:12+00:00 2026-05-13T11:12:12+00:00

I’m having difficulty wrapping my head around business objects or more specifically, business object

  • 0

I’m having difficulty wrapping my head around business objects or more specifically, business object collections.

Here’s a quick example of what I’m trying to do.

If I have an Incident Object, this object can have a number of people involved and each of those Person objects can have multiple notes. Notes can’t exist without a Person object and Person objects can’t exist without an Incident Object.

If I have Public List<Note> notes = new List<Note>() then methods such as ADD and REMOVE become available to Person within Incident. I assume that if I was to call those methods on the Notes collection it will simply remove it from the List but not execute any code to actually add/update/delete the employee from the data source. This leads me to believe that I shouldn’t use List but something else?

This also leads me to another question. Where should the actual database CRUD operations reside. Should a Note object have its own CRUD or should the Person object be responsible for it since it can’t exist without it?

I’m a little lost about which way to go and I’d like to get this part right because it will be the template for the rest of the program.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T11:12:12+00:00Added an answer on May 13, 2026 at 11:12 am

    Some great information has been given but one thing that you mentioned that may be confusing you is this:

    “If i have Public List notes = new
    List() then methods such as ADD,
    REMOVE become available to Person
    within Incident.”

    That all depends on how you design your classes. One thing that you should think about is the way this data relates to one another. That will help you picture your class design.

    It sounds like the following:

    • One incident can involve many people
    • One person can create many notes
    • A note is the lowest level and exists due to an incident being created and a responsible person(s) working on that incident.

    Incident 1 – many Persons

    Person 1 – many notes

    You can do this type of relationship in a number of ways. One way may be to actually seperate the objects involved, and then create joined objects.

    For instance

    public class Incident {
    //insert incident fields here
    //do not add person logic / notes logic
    //probably contains only properties
    }
    
    public class Person {
    //insert person fields
    //private members with public properties
    //do not embed any other logic
    }
    
    public class Comment {
     //insert comment private fields
     //add public properties
     //follow the law of demeter
    }
    

    These classes do not give details to one another, they are just repositories to store this information. You then relate these classes to one another for instance

    public class IncidentPersonnel {
    List<Person> p;
    //add methods to add a person to an incident
    //add methods to remove a person from an incident
    ....
    }
    

    Then you may have another class handling the commenting by personnel

    public class PersonnelNotes {
    List<Note> n;
    //other methods...
    }
    

    You can go further with this but it may complicate things but I am just giving you another idea of how to handle this.

    Try to follow the law of demeter for functions

    Encapsulate all of your objects, in addition, your neighbor can talk to you but not much else… This will help keep your classes loosely coupled and makes the thought process a bit simpler for you.

    Finally, you mentiond how the CRUD operations should work. This all goes back to your DAL (Data Access Layer). Rather then return rows of data from a table you could then return a referenced object with all of its attributes. Add’s and remove’s work the same way (passing in or out an object). You can use an ORM or write up your own DAL. It all depends on how involved you want to involve yourself :).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 297k
  • Answers 297k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Open a terminal and run: gem update --system May 13, 2026 at 7:19 pm
  • Editorial Team
    Editorial Team added an answer The following seems to work nicely, but if there's something… May 13, 2026 at 7:19 pm
  • Editorial Team
    Editorial Team added an answer I've seen stuff like this happen on winforms as well.… May 13, 2026 at 7:19 pm

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I want use html5's new tag to play a wav file (currently only supported
I ran into a problem. Wrote the following code snippet: teksti = teksti.Trim() teksti
I've got a string that has curly quotes in it. I'd like to replace
In order to apply a triggered animation to all ToolTip s in my app,

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.