Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. What's the difference between Property and Attribute

What's the difference between Property and Attribute

Scheduled Pinned Locked Moved The Lounge
csharphtmlcomperformancetutorial
50 Posts 26 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M musefan

    Nah, Banana would by the type and Colour would be a property/attribute of the Banana type

    B Offline
    B Offline
    BStorrar
    wrote on last edited by
    #33

    Surely the type would be Fruit, as part of an assembly of Healthy in a project called Food?

    M S 2 Replies Last reply
    0
    • B BStorrar

      Surely the type would be Fruit, as part of an assembly of Healthy in a project called Food?

      M Offline
      M Offline
      musefan
      wrote on last edited by
      #34

      Sounds like a fun weekend project, just need to spend 8 hours coming up with a solution name now :sigh:

      1 Reply Last reply
      0
      • J Jorgen Andersson

        No, I don't mean in .Net, I mean semantically. Say for example I want to describe a car. It has a colour, top speed, engine size, length, leather seats and so on. When is it an attribute and when is it a property? Or is there an even better word?

        Wrong is evil and must be defeated. - Jeff Ello

        F Offline
        F Offline
        Formerly 11521271 Member
        wrote on last edited by
        #35

        Did you consider trying the obvious? Google: define property Result: noun 1. a thing or things belonging to someone; possessions collectively. 2. an attribute, quality, or characteristic of something.

        1 Reply Last reply
        0
        • J Jorgen Andersson

          No, I don't mean in .Net, I mean semantically. Say for example I want to describe a car. It has a colour, top speed, engine size, length, leather seats and so on. When is it an attribute and when is it a property? Or is there an even better word?

          Wrong is evil and must be defeated. - Jeff Ello

          K Offline
          K Offline
          kalberts
          wrote on last edited by
          #36

          A property is a proper, inherent quality of an object. Like the lyrics and music of a song - if you change those, it is a different song. An attribute is a quality attributed to an object, like the name of song or what you call it. The song called by a different name would sound just as sweet. The property is the piece of land, no matter who is attributed as the owner of that land. There is certainy a diffuse grey zone: If you have a look at the property, you may see its size by yourself. You may report that it is a thousand by two thosand feet. I might report that it is three hundred by six hundred meters. The proper size of the land doesn't change, but you and put different labels, different attributions, on the land to indcate its its size. Its real size is a property, but a measurement of that size, in some unit, may be termed an attribute. I am not quite sure about that - the owner certainly has little to do with the lot itself, and is clearly an attribute. A measurement, whether in feet or meters, does represent a proper quality quite directly. But there is a limit to the processing before it becomes a non-proper quality: The lyrics is a proper quality of the song, a two summary in two sentences can be attributed to the song, but is not a proper quality of the song. You have to draw the line somewhere, even if you do it with a gray color, wide and untidy bush. In any case, .net really got it the wrong way: The "real" quality inside the object is referred to as something attributed to the object, while a processing of the "real" object quality, presenting a quality that is not "real", is called a property, a proper value. It should have been the other way around.

          M J 2 Replies Last reply
          0
          • K kalberts

            A property is a proper, inherent quality of an object. Like the lyrics and music of a song - if you change those, it is a different song. An attribute is a quality attributed to an object, like the name of song or what you call it. The song called by a different name would sound just as sweet. The property is the piece of land, no matter who is attributed as the owner of that land. There is certainy a diffuse grey zone: If you have a look at the property, you may see its size by yourself. You may report that it is a thousand by two thosand feet. I might report that it is three hundred by six hundred meters. The proper size of the land doesn't change, but you and put different labels, different attributions, on the land to indcate its its size. Its real size is a property, but a measurement of that size, in some unit, may be termed an attribute. I am not quite sure about that - the owner certainly has little to do with the lot itself, and is clearly an attribute. A measurement, whether in feet or meters, does represent a proper quality quite directly. But there is a limit to the processing before it becomes a non-proper quality: The lyrics is a proper quality of the song, a two summary in two sentences can be attributed to the song, but is not a proper quality of the song. You have to draw the line somewhere, even if you do it with a gray color, wide and untidy bush. In any case, .net really got it the wrong way: The "real" quality inside the object is referred to as something attributed to the object, while a processing of the "real" object quality, presenting a quality that is not "real", is called a property, a proper value. It should have been the other way around.

            M Offline
            M Offline
            MKJCP
            wrote on last edited by
            #37

            BINGO!

            1 Reply Last reply
            0
            • M musefan

              Nah, Banana would by the type and Colour would be a property/attribute of the Banana type

              E Offline
              E Offline
              englebart
              wrote on last edited by
              #38

              I would argue that the color/colour would be a calculated field that is based on the age of the banana. It actually seems like it should really be more than a color to account for spots.

              class Banana {
              DateTime _estimatedPollinationDateTime;
              DateTime _pickedDateTime;

              Color getBaseColor() {
              return colorFunc(_pickedDateTime);
              }
              Pattern getPattern() {
              ... 10% spotted
              }
              Boolean isEdible() {
              // always!
              return true;
              }
              }

              1 Reply Last reply
              0
              • J Jorgen Andersson

                No, I don't mean in .Net, I mean semantically. Say for example I want to describe a car. It has a colour, top speed, engine size, length, leather seats and so on. When is it an attribute and when is it a property? Or is there an even better word?

                Wrong is evil and must be defeated. - Jeff Ello

                E Offline
                E Offline
                englebart
                wrote on last edited by
                #39

                I thought that attributes always start with an @... or is that annotation? Is an annotation an attribute of a property?

                1 Reply Last reply
                0
                • J Jorgen Andersson

                  No, I don't mean in .Net, I mean semantically. Say for example I want to describe a car. It has a colour, top speed, engine size, length, leather seats and so on. When is it an attribute and when is it a property? Or is there an even better word?

                  Wrong is evil and must be defeated. - Jeff Ello

                  W Offline
                  W Offline
                  W Balboos GHB
                  wrote on last edited by
                  #40

                  Not sure if this is helpful, but back many years ago, in CHEM 101 they taught us about two types of properties: Intensive Properties - For example, gold. Any amount of gold is still gold. Extensive Properties - A kg of gold is not a lb of gold. If one were to figure out how to differentiate the implications of the the two words-of-interest, it could possibly follow along the lines of the above.   With some syntactical candy, of course.

                  Ravings en masse^

                  "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

                  "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

                  1 Reply Last reply
                  0
                  • F Forogar

                    In the English language "property" and "attribute" are exactly the same meaning in the case where "property" is a property of an object such as "a banana is yellow". In this case, "yellow" is an attribute or property of the banana. If you are buying a house then the house can be referred to as a "property" but this is a different meaning and has nothing to do with "attribute". You can also "attribute" a quotation to a given person but this is a different meaning and has nothing to do with "property". Additionally, you can say, "That is my property" when referring to an object that belongs to you. Again, nothing to do with "attribute".

                    - I would love to change the world, but they won’t give me the source code.

                    W Offline
                    W Offline
                    W Balboos GHB
                    wrote on last edited by
                    #41

                    Forogar wrote:

                    You can also "attribute" a quotation to a given person but this is a different meaning and has nothing to do with "property".

                    I think you're off the mark on this particular example. When you attribute a quote, you are saying it is the property of some source. "Nothing to do with" is, at least as I observe, a substantial overstatement.

                    Ravings en masse^

                    "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

                    "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

                    1 Reply Last reply
                    0
                    • J Jorgen Andersson

                      No, I don't mean in .Net, I mean semantically. Say for example I want to describe a car. It has a colour, top speed, engine size, length, leather seats and so on. When is it an attribute and when is it a property? Or is there an even better word?

                      Wrong is evil and must be defeated. - Jeff Ello

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #42

                      Quote:

                      Say for example I want to describe a car. It has a colour, top speed, engine size, length, leather seats and so on.

                      Neither. Those are "extra-cost options". :|

                      "(I) am amazed to see myself here rather than there ... now rather than then". ― Blaise Pascal

                      1 Reply Last reply
                      0
                      • J Jorgen Andersson

                        No, I don't mean in .Net, I mean semantically. Say for example I want to describe a car. It has a colour, top speed, engine size, length, leather seats and so on. When is it an attribute and when is it a property? Or is there an even better word?

                        Wrong is evil and must be defeated. - Jeff Ello

                        M Offline
                        M Offline
                        Mark_Wallace
                        wrote on last edited by
                        #43

                        Trump tower is a property; tweets are attributes.

                        I wanna be a eunuchs developer! Pass me a bread knife!

                        1 Reply Last reply
                        0
                        • B BStorrar

                          Surely the type would be Fruit, as part of an assembly of Healthy in a project called Food?

                          S Offline
                          S Offline
                          SeattleC
                          wrote on last edited by
                          #44

                          Only if the only thing you are going to do with fruit is classify them. If fruits have behavior, then banana is a derived class of fruit, and color is an attribute of banana. Your solution isn't very object oriented.

                          1 Reply Last reply
                          0
                          • J Jorgen Andersson

                            No, I don't mean in .Net, I mean semantically. Say for example I want to describe a car. It has a colour, top speed, engine size, length, leather seats and so on. When is it an attribute and when is it a property? Or is there an even better word?

                            Wrong is evil and must be defeated. - Jeff Ello

                            W Offline
                            W Offline
                            willichan
                            wrote on last edited by
                            #45

                            My understanding has always been that a property is a distinctive attribute. In other words a property is an attribute that in part makes something what it is, whereas an attribute can be just a characteristic of a thing. Money makes the world go round ... but documentation moves the money.

                            M 1 Reply Last reply
                            0
                            • P PIEBALDconsult

                              I agree that they're pretty much synonymous in everyday usage. But... What are the properties of _A_ car? What are the attributes of _THIS_ car?

                              J Offline
                              J Offline
                              Jorgen Andersson
                              wrote on last edited by
                              #46

                              So properties of a class and attributes of an instance sort of.

                              Wrong is evil and must be defeated. - Jeff Ello

                              1 Reply Last reply
                              0
                              • M MadMyche

                                I was thinking they were both characteristics as I read through all the responses... So I had to google both and read the various definitions... Some even went on to compare to a virtue, so sorry that I do not have. Anyways this about sums up that they are one in the same, only real difference is the contexts they get used in, their lineage, and popularity.

                                Google

                                Quote:

                                an attribute, quality, or characteristic of something.

                                [define: property - Google Search](https://www.google.com/search?q=define%3A+property)

                                Director of Transmogrification Services Shinobi of Query Language Master of Yoda Conditional

                                J Offline
                                J Offline
                                Jorgen Andersson
                                wrote on last edited by
                                #47

                                +1 for learning a new way to google-

                                Wrong is evil and must be defeated. - Jeff Ello

                                1 Reply Last reply
                                0
                                • K kalberts

                                  A property is a proper, inherent quality of an object. Like the lyrics and music of a song - if you change those, it is a different song. An attribute is a quality attributed to an object, like the name of song or what you call it. The song called by a different name would sound just as sweet. The property is the piece of land, no matter who is attributed as the owner of that land. There is certainy a diffuse grey zone: If you have a look at the property, you may see its size by yourself. You may report that it is a thousand by two thosand feet. I might report that it is three hundred by six hundred meters. The proper size of the land doesn't change, but you and put different labels, different attributions, on the land to indcate its its size. Its real size is a property, but a measurement of that size, in some unit, may be termed an attribute. I am not quite sure about that - the owner certainly has little to do with the lot itself, and is clearly an attribute. A measurement, whether in feet or meters, does represent a proper quality quite directly. But there is a limit to the processing before it becomes a non-proper quality: The lyrics is a proper quality of the song, a two summary in two sentences can be attributed to the song, but is not a proper quality of the song. You have to draw the line somewhere, even if you do it with a gray color, wide and untidy bush. In any case, .net really got it the wrong way: The "real" quality inside the object is referred to as something attributed to the object, while a processing of the "real" object quality, presenting a quality that is not "real", is called a property, a proper value. It should have been the other way around.

                                  J Offline
                                  J Offline
                                  Jorgen Andersson
                                  wrote on last edited by
                                  #48

                                  I believe this is as good an answer on this subject can get. If I change the name of a song it's still the same song, but if I change the lyrics and music it becomes a new song but it remains a song. Similarly, if I change the colour of of a car it's still the same car, but if I change the size it becomes a different model of a car. So colour is an attribute and size is a property in this case. If it had been in the Q&A I would have marked it an answer. Now I'm going to build a database.

                                  Wrong is evil and must be defeated. - Jeff Ello

                                  1 Reply Last reply
                                  0
                                  • W willichan

                                    My understanding has always been that a property is a distinctive attribute. In other words a property is an attribute that in part makes something what it is, whereas an attribute can be just a characteristic of a thing. Money makes the world go round ... but documentation moves the money.

                                    M Offline
                                    M Offline
                                    maze3
                                    wrote on last edited by
                                    #49

                                    My dumbed down, potential wrong view of this (partly sarcastic): Property - could be derived from Proprietary - like others has mentioned - It is something inheritly linked, or linked is such a way that cannot be removed or changed. Car is made of Metal - is Property of the car. Attribute - is something you give, associate, or Attribute (in my head the pronounceaction sound difference) to something. I have painted the Car blue - I have given it a blue paint. I can change the paint It has stickers. I have attributed stickers to my car. Along this line then. My parents are Properties of Me. But a girlfriend is an Attribute. Does a wife convert from Attribute to Property? And if you device. The divorce sticks. Unless it was annulled. This makes sense right :sigh:

                                    1 Reply Last reply
                                    0
                                    • J Jorgen Andersson

                                      No, I don't mean in .Net, I mean semantically. Say for example I want to describe a car. It has a colour, top speed, engine size, length, leather seats and so on. When is it an attribute and when is it a property? Or is there an even better word?

                                      Wrong is evil and must be defeated. - Jeff Ello

                                      T Offline
                                      T Offline
                                      thewazz
                                      wrote on last edited by
                                      #50

                                      Characteristics.

                                      1 Reply Last reply
                                      0
                                      Reply
                                      • Reply as topic
                                      Log in to reply
                                      • Oldest to Newest
                                      • Newest to Oldest
                                      • Most Votes


                                      • Login

                                      • Don't have an account? Register

                                      • Login or register to search.
                                      • First post
                                        Last post
                                      0
                                      • Categories
                                      • Recent
                                      • Tags
                                      • Popular
                                      • World
                                      • Users
                                      • Groups