Xanadu Notes

  1. 5 months ago

    Hal G

    Jun 1 Pre-Release Testers, Xojo Pro, XDC Speakers Orlando, FL

    This thread is to share notes and information about Xanadu https://campsoftware.com/products/xanadu-for-xojo.php which uses Xojo and Aloe https://aloe.zone/ to develop Web Apps.

    Feel free to ask questions!

  2. Hal G

    Jun 1 Pre-Release Testers, Xojo Pro, XDC Speakers Orlando, FL
    Edited 5 months ago

    Been working on a huge Xanadu update based on comments and ideas from the #Xojo #XDC2018. Here’s how we’re using https://querybuilder.js.org to create a fantastic find form which is configured to use Aloe’s Mustache-Like Templates! https://aloe.zone/resources/docs/classes.html#ts10

    Here's a short video to show how the Module Find works. Note how it remembers the last Find to make it easy to tweak the Find.

    -image-

  3. Hal G

    Jun 1 Pre-Release Testers, Xojo Pro, XDC Speakers Orlando, FL

    Was playing with CSS Transitions in Xanadu. It’s subtle but better than a flicker.

    Javascript to Set the CSS
    -image-

    With a .2s Transition
    -image-

  4. 4 months ago

    Hal G

    Jun 11 Pre-Release Testers, Xojo Pro, XDC Speakers Orlando, FL

    Hope to have an update for Xanadu out in a few weeks. :) Since XDC, I've been working on a change to how pages are defined.

    • At XDC, if you wanted to add a database column to the page, you'd update the code and recompile.
    • Since XDC, I have Aloe Template rocking. To add a database column to the page, you'd edit the template text file without having to recompile!

    The stucture of the templates is simple. The Page Template text file which defines the structure of the page which has Snippets ( Snips ) defined which are loaded from the Snips Template. Field calculations are done in Xojo code which means it would need to be recompiled to change. You could use javascript to update values too.

    The first Snips Template I created was for the Products table which only has three fields. The second Snips Template I created was for Orders which as a few more fields than Products, but it also has a portal aka 'related records' for the Order's Line Items. I created both the Products and Order Snips Templates by hand.

    This week, I plan to create a Snips Template Generator. I found that creating the Snips Templates by hand was simple but just like coding, everything has to be just right which is tricky to do by hand. The Snips Template Generator will start by showing you all the tables in your SQL database and let you choose which Table should be the one for the List Table as well as the Detail Tables to show to edit the Primary and Related tables.

    I'm really excited to get the Snips Template Generator out of my head and into Xojo! Here's a portion of the Orders Snips Template file...

    <!-- //////////////////////////// SETTINGS /////////////////////////////// -->
    
    
    <!-- <#Snip-Settings> -->
    <settings-json>{ 
    
    	"NewSessionID": "Yes", 
    	"AuthRememberPath": "Yes", 
    	"AuthRedirect": "/login", 
    
    	"TableList-TableName": "Orders",
    	"TableList-SortBy": "Orders.OrderDate",
    	"TableList-SortDirection": "DESC",
    	"TableList-Join": "INNER JOIN OrdersItems ON Orders.UUIDOrders = OrdersItems.UUIDOrders",
    	
    	"Table-0001-TableName": "Orders",
    	"Table-0001-OrderBy": "",
    	"Table-0001-Join": "",
    	"Table-0001-Where": "Orders.UUIDOrders = ?",
    	"Table-0001-Where-0001": "RequestKey",
    	
    	"Table-0002-TableName": "OrdersItems",
    	"Table-0002-OrderBy": "OrdersItems.Name ASC, OrdersItems.Description ASC",
    	"Table-0002-Join": "",
    	"Table-0002-Where": "OrdersItems.UUIDOrders = ?",
    	"Table-0002-Where-0001": "RequestKey"
    	
    }</settings-json>
    <!-- </Snip-Settings> -->
    
    
    <!-- //////////////////////////// List /////////////////////////////// -->
    
    
    <!-- <#Snip-ListNavTitle> -->
    <i class="{{List.FontAwesome}}"></i>{{List.NamePlural}} [ {{List.FoundCount}} ]
    <!-- </Snip-ListNavTitle> -->
    
    <!-- <#Snip-ListRecords> -->
    <!-- {{#ListRecords}} -->
    <tr><td class="p-0 text-dark border-bottom border-primary">
    	<a class="nav-link text-dark" href="{{List.RequestPathBase}}{{ListRecords.UUIDOrders}}">
    		<span id="ListItem{{ListRecords.UUIDOrders}}" class='nav-link-text'>{{ListRecords.OrderDate}}, #{{ListRecords.OrderNum}}, {{ListRecords.Total}},<br />
    		{{ListRecords.NameCompany}}, {{ListRecords.NameFirst}} {{ListRecords.NameLast}}</span>
    	</a>
    </td></tr>
    <!-- {{/ListRecords}} -->
    <!-- </Snip-ListRecords> -->
  5. Hal G

    Jun 15 Pre-Release Testers, Xojo Pro, XDC Speakers Orlando, FL

    The Snips Template Generator is coming along nicely, now called Zeus. The Form is close to complete. Next step is to write the Xojo code that writes out the Snips for the Template referenced above. The Comment column grabs the MySQL Column Comment. I plan to store structured data like the Formatting in the Column Comment. I bet other info will end up there too.

    <format>Money</format>

    If this works out, Xanadu will be able to add a new Module on a List / Detail page with Portals ( related records ) in a few minutes. :)

    Video
    http://campsoftware.com/files/xanadu/2018-06-15-Xan-Zeus.mp4

    Image
    -image-

  6. Hal G

    Jun 22 Pre-Release Testers, Xojo Pro, XDC Speakers Orlando, FL

    More Progress! Updated the Xanadu Zeus interface a bit. It's auto generates everything in the Zeus window. Now it used the SQL Type to calculate the Basic Type which is then used to calc the Control Type unless there is an override in the SQL comment. Further below you can see the how much of the Snips Template that Zeus is generating!

    -image-

    -image-

    -image-

  7. Hal G

    Jun 26 Pre-Release Testers, Xojo Pro, XDC Speakers Orlando, FL

    Whoohooo! Zeus generated its first module ( I wrote NO code by hand ) which you can see below as well as the Zeus Form further below! Need to do a code review and be able to break up the primary table fields into separate rounded rects aka 'stages'. :) Planning to made a video how it works later this week and hope to release in July once Xanadu is using Zeus forms...

    Contacts Module
    -image-

    Zeus Form to Generate Contacts Module
    -image-

  8. Hal G

    Jun 29 Pre-Release Testers, Xojo Pro, XDC Speakers Orlando, FL

    @Hal G Planning to made a video how it works later this week

    Here's how Zeus works. I explain how to generate and then load a Contacts Module.
    Zeus: Module Generator for Xanadu

  9. Hal G

    Jun 29 Pre-Release Testers, Xojo Pro, XDC Speakers Orlando, FL

    How FileMaker greed and deprecations inspired Xanadu and Zeus:
    https://forum.xojo.com/48455-switching-from-filemaker/0#p394153

  10. Hal G

    Jun 29 Pre-Release Testers, Xojo Pro, XDC Speakers Orlando, FL

    Just added:

    • The ability to have the Primary Table be split into separate Groups of Fields aka Stages as defined by the Stage Postion shown in the second picture.
    • The Column Label now automatically takes the database column name like "FollowUpAction" and adds spacing like "Follow Up Action" and auto capaitalizes the first char in case the column name is like "followUpAction".

    If you scroll up, you can see the 'before' pic. Just a have a couple of things to finish and then I'll send out the update to everyone who registered! Hopefully next week.

    Contacts Module with more than one Stage for Contacts Columns
    -image-

    Added Stage Position for each Column
    -image-

  11. 2 months ago

    Hal G

    Aug 9 Pre-Release Testers, Xojo Pro, XDC Speakers Orlando, FL

    Xanadu has evolved quite a bit:

    • Xojo Web Web Framework 1.0 App.
    • Xojo Web Web Framework 1.0 App using Aloe.
    • Xojo Console App using Aloe + Zeus which generates Xanadu Modues.

    Last week, I started on a change in direction where Xanadu will become a php App.

    Looking back, Xanadu was basically becoming a php like app. The Xanadu Contacts Module was a html template with an external file that contained data to be merged into the html template. Xojo and Aloe was used to read the template and the external file, perform the sql queries and send the user a complete html file. Zeus was also included in the Xojo and Aloe which saved the external file with the relevant data for the module.

    Xanadu PHP will be a but different, but the result will be similar. The Xanadu Contacts Module will be a php page that queries the database using php code. The php page for the Module will be self contained, except for files included via php for common elements. Zeus will be a Xojo Web Web Framework 1.0 App or hopefully at Xojo Web Web Framework 2.0 App depending on when Xojo ships it. Either way, Zeus will be changed to export Modules as php pages.

    I haven't used php in a long time, but it's refreshing to see how similar it is to Xojo!

    Once Xanadu PHP and Zeus for Xanadu is rocking, we'll release it to everyone who has registered!

or Sign Up to reply!