NonDesktop apps

Posted: 2017-01-20 in NonDesktop

For Web/tablet/mobile, delegates should be written in JavaScript. For desktop Apps, they can be JavaScript, Lianja/VFP, PHP or Python.

Where is the generated index.html?
Web Apps are deployed to C:\Lianja\cloudserver\tenants\public\wwwroot\apps\
Desktop Apps to C:\Lianja\cloudserver\tenants\public\apps\

Assuming you’ve installed on C:, the database goes into its own folder in C:\Lianja\cloudserver\tenants\public\data,
the App goes into its own folder in C:\Lianja\cloudserver\tenants\public\wwwroot\,
Library files go into C:\Lianja\cloudserver\tenants\public\wwwroot\libra ry.
The App should include the generated index.html file.
For any prg files – you should copy the .dbo (pcompiled) version.

Lianja Cloud Server is the server for Cloud/Web Apps running in the Lianja Web/Mobile client, OData and WebSocket Services and Dynamic Page Services (rsp/jssp pages).
Lianja SQL Server is the server for third party clients using the Lianja ODBC Driver to access Lianja data.

When you purchase the Lianja Cloud Server, you also get the Lianja SQL Server too.

in v1.3 any grid section filters that have {…} macros in them, these are expanded at the time of refreshing the grid.
This basically means that the filter itself is dynamically evaluated at the time the grid is refreshed. This works in all views; desktop, web and mobile.

in order to build and properly test native iOS Apps, this requires a Mac. There is no other solution as the tools required to build the native App are part of Apples Xcode toolchain and these only run on a Mac.

Native Android Apps on the other hand can be built and tested on Windows, Mac or Linux as the Android SDK runs in all of these operating systems.

Apache Cordova (latest version is 4.0) directly into the Lianja App Builder to facilitate building and testing native mobile Business Apps right inside the App Builder.

_screen is VFP desktop specific and does not exist in the web client.

As we start to look at porting our legacy APP or simply rebuilding it from scratch we will be endeavoring to use “best practices” and “No Code” where possible (albeit your Dev Team). As our development must be fast tracked we have a slight fear of creating & supporting Javascript for a Web deployment, (or creating anything meaningful in Javascript at all!).
A compiler out to pure Javascript harnessing “built-in functions in the Lianja Web Framework” as you say I think would be awesome. Writing a function in VFP and compiling out to Jscript would be a valuable tool to our Company. Lots of new guests on this forum as you are aware post about “why grids and forms” appear blank when testing under tablet or mobile.
When you said “providing the equivalent of the Lianja desktop client running native in tablets and phones” – what does this mean to the Developer?
It means you will be able to write tablet and phone apps in Lianja/VFP. The database and scripting engine will be ported to android and iOS (subject to apple approval).
With all of the built-in Lianja/VFP functions (including createObject(), addObject() etc) in JavaScript the code looks very similar to what you are used to.
In Lianja/VFP
private obj
obj = createObject(“textbox”)
obj.backcolor = “pink”
obj.text = upper(“Hello world”)
In JavaScript
var obj;
obj = createObject(“textbox”);
obj.backcolor = “pink”;
obj.text = upper(“Hello world”);
And yes, by following best practices and using NoCode as much as possible it will reduce your code maintenance as the framework handles a lot of it.

