aopen
04-13-2007, 07:50 PM
In OOP terms what the difference between attribute and property?
|
Click to See Complete Forum and Search --> : Attribute vs Property aopen 04-13-2007, 07:50 PM In OOP terms what the difference between attribute and property? Weedpacket 04-13-2007, 11:05 PM Could be anything: neither has a formal definition "in OOP terms". The specification for one language might use "property" to describe a method or pair of methods that simulate a field, and use "attribute" to describe embedded compiler hints. Another language might use them to mean something completely different. NogDog 04-13-2007, 11:32 PM Within the online PHP manual, I've seen class variables referred to as both "properties" and "members", and I tend to think of them from "attributes", as that's the first thing I recall hearing them called. :rolleyes: Selkirk 04-23-2007, 03:26 PM The idea behind the uniform access principle (http://en.wikipedia.org/wiki/Uniform_access_principle) is that you are not supposed to be able to tell the difference between instance variables, fields, attributes, properties or accessor methods. Weedpacket 04-24-2007, 07:22 AM In C# you certainly can tell the difference between attributes and properties; they look totally different. Of course, that's dependent on how Microsoft defines "attribute" as it applies to C# .... Selkirk 04-25-2007, 05:18 PM The implementation looks different. The idea is that the interface shouldn't. Weedpacket 04-26-2007, 04:13 AM Unless "property" and "attribute" refer to different concepts in the environment of interest. rkolbe 05-02-2007, 02:37 AM I go by Java terms... data members, methods, etc...but I also tend to use data members and variables interchangeably. With attributes and properties, as long as you are conveying what you are talking about clearly, you should be OK. kanwar 06-12-2007, 08:54 AM dont be confused with attribute, property and parameters. They are simple-- attributes are set on objects, and an object can have different attributes, and futher each attribute can have various properties.and the parameters you can say are the arguments passed with some function like get_attribute_name()... PHP Builder
Copyright WebMediaBrands Inc. All Rights Reserved. |