CORA - write applications for CorneliOS




Documentation > Develop with and for CorneliOS > CORA - write applications for CorneliOS


CORA is the "CorneliOS Runtime for Applications", it allows to create apps that will run inside the CorneliOS system.

Location


/app/cora - contains applications that shipped with the system
/app/dev/cora - contains applications being built by users
/app/local/cora - contains applications installed by users


Applications installed by system users will be placed into /app/local/cora. Don't put your own apps into /app/cora, they may be removed when running the system updater!

Structure


CorneliOS applications are basically small websites that are being transformed into apps by the CORA runtime (/cgi-bin/cora.pl):

/app/local/cora/example - a CORA/CorneliOS application called "example"

/app/local/cora/example/cora.xml - a CORA/CorneliOS application called "example"
/app/local/cora/example/index.shtml - will launch http://www.example.com/app/local/cora/example/
/app/local/cora/example/src - application files and directories


/app/local/cora/example/src/images - custom images that cannot be found in /csr/images/
/app/local/cora/example/src/javascript - custom javascript files that cannot be found in /csr/javascript
/app/local/cora/example/src/screens - the application screens


/app/local/cora/example/src/screens/index.html - the main application screen

The cora.xml file


The cora.xml file is required to run a CORA application.

<?xml version="1.0" ?>
   <cora>
      <info>
         <name>Example</name>
         <author>John Doe</author>
      </info>
      <access>
         <allow value="users" />
      </access>
   </cora>


The cora.xml file can also be used to define menus and other basic application features:

<?xml version="1.0" ?>
   <cora>
      <info>
         <name>Example</name>
         <author>John Doe</author>
      </info>
      <access>
         <allow value="users" />
      </access>
      <menus>
         <menu name="menu.app" action="menu.app">
            <item name="menu.app.about" action="popup.about" />
            <item name="menu.app.prefs" action="screen.prefs" />
            <item name="menu.app.quit" action="function.quit" />
         </menu>
      </menus>
      <popups>
      </popups>
      <functions>
      </functions>
   </cora>


Application screens


Application screens are HTML files. You can use HTML code as well as CornelioSCRIPT, ExtHTML and BBCode. We stronly recommend to implement all links using CornelioSCRIPT to make sure the session management will work correctly. Use ExtHTML to create the page layout.

/app/local/cora/example/src/screens/index.html - the main application screen
/app/local/cora/example/src/screens/second/index.html - another application screen
/app/local/cora/example/src/screens/third/index.html - yet another application screen


CorneliOS application handlers can be implemented using the CornelioSCRIPT "system" command.


Working with CorneliOS


Installation and Administration


Develop with and for CorneliOS






(c)2006-2010 The CorneliOS Web OS Project | Privacy Policy | Sitemap | Contact Us
AddThis Social Bookmark Button
OverviewDownloadsDocumentationCommunityDevelopersShop