Difference between revisions of "CLIO Developer Guide"

From CLIO

 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
==Overview==
==Overview==
Developers code the CLIO activities, create or modify activity types, and provide insights into technology integration.
Developers code the CLIO Programs and Activities, create or modify Activity types, and provide insights into technology integration.


==Preparation==
==Preparation==
===Creating a Local Development Environment===
===Creating a Local Development Environment===
{{Main|Creating a Local Web Development Environment}}
CLIO is a web-based application, which means that it needs to be developed on your local machine using a Local Web Development Environment (LWDE).  There are many free and open-source Local Web Development Environments available, which quickly create a local web server with all of the required tools.  These software packages can also be used to quickly create kiosks. {{Main|Creating a Local Web Development Environment}}
 
CLIO is a web-based application, which means that it needs to be developed on your local machine using a Local Web Development Environment (LWDE).  There are many free and open-source Local Web Development Environments available, which quickly create a local web server with all of the required tools.  These software packages can also be used to quickly create kiosks.  


===Installation===
===Installation===
{{Main|CLIO Installation}}
CLIO needs to be installed on a web server.  There is no setup process for databases, meaning that the CLIO web application files can be dragged directly to the applicable web server folder and accessed without installation.  {{Main|CLIO Installation}}
 
CLIO needs to be installed on a web server.  There is no setup process for databases, meaning that the CLIO web application files can be dragged directly to the applicable web server folder and accessed without installation.   


=== Accessing CLIO ===
=== Accessing CLIO ===
Once CLIO has been installed on your web server, you can access it through your web browser. For local web development, you can navigate to http://localhost/ or http://127.0.0.1/.
Once CLIO has been installed on your web server, you can access it through your web browser. For local web development, you can navigate to http://localhost/ or http://127.0.0.1/.
==Coding an Activity==
{{Main|Creating a CLIO Activity}}Activities are created through easily customizable activity templates, called Activity Types. You can make your own, or utilize the ones that are provided. The CLIO web application suite comes pre-installed with seventeen Activity Types that are designed specifically for use in an informal education or exhibit context. We provide word processor templates to assist with collaboration during the development and drafting process, but they need to be coded and stored as JSON files for use within CLIO.  Each activity type contains it's own guide for coding activity content, along with the appropriate template.
==Activity Types==
===Creating an Activity Type===
{{Main|Creating a CLIO Activity Type}}
{{Stub}}
===Using Integrated Libraries===
{{Main|Using the Integrated Libraries in CLIO}}
{{Stub}}
===Using CLIO Functions===
{{Main|Using CLIO Functions}}
{{Stub}}
===Integrating a JavaScript Library===
{{Main|Integrating a JavaScript Library}}
{{Stub}}


==Framework==
==Framework==
===Understanding the URL Scheme===
===Understanding the URL Scheme===
The CLIO web application uses a URL query-based system to load the interface dynamically based on parameters in the URL.  By manipulating these parameters, we can change how the web application will appear when loaded.  This can be thought of similarly to the way options are passed into a programming function.  When the CLIO is loaded without any parameters, it will default to the full “Facilitator Mode” experience.
{{Main|Understanding the CLIO URL Scheme}}
{{Main|Understanding the CLIO URL Scheme}}
{{Stub}}
 
===Understanding the 'content' Folder===
===Understanding the 'content' Folder ===
All of the data used by Programs and Activities are stored as flat files within the 'content' directory at the root of the web application.  When CLIO is loaded, it will search this directory for available Programs.  This is because CLIO does not use a database server to store activity configurations.
{{Main|Understanding the CLIO Content Folder}}
{{Main|Understanding the CLIO Content Folder}}
{{Stub}}
 
===Understanding an Activity Configuration File===
===Understanding an Activity Configuration File===
Every Activity, even ones with different Activity Types, use the same configuration file structure.  This allows the CLIO web application to configure the interface, identify the appropriate activity type and pass is the content used for setup.
{{Main|Understanding a CLIO Activity Configuration File}}
{{Main|Understanding a CLIO Activity Configuration File}}
{{Stub}}
 
===Understanding the Look Closer Content System===
===Understanding the Look Closer Content System===
The Look Closer Content System is a CLIO feature that can be used while creating new interactive activity types.  When called through a JavaScript event, this system creates full-screen Look Closer pop-ups with scrollable rich text, image galleries and video playback.  This features is meant to add depth and interactivity to the exploration of information.
{{Main|Understanding the CLIO Look Closer Content System}}
{{Main|Understanding the CLIO Look Closer Content System}}
{{Stub}}
 
===Understanding the Rich Text Markup System===
===Understanding the Rich Text Markup System===
Paragraph and text formatting is stored using a lightweight markup language, closely based on the BBCode tag system.  This allows formatting information, such as bold, italic and underlined text, to be stored within a plain text format like JSON. For example, storing “[b]Example[/b]” within a configuration file would cause the interface to render everything between the “[b]” and “[/b]” tags as bold, i.e. '''Example'''.  
{{Main|Understanding the CLIO Rich Text Markup System}}
{{Main|Understanding the CLIO Rich Text Markup System}}
{{Stub}}
 