With our understanding of “Lianja HTML5 Client” – Delegates:
In Web and Mobile Apps these delegates need to be written in JavaScript — the language of the browser.…tml5-client#p2
A really cool feature would be to provide a compiler from VFP code to compatible JavaScript code. Therefore a Desktop App can be used to build the Tablet or Mobile page which in turn are compiled out to pure JavaScript! A sensational feature to capture a much wider audience, assisting developers in having a better understanding of JavaScript, and encouraging the shift into Cloud Services.
A similar product claiming to be the alternative to the end of product life for VFP has included such a compiler but compiles out to its native language.
Building Web / Mobile Apps requires a traditional client / server design approach.
What at we have done is provide the equivalent of the VFP base classes and many of the VFP built-in functions in the Lianja Web Framework. This allows you to create objects, call their methods and get/set their properties just as you would in VFP, albeit in javascript.
Everthing in Lianja revolves around the Lianja Object Model and ART (Actions, Rules and Transitions).
All data processing (CRUD operations) is performed on the server.
You can use Lianja.evaluate() in javascript to call server side procedures that are all written in VFP.
During the course of next year we will be providing the equivalent of the Lianja desktop client running native in tablets and phones. That is the next phase of our development.

I configured Lianja extension in IIS(7.5). I can login via a web browser using http://localhost/ortno/login.rsp where portno is 8001 but unable to login though default port 80. How can I login with htt://localhost/login.rsp ? What settings are required ?
If you have correctly configured the IIS extension as per the doc wiki then you do not need to specify a port number. You also need to disable port 80 in the lianja server settings so it does not interfere with IIS. This is the default after installation.

I build a test app by following the instructions in “Getting started 1” example. The application has customers detail related to orders grid section and order_details grid section, tables from southwind database. The app is working with related data correctly in development mode but in web view related grids for orders and order_details are not shown. How can I display these related grid sections in order app modes like web / tablet view?
You need to deploy your database that your web app uses.
?if you have any code in your app, it has to be written using Javascript to run in web/mobile.
This will be so until we get Native Apps (on the roadmap for next year), which VFP code will be able to be used.

1. Lianja.evaluate/execute() can be called from javascript delegates and will execute server-side VFP code only.
2. Lianja.execPHP/execJavaScript() can execute library functions in those languages, where the library has been loaded with loadLibrary().
For (2) above though, it seems that Lianja.execXX only works when called from VFP and fails in javascript/php delegates, so:
JavaScript delegate -> VFP server = OK
VFP delegate -> JavaScript server = OK
Javascript delegate-> JavaScript server = NOT OK
server-side PHP and Python support is scheduled for Cloud Server 1.5.
When this is released you will have several new client-side methods available.
JavaScript is already built into the Cloud Server (Google v8 engine) and can be used to generate dynamic content with .jssp pages.
i will add a new method in v1.5 to simplify calling server-side JavaScript functions.
My intention is to add some new App setting attributes “References” which is a ; separated list of custom libraries that will be loaded automatically for you when a connection is made and the App is loaded. Same will happen in a desktop App.

you can read the code for the “User Registration Form” which shows you how to handle custom client/server calls i.e.
JavaScript client –> Lianja/VFP server side procedures.
In *most* cases you do not need to build any “Custom” or “Canvas” sections.
The following standard sections are already supported in the Web Client.
– Form
– Grid
– Attachments
– WebView
– Image Strip
– TabView
– Canvas (JavaScript)
– CatalogView
– Custom (JavaScript)
– Report
– Calendar
– Charts
These sections are all data bound. There is no special code to write to display and edit your data.

Delegates can be written in any of the supported scripting languages.
“Expressions” in the attributes need to be written in the language of the database engine, just as you would in any database e.g. MSSQL, MySQL, Oracle etc. They all have their own “scripting language”.
The Lianja/VFP scripting language sits on top of all of these and provides a common language that can be used against any data source.
1. Write a JavaScript library.
2. Load it in the load/ready delegate.
3. Now you call call your functions.
result = execJavaScript(“myfunc()”)

This works the same with .php files or .py files too.
result = execPHP(“myfunc()”)
result = execPython(“myfunc()”)

Lianja will marshall the result of the function call between the various scripting languages.
In v1.2.4 the library filename can be prefixed with lib:/ or app:/ to load from the library directory or the app directory.
When adding Javascript libraries into a Web App you specify the script tags in the “Include in HTML HEAD” file which you can edit in the App Settings by clicking the “…”.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s