This may not seem like a big deal but it actually is.
Desktop Apps now recognize exports.conf so that the procs declared in there can be called from Javascript not only in Web/Mobile but Desktop too.
Any edits made to exports.conf are automatically recognized by Javascript in the Desktop App Builder.
What does this mean?
Well what it means is that validation can be fully tested on the desktop now without any need for time consuming test harnesses.
So... just to summarize.
You setup an exports.conf file as described in the doc.
https://www.lianja.com/doc/index.php/Exports.conf
Then in JavaScript you can call Lianja/VFP server-side procs/functions transparently. This provides a seamless integration of all the supported scripting languages with Javascript.
So code running on web/mobile can call server-side procs and functions and now the desktop javascript app that you are developing can also call these Lianja/VFP procs and functions. This simplifies testing and should remove any confusion about how to do remoting in Lianja Web and Mobile Apps.
Remember that when invoking remote procedures in the web/mobile client the server knows nothing about UI or data state. It is "stateless". What this means is that the server proc should open the database and tables that it needs. When testing in desktop the situation is different as the desktop app is stateful. It has the database open and possibly the tables in an active state.
So, as a best practice you should write any server side procs that work with data like this. e.g.
Code:
proc getBalance(database, table, args)
local result = 0
if not isServer()
push datasession
endif
open database &database
use &table
// Insert your code here to do what you need to do
use
close database
if not isServer()
pop datasession
endif
return result
endproc
Heres an example of integrating JavaScript and Lianja/VFP.
Bookmarks