Sporkl Overview


Sporkl is a server-side compiled web application language developed by Sporkforge.com.

Sporkl was designed to be a simple programming language, with syntax that looks familiar to those with experience in other programming languages. Unfortunately, many features that qualify languages as "powerful" or "modern" are absent. For example, the following are not currently supported:

However, Sporkl has sufficient functionality to support the implementation of many interesting and useful web applications. See the list of basic examples on the SporkApp Builder page.

The basic structure of a Sporkl program is straightforward and recognizable, and best illustrated with an example. Note that to run a Sporkl program, it must first be compiled. You can give this example a spin by compiling it in the SporkApp Builder page:

/* Hello User example */

print("Greetings human.\n\n");
print("Please enter your name: ");

input i = print_input_field(10,10,"");

print_input_button("Go",0);

load_user_input();

string name = input_value(i);

print("Welcome, " + name + "!\n");

This simple example demonstrates how to write to output and get user input. The program flow starts at the top and proceeds uninterrupted until it gets to the "load_user_input()" step, where it suspends execution and sends the output up to that point back to the user's browser.

When the user presses the "Go" button (named as such in the print_input_button(..) step), the form data (containing the name entered in the form box displayed in the print_input_field(..) step) is sent to the server, screen output is cleared, and program execution resumes.

As stated above, Sporkl programs are compiled, then run. Sporkl programs may be compiled in the SporkApp Builder page, so you can try the above program there. There are also other examples and links on that page to use as a reference.




( <-- Back to Sporkl documentation home )




sporkforge