===Controlling Hardware===
==Creating an Interactive Exhibit==
===Creating an Interactive===
An Interactive refers to single instance of a CLIO interactive experience, such as an individual kiosk or web exhibition.  For example, we just installed an CLIO Interactive instance in the Local Web Development Environment.  Interactives can contain multiple Programs, allowing kiosks to be used in different exhibitions without internet access.  Interactives can also have device-specific settings, such as kiosk screen brightness and Facilitator PIN codes. {{Main|Creating a CLIO Interactive}}
 
===Coding a Program===
A Program is a selection of Activities within the same group, exhibit or educational program.  Programs are provided as a way to create manageable collections of interactive activities that can be customized based on your institutions needs.  Each Program is a represented by a folder in the 'content' directory and has it's own JSON configuration file. {{Main|Creating a CLIO Program}}
 
===Defining Audiences===
Each Program can have custom audiences groups, which are included as a way to help sort activities for predefined demographics.  When setting up the kiosk as part of their pop-up exhibit, facilitators have the power to configure which activities they think would best fit their audience and what they’re trying to achieve.  These audiences are defined in the configuration file for each Program.
{{Main|Defining CLIO Audiences}}
 
===Adding Multimedia===
Each Program contains its own directory to store media, which allows multiple activities within a Program to utilize the same multimedia assets.
{{Main|Adding Media to CLIO}}
 
