-
Notifications
You must be signed in to change notification settings - Fork 4
QUICC Syntax
Quicc is a very/almost declarative syntax, procedural elements exist in the script of buttons or in-line SQL script code.
The syntax is designed to be compatible with SQL and HTML environments.
The .quicc file is a html file fragment, your application .quicc files wont have
<html><head></head><body>
tags as it is provided in the Framework (app.html in the case of UI1).
You can start your file with any HTML code such as
<div align="center"><h1>Hello world</h1></div>
.
Quicc uses <# ... /> to escape out of HTML mode (Similar to PHP that uses ... ?> or javascript that uses <script type="text/javascript" ....)
Alpha notice - we are working towards a simplified unified syntax for the following 2 types of statement.
The basic statement is a statement with some simple optional qualia effective only on that statement. whereas a complex statement is basic statement plus fields where each field has its own qualia and inherits qualia from the qualic context of the statement.
The basic statements have a simple ini style similar to normal HTML, key="value" where the quotes are optional for single word parameters for example a tab container is <#Container Style=Tab tab=Maintenance />
More complex statements (like table or model) use a relaxed JSON syntax staring with a #:, with optional quotes for keys, and mandatory quotes for all values except, a few key value short cuts (yes,no,y,n,A for Action ,E for Edit ,V for View, L for link H for Hide and T for Type).
In complex statements the SQL comment -- is used as a context switch between SQL code and Qualia.
Complex statement qualia that works on the statement is : --{json} Complex statement qualia that works on the field is : --:{name:"name",more json}
If the name field can be implied(extracted by the framework using regex) from the SQL code that precedes the -- then the field qualia will simply be --:{json}
Any simple statement can also be expressed (less elegantly ) in a complex statement syntax. for example <#:Container --{Style:"Tab",tab:"Maintenance"} />
#Summery The purpose of the syntax is to extract SQL statements,controls and their qualia from the html background.
#Special Qualia
Although most qualia is simply passed onto the HTML fragment / template engine, some Qualia have special meaning, and is interpreted either by the core of the compiler or by the widgets.
name is used as the statement or field name identifier
from is used in tables to indicate the context from which the qualia for the table should be inherited (often the same as the table name).
tablestyle used to style the tables..
if is used to effect conditional execution - see the flow control section
save is used to save a statement into the model for later and use is to use a previously saved statement.
class is to save a qualic field class and as is to use a field class
when and execute is not used explicitly, it is used internally in procedural buttons.
Action and Type (and their short cuts A and T) are used in the element widget.
onupdate sets an assignment sequence that should be executed whenever another field is updated, almost like a "mini" trigger.
autoinsert used by the table widget to add a "new" record editing facility to a normal table.
Async is used by the back-end node server(and probably in future others) to pass and translate field names to the AXAJ binary upload/download API.
widget is used on advanced widgets that operate on more than one field, to translate the widget field name to the table column.
##common qualia names the following names are often used for conventional purpose in the default UI
autosave to save a change on a field immediately to the database, this looks cool, but is not efficient if you expect huge traffic on your site.
title the display name for a field, normally a decorated field name is used if not specified.
width and height is the HTML width and height properties
length and max_length limits the input box side and number of characters.