Discussion Topics > Script BASIC

ScriptBasic HTML Extension Module

(1/1)

John Spikowski:
I've started work on a new extension module for the Business Application Server. (BAS)  The goal of the HTML extension module is to render HTML/JavaScript-AJAX/CSS page elements as extension module method calls and property settings. I'm going to use the IUP design concept for container and control rendering. This will allow desktop BASIC programmers to create browser applications with little knowledge of web programming.

I'm happy to report that the ScriptBasic COM extension module works great with the application server. You just can't instantiate any Windows UI components. (warning but obvious) It seems to work fine with BOI. Here is an example.


--- Code: Script BASIC ---' BOI Customer Contact - Web Page IMPORT cgi.sbiIMPORT com.sbi cgi::Header 200,"text/html"cgi::FinishHeader PRINT """<html><header><title>ScriptBasic 100 BOI</title></header><body><table><center><h1>ABC - Customer Contacts</h1></center><table style="width:100%">  <tr>    <th>Customer Number</th>    <th>Company Name</th>    <th>Phone Number</th>  </tr>""" oscript = COM::CREATE(:SET, "ProvideX.Script")COM::CBN oScript, "Init", :CALL, "C:\\Sage\\Sage 100 Standard\\MAS90\\Home"osession = COM::CBN(oscript, "NewObject", :SET, "SY_Session")COM::CBN osession, "nSetUser", :CALL, "USER", "PASSWORD"COM::CBN osession, "nsetcompany", :CALL, "ABC"COM::CBN osession, "nSetDate", :CALL, "A/R", "20210722"COM::CBN osession, "nSetModule", :CALL, "A/R"ocust = COM::CBN(oscript, "NewObject", :SET, "AR_Customer_svc",  osession) COM::CBN ocust,"nMoveFirst"DO UNTIL COM::CBN(ocust, "nEOF", :GET)  PRINT "  <tr>\n"  PRINT "    <td>", COM::CBN(ocust, "sARDIVISIONNO", :GET), "-", COM::CBN(ocust, "sCUSTOMERNO", :GET), "</td>\n"  PRINT "    <td>", COM::CBN(ocust, "sCUSTOMERNAME", :GET), "</td>\n"  PRINT "    <td>", COM::CBN(ocust, "sTELEPHONENO", :GET), "</td>\n"  COM::CBN ocust, "nMoveNext"  PRINT "  </tr>\n"LOOP PRINT """</table></body></html>""" COM::CBN ocust, "DropObject"COM::RELEASE ocustCOM::CBN osession, "DropObject"COM::RELEASE osessionCOM::RELEASE oscript 

Stay tuned, more to come.

John Spikowski:
I found a nice JQuery and Bootstap JavaScript routine to create resizable and moveable popup forms. I plan to used this with my ScriptBasic HTML extension module to create popup modal dialogs for functions like look-ups and previews.

I really like the Bootstrap framework for building form based browser applications. The library touts mobile first as their motto.

I'm looking forward to see if I can get Sage 100 working as a browser application using BOI and eliminating NOMADS.

Example  (right click / view source) to see how it's done.

I need to add an extension to Bootstrap to allow this to work on a phone. I'll update the example soon.


John Spikowski:
I found a great open source Bootstrap theme I plan to base the NOMADS replacement on.  Check out the menu options to show the interface components. Try it on your PC and phone.


--- Quote ---Bootstrap is the most popular HTML, CSS, and JS framework for developing responsive, mobile first projects on the web.

--- End quote ---

Bootstrap was developed and being used by Twitter.

FYI Bootstrap 5 > no longer requires jQuery as a dependency. Using one framework makes my encapsulation much easier. 

Bootstrap Spur Demo



Navigation

[0] Message Index

Go to full version