Data in 2sxc covers various aspects:
- Data as a developers sees it - as tables of items / Entities
- Content as an editor sees it - basically bundles of text/image shown on a specific page
- Content Presentation Settings which configure how the content should be shown for each item
- Settings at App-Level
- Language Resources at App-level for multilanguage output
- Assets (images, documents) belonging to this each data-item / Entity
This kind of data is usually used to:
- Show in the browser with HTML
- Show in the browser in a JS-application or SPA
- Edit in the browser
- Export / import data
- Combine with other data
- Use in other sites or mobile apps with a headless backend
This kind of data can be used in many ways. Let's start by looking where this fits in the stack:
The Edit UIs are automatically generated based on the Content-Type Schema which says what fields each kind of data has.
App Data Model
- Content Types are the schema, they define what fields an entity has.
- Entities are the data-items, they contain the content.
Let's look at each piece in detail.
Content-types are the Schema. The are the rules which say that a
Person has a
An App usually has a lot of Content-Types.
Global / Shared Types
Usually a Content-Type is part of the App and only available inside that App. In rare cases you may have many sites (Portals) or many Apps which need the same Content-Type. In this case it's smarter to store this in a shared location.
Global-Types are Content-Types which are stored in a system folder so they can be used in all Apps of an installation.
Entities / Content-Items
Entities are Dynamic Data Items. They always belong to a Content-Type and have all the fields specified in that Content-Type. This makes them very dynamic.
Personhas different fields than a
- All the Values in an Entity can also be multi-language by default
Assets (Images / Documents)
Assets come in 2 Flavors: Private Assets and Shared Assets.
- Private Assets
By default, assets uploaded in the UI belong to the Entity and to the Field they were added to. So the photo
daniel.jpgbelongs to the Field
ProfilePhotoof the Entity
- Shared Assets If the editor expects to re-use an asset elsewhere and if the Content-Type configuration allows this, then the asset can also be stored in a shared location.
ADAM - the Automatic Digital Asset Manager
ADAM is a subsystem of 2sxc. It's responsible for managing the files and storing them in a way that assigns Private Assets to the Entities and Fields they belong to.
External Data can come from anywhere. Here are some common scenarios:
SQLdata coming from the Dnn database or from another DB
CSVdata from a file which an editor updates from time to time
SharePointdocument lists or tables
JSONdata from another REST WebService
External Data is retrieved using one of the following methods:
- a VisualQuery which was configured to get / filter / sort this data
- C# code creating DataSource objects to retrieve this data
- C# code using standard .net APIs to get / use this data