Board index » jbuilder » Puzzled with "Attribute" and "Property".

Puzzled with "Attribute" and "Property".


2004-01-26 06:31:57 PM
jbuilder11
Execuse me for my poor English.
I wonder the differences between "Attribute" and "Property" in English.
As we know, in object-oriented programming languages, we could define
'attributes' or 'properties' for a Class, and then the Objects, which are
instances of the Class would have the corresponding 'attributes' or
'properties'. However, I wanna build a component for data persistence, which
can store and manage Objects and their Classes, and not quite sure which one
is suitable to Classes, and which one is sutable for Objects, as they can
not be the same in the object-model of that component?
For example, in the comopnent object-model, you can get an object 'Class1'
representing a Class, and use 'Class1.Attributes' to access the collection
of attributes or properties in the class definition. And you can also get an
object 'Object1' representing an instance of that Class, and use
'Object1.Properties' to access the attribute or property collection of that
Object instance. And the combination of terms may also be
"Class1.Properties" and "Object1.Attributes".
So there are two combination of terms:
1. Class.Attributes, Object.Properties
2. Class.Properties, Object.Attributes
My question is which combination is more idiomatic?
--
Best regards,
Laser Lu
 
 

Re:Puzzled with "Attribute" and "Property".

Quote
1. Class.Attributes, Object.Properties
2. Class.Properties, Object.Attributes
Neither. Use this instead
Class.Properties, Object.Properties
But remember that at the end of the day everything is a matter
of definitions. So somebody else could say
Class.Attributes, Object.Attributes
Blue Knight
 

Re:Puzzled with "Attribute" and "Property".

But I have to make a choice, as these two terms can not be the same. If they
are the the same, there would be a name conflict in the object model of the
ActiveX component.
--
Best regards,
Laser Lu
"Blue Knight" < XXXX@XXXXX.COM >wrote in message
Quote
>1. Class.Attributes, Object.Properties
>2. Class.Properties, Object.Attributes

Neither. Use this instead

Class.Properties, Object.Properties

But remember that at the end of the day everything is a matter
of definitions. So somebody else could say

Class.Attributes, Object.Attributes

Blue Knight


 

{smallsort}

Re:Puzzled with "Attribute" and "Property".

Show code please
Blue Knight
"Laser Lu" < XXXX@XXXXX.COM >wrote in message
Quote
But I have to make a choice, as these two terms can not be the same. If
they
are the the same, there would be a name conflict in the object model of
the
ActiveX component.

--
Best regards,
Laser Lu
"Blue Knight" < XXXX@XXXXX.COM >wrote in message
news: XXXX@XXXXX.COM ...
>>1. Class.Attributes, Object.Properties
>>2. Class.Properties, Object.Attributes
>
>Neither. Use this instead
>
>Class.Properties, Object.Properties
>
>But remember that at the end of the day everything is a matter
>of definitions. So somebody else could say
>
>Class.Attributes, Object.Attributes
>
>Blue Knight
>
>


 

Re:Puzzled with "Attribute" and "Property".

Laser Lu wrote:
| My question is which combination is more idiomatic?
We have had great fun in the oodesign group trying to work this one out :-)
I have found that I use Attributes for objects that implement properties,
because Property is a reserved word in Delphi.
OTOH, I use Properties for the same purpose in C# because Attribute means
something in that language.
Try googling or looking in oodesign archives for further inane babbling on
this subject <vbg>
Joanna
Consultant Software Engineer
TeamBUG support for UK-BUG
TeamMM support for ModelMaker
 

Re:Puzzled with "Attribute" and "Property".

Please direct your browser at info.borland.com/newsgroups/ and read the
newsgroup guidelines. One of them asks us not to post the same question to
different newsgroups, but to pick the most appropriate one and just post
there. Thanks!