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 6082527
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:17:58+00:00 2026-05-23T11:17:58+00:00

I’m fairly new to the concepts of OO programming – actually programming in general

  • 0

I’m fairly new to the concepts of OO programming – actually programming in general as I am still a student. I’m currently working as an intern in a department that has me coding a new structure that will probably be the base for all their applications to come. So I believe I have the idea behind OO down where you create “basic building blocks” and then expand, expand and expand, until you arrive at the most complex object (for the time being).

I need to put all these “advanced” objects into one but how many is too many? Can I have 100 objects inside of this bigger object if it requires all these “parts”.

I really hope this question makes sense to everyone. I’m sure the answer is not going to be a definite answer either but I just need a rule of thumb to go by. I’d really hate to have 100 objects inside of 1 big one if there is a better design/programming technique.

Thank you.

EDIT 1: Thank you so much for your responses but I’m still a little unclear. I already marked an answer as I felt I can continue with what I have but…

Let me continue with my Human Example. A human is composed of many parts (or objects) and each part is also made up of parts, all the way down to a single cell.

Human –> Arm –> Hand –> Fingers –> Thumb –> Bones –> Bone Cells

Human: ojbLeft_Arm, objRight_Arm, objLeftLeg, objRightLeg, objBrain, objHeart, objLeft_Eye, objRight_Eye…. get my point? How many objects inside the human object are too many? Obviously this Human object is going to be considered massive since a Human is very complex. Do you break down the Arm and Leg objects into objLimbs which then stores them?

I guess as another question: if you don’t want many objects, HOW do you avoid them?

  • 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-23T11:17:58+00:00Added an answer on May 23, 2026 at 11:17 am

    100 objects inside a single object isn’t strictly inappropriate, but it’s definitely indicative that there might be a better way to do it. Consider grouping similar objects into composite objects where functionality is similar for usage in your final “superobject”. As a rule of thumb, the number of objects you refer to in a class is a (rough) estimate of the complexity of that object; 100 would indicate a complexity that’s too high. Note that you can reduce the effective complexity by grouping objects together into composite objects, thereby increasing your overall object count but reducing your direct reference count within your “superobject”.

    Edit in response to OP’s edit and question: The key to the grouping is really all about your expected usage and your problem domain. Consider your Human example; the appropriate breakdown of the object model is really dependent upon the usage your data model is going to be put to. The key here is recognizing that you’re NOT trying to represent all possible objects or underlying reality; you’re creating a representation that’s appropriate to your expected usage. For example, if you were modeling a Human for a cardiologist, it might be appropriate to have a Human object, under which you would have a Heart object, a Circulatory System object, etc.; under the Heart object you might have Left Ventricle, Right Ventricle, etc.. However, for a dentist, your model would still have a Human at the top, but that Human would likely have a Teeth collection at the next level; the Teeth might include objects for Canines, Incisors, etc.

    The key point here is that the underlying object (Human) is the same; the representation is completely different. Your cardiologist doesn’t care (much) about your teeth, and your dentist doesn’t care similarly about your ventricles of your heart. Usage defines representation. So for your case, you have to determine exactly what your usage is, and that usage can (hopefully) define a clear path to your representation.

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

Sidebar

Related Questions

I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
I have a French site that I want to parse, but am running into
I am currently running into a problem where an element is coming back from
I need a function that will clean a strings' special characters. I do NOT

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.