===Coding an Activity===
Activities are created through easily customizable activity templates, called [https://cliomuseums.org/wiki/index.php/CLIO_Activity_Types Activity Types].  These activities are coded and stored as JSON files for use within CLIO.  We provide word processor templates to assist with collaboration during the development and drafting process.
{{Main|Creating a CLIO Activity}}
 
===Updating Kiosk Content===
 
Once you have created an interactive on your Local Web Development Environment, it will need to be installed onto a kiosk or live web server.{{Main|Updating CLIO Exhibit Content}}
 
==Live Facilitation ==
===Configuring Facilitator Information===
When used as a kiosk for pop-up events, the Facilitation menu can provides facilitators with quick references, such as program information, goals, objectives, and instructions.  This information is stored as JSON within a Program folder.{{Main|Configuring CLIO Facilitator Information}}
 
====Configuring Facilitator Discussions====
Facilitator Discussions provide curated topics that can be used to prompt a conversation or answer a question from a participant.{{Main|Configuring CLIO Facilitator Discussions}}
 
==Creating an Activity Type==
All [[CLIO Activity Types|Activity Types]] are created using JavaScript.  They are defined as a single function designed to load content from the configuration file and use it to set up the activity.  Each Activity Type will automatically load an HTML template into the container and apply a stylesheet to the page.  Using JavaScript or jQuery events, you can manipulate these containers and styles.
{{Main|Creating a CLIO Activity Type}}
 
===Using CLIO Functions===
 
There are several functions that have been created for use in the interface or other activity types that were included as part of the CLIO web application, making it so they can be integrated into new activity types.{{Main|Using CLIO Functions}}
 
=== Controlling Hardware ===
While running a web server locally on the hardware that is powering the CLIO exhibit, it is possible to control the hardware through the web application interface.  This should only be done when the web server is running on a kiosk that otherwise has no access to the internet.  Hardware control can be achieved through a combination of JavaScript, PHP and Python scripting.   By using JavaScript and AJAX/AJAJ, we can asynchronously call a PHP script as part of an event or the initialization script of an activity type.  When this PHP script is called, it is used to run terminal commands or initialize a Python script stored locally on the hardware.  PHP and Python can be used to manipulate Raspberry Pi hardware, execute console commands or run prepared code to control lights, speakers or other electronics attached to a Raspberry Pi GPIO port.
{{Main|Controlling External Hardware with CLIO}}
{{Main|Controlling External Hardware with CLIO}}
{{Stub}}
 
==Contribute==
If you want to help contribute to CLIO, you've come to the right place. This is where we are trying to keep a living document based on CLIO and the way open-source technologies intersect with museums, libraries and cultural heritage centers. Sponsor us, add terms, update definitions, or provide language translations. Every little thing helps us to create a vibrant and open community geared towards one thing: equal access to technology, for everyone.{{Main|Contributing to CLIO}}

Latest revision as of 11:06, 15 March 2023

Overview

Developers code the CLIO Programs and Activities, create or modify Activity types, and provide insights into technology integration.

Preparation

Creating a Local Development Environment

CLIO is a web-based application, which means that it needs to be developed on your local machine using a Local Web Development Environment (LWDE).  There are many free and open-source Local Web Development Environments available, which quickly create a local web server with all of the required tools. These software packages can also be used to quickly create kiosks.


Installation

CLIO needs to be installed on a web server.  There is no setup process for databases, meaning that the CLIO web application files can be dragged directly to the applicable web server folder and accessed without installation. 

Label important.png


Accessing CLIO

Once CLIO has been installed on your web server, you can access it through your web browser. For local web development, you can navigate to http://localhost/ or http://127.0.0.1/.

Framework

Understanding the URL Scheme

The CLIO web application uses a URL query-based system to load the interface dynamically based on parameters in the URL.  By manipulating these parameters, we can change how the web application will appear when loaded. This can be thought of similarly to the way options are passed into a programming function.  When the CLIO is loaded without any parameters, it will default to the full “Facilitator Mode” experience.


Understanding the 'content' Folder

All of the data used by Programs and Activities are stored as flat files within the 'content' directory at the root of the web application. When CLIO is loaded, it will search this directory for available Programs. This is because CLIO does not use a database server to store activity configurations.


Understanding an Activity Configuration File

Every Activity, even ones with different Activity Types, use the same configuration file structure. This allows the CLIO web application to configure the interface, identify the appropriate activity type and pass is the content used for setup.


Understanding the Look Closer Content System

The Look Closer Content System is a CLIO feature that can be used while creating new interactive activity types. When called through a JavaScript event, this system creates full-screen Look Closer pop-ups with scrollable rich text, image galleries and video playback. This features is meant to add depth and interactivity to the exploration of information.


Understanding the Rich Text Markup System

Paragraph and text formatting is stored using a lightweight markup language, closely based on the BBCode tag system.  This allows formatting information, such as bold, italic and underlined text, to be stored within a plain text format like JSON. For example, storing “[b]Example[/b]” within a configuration file would cause the interface to render everything between the “[b]” and “[/b]” tags as bold, i.e. Example.  


Creating an Interactive Exhibit

Creating an Interactive

An Interactive refers to single instance of a CLIO interactive experience, such as an individual kiosk or web exhibition. For example, we just installed an CLIO Interactive instance in the Local Web Development Environment. Interactives can contain multiple Programs, allowing kiosks to be used in different exhibitions without internet access. Interactives can also have device-specific settings, such as kiosk screen brightness and Facilitator PIN codes.


Coding a Program

A Program is a selection of Activities within the same group, exhibit or educational program. Programs are provided as a way to create manageable collections of interactive activities that can be customized based on your institutions needs. Each Program is a represented by a folder in the 'content' directory and has it's own JSON configuration file.

Label important.png


Defining Audiences

Each Program can have custom audiences groups, which are included as a way to help sort activities for predefined demographics.  When setting up the kiosk as part of their pop-up exhibit, facilitators have the power to configure which activities they think would best fit their audience and what they’re trying to achieve. These audiences are defined in the configuration file for each Program.

Label important.png


Adding Multimedia

Each Program contains its own directory to store media, which allows multiple activities within a Program to utilize the same multimedia assets.

Label important.png


Coding an Activity

Activities are created through easily customizable activity templates, called Activity Types. These activities are coded and stored as JSON files for use within CLIO. We provide word processor templates to assist with collaboration during the development and drafting process.

Label important.png


Updating Kiosk Content

Once you have created an interactive on your Local Web Development Environment, it will need to be installed onto a kiosk or live web server.


Live Facilitation

Configuring Facilitator Information

When used as a kiosk for pop-up events, the Facilitation menu can provides facilitators with quick references, such as program information, goals, objectives, and instructions. This information is stored as JSON within a Program folder.


Configuring Facilitator Discussions

Facilitator Discussions provide curated topics that can be used to prompt a conversation or answer a question from a participant.


Creating an Activity Type

All Activity Types are created using JavaScript. They are defined as a single function designed to load content from the configuration file and use it to set up the activity.  Each Activity Type will automatically load an HTML template into the container and apply a stylesheet to the page. Using JavaScript or jQuery events, you can manipulate these containers and styles.


Using CLIO Functions

There are several functions that have been created for use in the interface or other activity types that were included as part of the CLIO web application, making it so they can be integrated into new activity types.

Label important.png


Controlling Hardware

While running a web server locally on the hardware that is powering the CLIO exhibit, it is possible to control the hardware through the web application interface.  This should only be done when the web server is running on a kiosk that otherwise has no access to the internet. Hardware control can be achieved through a combination of JavaScript, PHP and Python scripting.   By using JavaScript and AJAX/AJAJ, we can asynchronously call a PHP script as part of an event or the initialization script of an activity type.  When this PHP script is called, it is used to run terminal commands or initialize a Python script stored locally on the hardware.  PHP and Python can be used to manipulate Raspberry Pi hardware, execute console commands or run prepared code to control lights, speakers or other electronics attached to a Raspberry Pi GPIO port.


Contribute

If you want to help contribute to CLIO, you've come to the right place. This is where we are trying to keep a living document based on CLIO and the way open-source technologies intersect with museums, libraries and cultural heritage centers. Sponsor us, add terms, update definitions, or provide language translations. Every little thing helps us to create a vibrant and open community geared towards one thing: equal access to technology, for everyone.

Label important.png