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

  • SEARCH
  • Home
  • 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 8222747
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T14:23:00+00:00 2026-06-07T14:23:00+00:00

I have data objects with methods for loading, saving, updating data. Then I have

  • 0

I have data objects with methods for loading, saving, updating data. Then I have objects for more complex manipulation of this data, and to this end they require elaborated data from the data object.

So I started adding methods to the data object for answering specific questions which the manipulating objects need to know. The manipulating objects only have methods strictly related to manipulation or to some feature while info on the data object is elaborated by it. The manipulating objects asks and the manipulated object responds. That is how I imagined it at first. Then I realised they could as well be methods of the manipulating objects or extension methods.

I feel the data object is starting to have too many methods related to specific features, and more are to come. Since these features are mainly managed by the manipulating objects, they could be moved and distributed between them. The problem is some of these methods are used by different manipulating objects and manipulating objects are full enough of methods which are specifically related to manipulation. So another option would be to implement them as static extension methods and place them in the namespace where such works are carried out (so they are only visible from the working area but can be called by other objects if need be).

The question is where to put methods that:

  • give info elaborated from data object info (public info), without any kind of manipulation
  • are for the specific use of one or a few other objects for specific features (manipulation mainly, but also queries and presentation)
  • (some use helper business objects, some only depend on the data object and require nothing else)

Should they belong to:

  • the data object
  • the manipulating objects
  • to a static helper class in business namespace ?

I suppose the answer depends a lot on which methods we are talking about, on the design of the application, etc. so I understand specific advice may be difficult to give, but I would appreciate any tips which help me make a decision in this and other cases.

In a nutshell:

What are the criteria or what questions should I ask myself in order to choose where to put methods?

  • 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-06-07T14:23:01+00:00Added an answer on June 7, 2026 at 2:23 pm

    In my personal experience, putting a single responsibility/functionality/feature etc… per object (or class) works extremelyl well.

    That’s why I’d suggest you:
    Create 1 class for each type of data object you need to handle.
    Examples: DataObjectA, DataObjectB
    Create 1 class for each operation you need to do over those data objects (or maybe a class for each pair operation x data object type, depending on how similar they are).
    Examples: DataObjectLoader, DataObjectASaver, DataObjectAUpdater and maybe DataObjectALoader and DataObjectBLoader too.
    Create 1 class for each more complex manipulation of that data:
    Examples: DataObjectAComplexThing

    If the elaborated data has required to do the Complex Thing has “sense” by itelf, and it’s a problem you recognize in the domain, and you can easily name, you should create a class for that too:
    Examples: ObtainDataRequiredForComplexThing

    The DataObject should only answer the basic queries needed to “define” exactly what that object is… All the additional stuff should be on either ObtainDataRequiredForComplexThing or DataObjectAComplexThing kind of calsses.

    My criteria to decide where to put thing is… Thins should only have the methods, fields, etc.. that are strictly neccesary… Anything that you can take away, you should take it away and put it somewhere else (in another class, or whatever [within reason of course]).
    If you can solve a problem using a single class, or by using more than one class, and each of those smaller classes have “sense” by themselves, and you can recognize that problems in the domain, and you can give them a proper name… You should use the multiple smaller classes…
    Composing objects (or classes) it’s a lot more easiser than spliting them. So whenever you have the chance, you almost always split them into smaller constructing blocks….

    Most people say that you should create Objects (or classes) for each Noun in the Domain, and Methods for each Verb in the Domain….
    In my experience it’s a better idea to create Objects for each Noun, and Objects for each Verb to.
    Example: new SomeVerbThatRepresentsDoingSoething(aDataObject).ExecuteThisVerb(); //to implement doing that Verb

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

Sidebar

Related Questions

I guess this is very obvious, but I have a question about loading data.
We have a number of data objects that realize INotifyPropertyChanged to allow for WPF
I have a list of core data objects each has a longitude and latitude
I have two threads, one reading streams and producing data-objects from their content. I
I have created data sources from my objects in my project, some of which
I have a core data context with objects that have a date stored in
i have a tableview application loaded with core data feltching objects and i wanna
I have a core data 'ShoppingList' which contains 'Item' objects. I store a display
In my data model I have a fairly common division between my objects/tables/data: Transactional
I have objects with location data stored in Core Data, I would like to

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.