Debug log:

 
                                

XFA-introduction

MINIMIZE THE CODING

In the beginning there were opcodes. Then came compilers. Readable code. Loops. Conditions. How.

Major platforms of today, JAVA/.NET are really based on the same idea, just with a bigger footprint. Still.lots.of.code.even.for.trivial.stuff();

LET's IMAGINE...

Imagine being able to get the application you want, without having to code... That's what fastaphi and the XFA-files are about. Describing WHAT you want, rather than HOW. They are XML-files with a twist, describing the system you want by invoking libraries and at the same time being able to blend in raw code and comments. Bending some of the XML-rules allows for a great way to design applications.

WEB FORM EXAMPLE (Simplified)

<xml_fa>
  <content type="html5/form">
    <form table="items" id="ItemID" navigator="yes">
      <textbox name="ItemName" width="200" label="Item name:">
      <image name="ItemImage" size="800*800" mode="crop" tsize="100*100" add="yes"/>
#ok, we really should have some more fields, but this is a simple example.
#yes, comments are allowed like this, ;)
      <subform table="itemassembly" parentid="ItemID" id="ItemDetailID">
#oh, we just added a subform. Tie details to the Item
#an ajax-combo-box, just works... (and break the row with the \)
        <combolookup name="ItemDetailID" label="Detail no:" sql="select ItemDetailID,\
        DetailNo from itemdetails where DetailNo like '%1'"/>
        <textbox name="Qty" label="Qty" />
      </subform>
      <formbuttons>
        <fbutton cmd="update" />
#now check this.. Raw code, replacing model-based overdesign!
<raw type="php">
if ($_SESSION['userInfo']['isAdmin']) $this->scriptVars['okToAdd'] = true;
</raw>
#Now let's use that..
        <access check="$$scriptVars|okToAdd$$">
          <fbutton cmd="add" />
#use the same rule for delete..
          <fbutton cmd="delete" />
        </access>
      </formbuttons>
    </form>
  </content>
</xml_fa>

Can you imagine it? Can you see its possibilites? Then fastaphi is for you.

PDF-REPORT (SIMPLIFIED)

<xml_fa>
  <content type="pdf/report" size="A4" orientation="portrait" target="browser">
    <header>
      <setfont font="Arial" size="30"/>
      <cell text="Report">
    </header>
#here we go, just get data...
    <loop name="main" sql="select Name,PhoneNo,Email from clients">
      <page>
        <listbox>
          <listboxcol label="Name" width="200" value="$$loop|main|Name$$" />
          <listboxcol label="Telephone" width="200" ....
# etc
      </page>
    </loop>
  </content>
</xml_fa>

 

Or if we stretch our minds:

NATIVE APP

<xml_fa>
  <content-type="mobile/app" targets="android,ios10,windows10" autopublish="no" name="Fantasy App">
    <view type="splash">
      <image src="splash-image.jpg"/>
      <getjson src="https://some-amazon-stuff" onsuccess="goView:main" \
        timeout="5" onfailure="goView:nonet"/>
    </view>
    <view name="nonet" align="center">
#h1 gets translated to native equiv..
      <h1>No internet...</h1>
      <button value="Try again" onclick="goView:splash"/>
    </view>
    <view name="mainmenu">
      ....
    </view>
  </app>
</xml>

And upon request, this file generates three apps, all native.  No messing around with fragmentation, IDE's, SDK's, Cordova etc. Imagine the power of simplicity.