A string or a number is simply echoed:
[//] "Hello World";
"Hello World";
Regular arithmetic calculations are supported:
[//] 3 + 5;
8;
Data is constructed by using a built-in operator create:
[//] create John salary = 1000;
[//] create Dave salary = 2000;
Queries on entered data are available immediately:
[//] John salary;
1000;
[//] John salary + Dave salary;
3000;
[//] select $person, $person salary where $person salary >=1000;
John, 1000
Dave, 2000;
Business logic (or infinite data) is stored as data as well:
[//] create tax $money = ($money * 0.3);
[//] select $person, $person salary, tax ($person salary)
where $person salary >= 100;
John, 1000, 300
Dave, 2000, 600;
Another example of business logic - a factorial function:
[//] create fac 0 = 1;
[//] create fac $n:[$n > 0] = ($n * (fac ($n - 1)));
[//] fac 4;
24;
A set of built-in operators are applicable to Froglingo data. They are more powerful than those existed in the traditional DBMSs such as SQL. Queries against a directed graph is a typical example:
[//] create A; /* define a vertex 'A' */
[//] create B; /* define a vertex 'B' */
[//] create C; /* define a vertex 'C' */
[//] create A B = B; /* define a directed connection A -> B */
[//] create B C = C; /* define a directed connection B -> C */
Query: Is there a path from vertices A to C?
[//] A >=+ C;
true;
Froglingo manages files and a HTML file can be embedded with Froglingo expressions. Suppose there is a file named myprofile.html and the content is:
<frog> $name </frog> <!-- a parameter passing through the file -->
<html>
<body background="photo.jpg">
My name is
<frog> $name </frog>
and my salary is
<frog> $name salary </frog>
</body>
</html>
It can be loaded by using load command:
[//] load myprofile.html;
The data entered to Froglingo database is not shared with anyone else unless you explicitly granted permission to other users. The first step is to setup a multi-user environment by giving a password to you as the root user and then by adding additional users:
[//] passwd;
New Passwd: ******
Confirm Passwd: ******
Now you are acting as the most privileged user
//
, and you are ready to create additional user accounts:
[//] addusr john;
The passwd is: un@Ik8l2
[//] addusr www.myclienta.com;
The passwd is: kkjkadsf
[//] quit;
The last command
quit
terminates the Froglingo process. Now you may login again with a different user account.
C:\Froglingo\frog.exe
User Id: www.myclienta.com
Passwd: ********
Confirm passwd: ********
[//www.myclienta.com]
Under the stand
//www.myclienta.com
, you are ready to construct your business application.
Here are links to sample applications in Froglingo:
Case Study 1: College Student Registration
Case Study 2: Communications Between Community, Sales, and
Shipping organizations
Case Study 3: A Web Console
Case Study 4: Froglingo
Implementation of Dijkastra Shortest Path Algorithm
Case Study 5: Chef Froglingo
Case Study 6: Froglingo system demo in RuleML 2010 Challenge
|