Download Latest Version SNCL_1.02.zip (3.1 kB)
Email in envelope

Get an email when there's a new version of SNCL - Simple Network Communication Lang

Home / 1.02
Name Modified Size InfoDownloads / Week
Parent folder
SNCL_1.02.zip 2010-11-28 3.1 kB
readme.txt 2010-11-28 2.7 kB
serverapi.php 2010-11-28 1.2 kB
clientapi.js 2010-11-28 7.1 kB
Totals: 4 Items   14.0 kB 1
*************************************************
* SNCL - Simple Network Communications Language *
*************************************************
* Developed by Gabriel Kimmel, 2010.            *
*************************************************
* RELEASE 1.02                                  *
*************************************************

*************
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!)
string snclToXml(rawdata)	->	converts sncl to xml
					(parent node is the title, child nodes
					are VALUEN and the value is the data)
Source: readme.txt, updated 2010-11-28