Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| ardiextra:ardi_user_content_framework [2025/03/16 22:40] – optrix | ardiextra:ardi_user_content_framework [2025/12/18 22:50] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====ARDI User Content Framework==== | ||
| + | The **User Content Framework** (or UCF) is a common pattern found in a number of ARDI addons, including our // | ||
| + | |||
| + | It's a very basic method of providing custom content in an ARDI addon. | ||
| + | |||
| + | ===The Base Folder=== | ||
| + | |||
| + | In any UCF-based addon, you will have a **base folder**. | ||
| + | |||
| + | Normally, this will be found in your ARDI [[ardiadminguide: | ||
| + | |||
| + | The actual folder name will vary depending on the addon, but you'll find a couple of examples below... | ||
| + | |||
| + | ^Addon^Folder Name^ | ||
| + | |ReportList|Reports| | ||
| + | |Infographics|Displays| | ||
| + | |FunctionList|Functions| | ||
| + | |||
| + | As an example, if you installed ARDI onto a Windows system in **C: | ||
| + | |||
| + | | ||
| + | |||
| + | ===Content In Each Folder=== | ||
| + | |||
| + | Under that folder, you'll find any shared resource files (ie. Python libraries, images, settings etc.). | ||
| + | |||
| + | You'll also find a sub-folder for each piece of //content// you add to the system. For example, the Reporting addon will have a folder for every report, the Infographics addon will have a folder for every display. | ||
| + | |||
| + | //Although they are technically supported, for compatibility reasons we suggest that the folder names don't contain any spaces and are lower-case. This helps avoid issues should an ARDI server ever migrate from Windows to Linux platforms.// | ||
| + | |||
| + | //Note: Sub-folders with a leading underscore (_) symbol are ignored.// | ||
| + | |||
| + | ===Identification=== | ||
| + | |||
| + | Inside the folder for each item is an **info.txt** or **info.json** file that describes the specific piece of content. | ||
| + | |||
| + | At a minimum, this file will include the //name// of the content (ie. the human-readable name of the report or display) and the //folder// it should appear in when users browse through the user-interface. | ||
| + | |||
| + | In many cases, you can split your content into sub-folders using the '/' | ||
| + | |||
| + | You can also assign a single piece of content to multiple folders by using a vertical bar (|) to split different folder names. | ||
| + | |||
| + | For example... | ||
| + | |||
| + | Daily Reports | ||
| + | //The content appears in the 'Daily Reports' | ||
| + | |||
| + | Daily Reports/ | ||
| + | //The content appears in the ' | ||
| + | |||
| + | Daily Reports|Control Reports | ||
| + | //The content appears in **both** the 'Daily Reports' | ||
| + | |||
| + | ===Content=== | ||
| + | |||
| + | Along-side the **info** file, put the content itself. This type of content varies depending on the addon - Infographics will usually require a Javascript file called // | ||
| + | |||
| + | ===Why Use This System=== | ||
| + | |||
| + | At first glance, this system seems //very// basic. And you'd be right. | ||
| + | |||
| + | But this was a deliberate choice. By being very simple, it's extremely flexible and highly compatible with a range of hardware, software and workflow options. | ||
| + | |||
| + | Advantages include... | ||
| + | |||
| + | * No special infrastructure (databases, services, etc) are required, | ||
| + | * Content can be created in a wide variety of simple tools, | ||
| + | * Editing can be performed via text-based methods such as SSH, | ||
| + | * Content can be backed up along-side the rest of your ARDI database, | ||
| + | * Content is compatible with a wide variety of version-management tools, | ||
| + | * The folder location can be overridden, allowing you to share a common set of content on network drives or cloud-synced storage. | ||
| + | * Content can often be developed off-server and only copied onto the server when it's published. | ||