- tags
- #help #domain #data #classes #objects
- description
- The domain model in AI Putty shows your app's classes and how they link, in eight views, and Objects lets you browse, search, edit and add the stored data.
- brief
- Domain model draws your app's classes and their links eight ways. Objects lists the stored classes, their objects, and one object with Edit, Duplicate, Delete and Used by.
Your app's data model and objects¶✎ edit
Your app's data is made of classes (like Order or Customer), each with fields, and the objects stored in them. AI Putty gives you two pages for it:
- Domain model draws every class and how they link.
- Objects is the data browser: the stored classes, their objects, and each object's values.
The domain model¶✎ edit
The top line counts the classes and the relationships. Pick a view:
- Graph: a box per class, a line per link. Drag to move or pan; +, − and ⤢ zoom and fit.
- Owns: only what holds what. Tap a class to see its references too.
- Hubs: classes many others point to become badges on the classes that use them.
- Focus: tap a class to see only its neighbours, 1 hop or 2 hops away. Tap empty space for all.
- Groups: classes placed by their group, with lines inside each group. Tap a class for its links to other groups.
- UML: a card per class with its fields and types.
- Tree: what each class contains, opened one level at a time.
- Matrix: a grid of classes. A row is the owner, a column the target; hover or long-press a cell for the field name.
The legend tells the lines apart: contains many, contains one, and <> reference (dashed: a link by key).
Pick a scope: Stored (classes with stored objects and what they use), All data (every class with fields) or Everything. The Architect also sees d2 and Base, the platform's own model and the base project's.
Tap a class to open its sheet: its fields, Used by (the classes that point to it), and links to the class page and, for a stored class, its objects.
Browse objects¶✎ edit
Objects opens on a tile per stored class, by group, with its number of objects and fields. Filter classes… narrows the tiles; Open the model graph goes to the domain model. Model checks lists the model's errors and warnings, if any.
A class shows its key, values, References out, what it owns, what it embeds, a Neighbourhood drawing, Referenced by, and a Sample of its objects. When the class has states, a States card shows them as Source or Diagram. Press List objects or New class.
A class's objects come as a table:
- Search across them, add a + filter… on a field (a range for numbers, a pick for short lists, contains… for text), and group by… a field.
- Columns picks what the table shows. Tap a column heading to sort.
- Map shows up when the class has coordinates.
One object shows its Values, References, what it holds, and Used by: every object that points to it. Buttons: Open (when its class has its own page), Edit, Duplicate, Delete, Raw JSON and ↻ Refresh. Recent at the top takes you back to objects you just looked at.
Edit or add an object¶✎ edit
Edit or New opens a form with a control per field. Computed fields are shown, not edited. An existing object's key is locked: Duplicate copies it under a new key.
Review changes shows each field's old and new value; then Save, or Cancel. Delete asks once first, and warns when other objects still point to it.
Worked examples¶✎ edit
- "Which classes link to Order?" Open the Domain model, choose Focus, and tap Order. Its sheet lists them under Used by.
- "What does an Order contain?" Choose Tree and open Order a level at a time.
- "Which orders are still open?" In Objects, open Order, press List objects, add + filter… on its status, or group by… status.
- "Can I delete this customer?" Open the customer and check Used by first. If orders still point to it, their links will dangle.