List Table vs Data Object
Overview
Many people new to Toolkit find it difficult to distinguish between Data Objects and List Table/List From Tables. Both relate to database tables, and it's hard to know which concept is used where. Moreover, in many cases, a single Object might have the same data objects and list tables. In other cases, an Object can have an associated List Table with more From Tables than it has Data Objects.
So, what's the difference?
Data Objects are more closely associated to the adding/editing/deleting/selecting of a single Object.
List Tables are more loosely associated data with an object that can span out to any number of modules. Example, the Avectra.netForum.Components.CO.CO_Individual object has data objects to the Individual table and to the various "contact information" tables (Phone, Fax, Email, Address, etc.). All of these tables are closely associated with an Individual. The List Tables setup for the Individual table co_individual, by contrast, can often have dozens of different From Tables that span across the modules of netFORUM to include Registration, Certifications, etc. Think of Data Objects as (generally) more of a 1-to-1 relationship with the main Object, and List Tables as being both 1-to-1 and 1-to-many.
Data Objects are used to determine which Form Controls can be placed on a Form, and which controls can be set in the xWeb web methods xWeb:UpdateFacadeObject and xWeb:InsertFacadeObject (note: this list of controls is in xWeb:GetFacadeXMLSchema web method.
List Tables define the tables and columns that are available in the Query and the xWeb GetQuery web method.
FAQ
Q. It is possible to have Data Objects that are not in the List Table setup?
A. Yes, and vice versa. Most commonly, every Data Object table will also be a From Table table, but the converse is usually not true. It is common for netFORUM sites to have several additional From Tables added to expand the reach of the Query tool into more tables.
Q. I know that I can easily add more From Tables, but can I add more Data Objects?
A. It is possible to add more Data Objects to an Object, but only if the object is not a Static Facade Object. Be careful adding more Data Objects, however, as this weighs down the object.
See Also
- For factors on this topic that affect xWeb, see the FAQ sections of xWeb:GetQuery.