Forum OpenACS Q&A: Which are the differences between the functions content_type__drop_type and content_type__drop_attribute?
I'm a newbie and a know few things about openACS but this question has come up when reading some tutorials.
Can anybody help me? I have the same problem with content_type__create_type and content_type__create_attribute.
types are somewhat similar to classes in object oriented programming: they are used to define different kinds of things (e.g. persons, parties, content-items, ...).
Attributes are used to describe these different kind things (attributes of persons are first names, last names, email addresses, etc.). If one would have types but no attributes, it would not be possible to store information about these things.
The functions with "drop" are used to delete types/attributes, the ones with "create" .... i am sure, you got it.
if you make an object of this type, it won't have any places to put data meant for those objects.
So you can add attributes, which will add those places.
Example... I want to create a type for holding contact information, like name, address, phone. So I make the type, I'll call it contact. Then, I'll add attributes to that type, and call them name, address and phone, so that when I store an object of that type, I would give the name, address and phone number I want to store.