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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T15:15:16+00:00 2026-05-14T15:15:16+00:00

I want a custom class object to hold data and have somehow the feeling

  • 0

I want a custom class object to hold data and have somehow the feeling that creating about 80 properties is not the best way of doing it.

Most of the properties would be bool values, so i’m thinking about creating Arrays (keys / values) or (probably better) a NSDictionary attached to the object for holding the data. Does that make sense or should i stay with the properties?

Extra: Are there general pros and cons for the different approaches? And what keywords / concepts do i have to search for to find discussions about that somehow general question?

Thanks in advance

  • 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-14T15:15:17+00:00Added an answer on May 14, 2026 at 3:15 pm

    You should use classes for creating objects (in future program), if you expect some behavior. I mean, object – is not only something that stores variables. It also supposes some sort of activity (called behavior). And properties are not only the way to set some values (as object’s characteristics), but also the way to influence on this behavior (you can add extra code parts, except just saving data – some checks or smth.else).

    And if you need only the construction to store data – it’s not just better, it’s a more logical step to store them as an array or a dictionary.

    Dictionary is better in most cases, cause you can access stored values by key names. And your code will be much more understandable. But array should be (I don’t know exactly, only suppose) faster to access (it’s harder to find string key among other strings than index among sequence of incremented numbers).

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

Sidebar

Related Questions

I created one custom class & created object for that class. I want to
I have an NSMutableArray object that I want to add custom methods to. I
I have a custom class Foo with properties A and B. I want to
I`m trying to display classes that have properties of type some custom class inside
I want to use a custom class that could handle querying easily. Are there
I have a custom class which I want to load inside the firstViewController and
I want to implement a method that will find stuff in my custom class.
In my app i have created one custom class for Label.Now i want to
I want to calculate distance in my custom repository class. The problem is that
I'm writing a custom class that wraps a dict. As such, I want 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.