Squeak
  links to this page:    
View this PageEdit this PageUploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
DCI domain model - DATA
Last updated at 9:15 pm UTC on 10 January 2022
In the Data-Context-Interaction programming paradigm the first question asked is

What are the objects we are dealing with?


Data objects should be 'dumb'. Simple objects.




The DCI Architecture: A New Vision of Object-Oriented Programming

Examples of DCI DATA objects

Assuming classes for Data objects are kept in Class categories with a name ending with 'Data' they may be obtained by the following query

 | categories suffix |
  suffix := 'Data'.
  categories := Set new. 
 Object withAllSubclassesDo: [ :cls |
 		cls category ifNotNil: [ :category |
 			(category endsWith: suffix) ifTrue: 
 			[categories add: category ]]].
 categories asSortedCollection inspect


If 'data' or 'Data' may be also a part of the category name

 | categories suffix |
  tag := 'Data'.
  categories := Set new.
  Object withAllSubclassesDo: [ :cls |
  		cls category ifNotNil: [ :category |
  			((category endsWith: tag) or: [category asLowercase includesSubstring: tag asLowercase]) ifTrue: 
  			[categories add: category ]]].
 categories asSortedCollection inspect

Then in the inspector object with this access a list of all data classes may be produced.
The whole image may be considered to be a "database" which you query for data.