Name | Modified | Size | Downloads / Week |
---|---|---|---|
Parent folder | |||
clientapi.js | 2010-11-26 | 6.2 kB | |
readme.txt | 2010-11-26 | 2.5 kB | |
serverapi.php | 2010-11-26 | 1.2 kB | |
Totals: 3 Items | 9.9 kB | 0 |
************************************************* * SNCL - Simple Network Communications Language * ************************************************* * Developed by Gabriel Kimmel, 2010. * ************************************************* * RELEASE 1.01 * ************************************************* ************* 1. About SNCL ************* SNCL is one of the simplest and fastest data interchange languages especially created for internet usage. Though it's no full alternative to XML or JSON, it's faster and is perfect for simple communication where speed plays a key role especially on the internet, used as data interchange medium for AJAX. ********* 2. Syntax ********* SNCL 1.00 uses two data structures, "simple" and "complex". Both of these structures have an additional title, wich helps to indentify the incoming data. SMCL has no types wich means every structure can hold any type of data (integers, string, etc.) Syntax of the structures is the following: [LEADING CHARACTER]TITLE [DATA CHARACTER]DATA [END CHARACTER] The leading character helps to identify the type of the structure. The data and end character are always the same. An example for a simple data structure: =example :data . The leading character for simple data structures is "=" (equalation). Another example for the compley structure: _example :data1 :data2 :data3 . For complex structures, leading character is "_". As you can see the data character is always ":" (double period) and the end character is "." (period). *************** 3. The SNCL API *************** The API has two main parts, the Client API and the Server API. Both are a collection of functions to parse SNCL data. The Server API is written in PHP and has only two functions avaiable up to date: void simpledata(title, data) -> echoes the SNCL text to screen void complexdata(title, data) -> just as above, but notice that data is an array! The Client API is written in Javascript and has the following functions: string getTitle(rawdata) -> gets the title of the data structure int getDataType(rawdata) -> gets the type of the structure (1 - simple; 2 - complex) int getDataLength(rawdata) -> gets the length of a data structure string getSimpleData(rawdata) -> gets data from simple data structure string getComplexData(rawdata) -> gets data from complex structure (note it's a returned array!)