Understanding Data...
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:
Tip
The Edit UIs are automatically generated based on the Content-Type Schema which says what fields each kind of data has.
App Data Model
Every App contains Content-Types and Entities - like this:
- Content Types are the schema, they define what fields an entity has - peek the object structure.
- Entities are the data-items, they contain the content - peek the object structure.
Let's look at each piece in detail.
Content-types
Content-types are the Schema. The are the rules which say that a Person has a FirstName, Photo and Birthday etc.
An App usually has a lot of Content-Types.
👉 Content-Type (Schema/Object-Type) 👉 Content-Type Fields
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.
👉 App Shared "Ghost" Content-Types (⚠)
Global-Types are Content-Types which are stored in a system folder so they can be used in all Apps of an installation.
👉 Global Content-Types (⚠)
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.
- A
Personhas different fields than aBlogPost - All the Values in an Entity can also be multi-language by default
👉 Entities (Data, Records, Items)
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 FieldProfilePhotoof the EntityPerson#5020. - 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.
👉 Content Assets / Images / Documents
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.
👉 ADAM - Automatic Digital Asset Management
External Data
External Data can come from anywhere. Here are some common scenarios:
SQLdata coming from the Dnn database or from another DBCSVdata from a file which an editor updates from time to timeSharePointdocument lists or tablesJSONdata 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
Once the data is retrieved it can be used in Templates, WebAPIs, JavaScript and SPAs.