| 1 | == Flash Apps Developer API == |
| 2 | |
| 3 | |
| 4 | === Introduction === |
| 5 | |
| 6 | Ray Base is a general and simplified Administration panel which gives the ability to manage widgets, from purchasing to setting up the widget functions for your site members. |
| 7 | While Ray widgets make a site more usable, interesting and functional, for developers they introduce a rich new |
| 8 | development environment. Widgets provide an excellent way to add functionality to an existing application. This means there are many opportunities for developers, whether creating new products, or adding market-differentiating value to an existing one. This document will help you to understand how you can create your own widget and which general steps, structure and folders the widget should include. |
| 9 | |
| 10 | |
| 11 | === Understanding Widgets === |
| 12 | |
| 13 | Any application for a community site that works via Ray Base, uses Flash or any Desktop application file and may be installed/enabled/disabled via Ray Base is considered a Ray Widget. Ray Widgets can use development platforms, |
| 14 | such as Flash for web applications or any Development Environment for desktop applications. Since Ray is a |
| 15 | "Community Widget Suite" all widgets should be community-oriented and/or should provide communication and |
| 16 | multimedia functionality to community site members. |
| 17 | |
| 18 | |
| 19 | === Ray Architecture === |
| 20 | |
| 21 | '''*XML Server (XMLS)''' - set of methods that handle clients queries and return XML replies |
| 22 | |
| 23 | '''*Ray !MultiMedia Server (RMS)''' - red5 based multimedia server for live audio/video broadcasting, messaging |
| 24 | etc. |
| 25 | |
| 26 | |
| 27 | === Widget Architecture === |
| 28 | |
| 29 | Every widget is a package (folder) that contains a standard set of folders and files. The package name is the system name of this widget. It contains the following folders: |
| 30 | |
| 31 | '''app''' - applications (flash or desktop). |
| 32 | |
| 33 | '''data''' - any media files. You must have the "preview.jpg" file in this folder small icon of your widget with 130x130 px size. |
| 34 | |
| 35 | '''inc''' - contains the following files: |
| 36 | |
| 37 | '''actions.inc.php*''' - defines all server methods, called by your application. |
| 38 | |
| 39 | '''constants.inc.php*''' - contains your widget and all flash applications information. |
| 40 | |
| 41 | '''customFunctions.inc.php*''' - contains functions necessary for widget integration in a script. If it doesn't require any integratable functions this file should be empty. |
| 42 | |
| 43 | '''functions.inc.php*''' - contains any other functions that don't concern integration. |
| 44 | |
| 45 | '''header.inc.php*''' - contains any variables rarely or never reset, but necessary for widget work. |
| 46 | |
| 47 | '''xmlTemplates.inc.php*''' - contains XML-replies templates. |
| 48 | |
| 49 | '''install''' -contains files necessary for this widget installation - '''install.sql''' with database queries and '''install.xml''', containing installation algorithm. |
| 50 | |
| 51 | '''js''' - contains all javascript code necessary for this widget. |
| 52 | |
| 53 | '''langs''' - contains language files for this widget, if there are any. |
| 54 | |
| 55 | '''skins''' - contains skin files for this widget, if there are any. |
| 56 | |
| 57 | '''xml''' - contains additional xml-files for this widget, if there are any, and three necessary files: '''main.xml''', '''settings.xml''' and '''config.xml'''. |
| 58 | |
| 59 | |
| 60 | Now that you have examined some basic theoretical definitions and structure we are moving forward [wiki:CreateWidget to the part telling us how to create your own Widget]. |