Difference between revisions of "Category:Lianja Cloud Server"

From Lianjapedia
Jump to: navigation, search
(exports.conf)
 
(92 intermediate revisions by 2 users not shown)
Line 6: Line 6:
 
==Introduction==
 
==Introduction==
  
The "Lianja Apps Platform" abbreviated to "Lianja APaaS" consists of the following products which can be bought individually or altogether as a "Lianja APaaS subscription".
+
The Lianja Cloud Server provides a wide range of features.
  
The Lianja APaaS consists of:
+
Key features:
  
* [http://www.lianja.com/overview/lianja-app-builder Lianja App Builder]
+
* Provides secure Web and Mobile App deployment of Apps developed using the Lianja App Builder.
 +
* Once published, Lianja Cloud Apps can be run in any modern  web browser; desktop or mobile.
 +
* Available as a docker image (Enterprise Edition).
 +
* Can be load balanced across multiple server instances (Enterprise Edition).
 +
* Can be installed and managed in an existing IT infrastructure; Includes an ISAPI extension for IIS on Windows and an Apache plugin for Linux supporting connection pooling.
 +
* Includes embedded Lianja SQL Server.
 +
* Access the native (embedded) Lianja database or any third party database using Virtual Tables; MSSQL, MySQL, PostgreSQL etc
 +
* Built-in authentication with (optional) 2FA support.
 +
* Integral support for the Lianja App Center.
 +
* User roles and permissions handled automatically depending on the authenticated user; Control who can run specific Apps and what functionality and data is available to them.
 +
* Can be configured with real-time data replication and automatic failover on server failure (Linux servers only).
 +
* Automatic browser client detection with UI personalities (Desktop and Mobile browsers).
 +
* High performance and scaleable architecture using best of breed technologies.
 +
* Fully open architecture with connectors for; OData (http/https), Node.js, Python, .NET and ODBC client applications.
 +
* Lianja Hosted Cloud Server (Amazon AWS).
  
* [http://www.lianja.com/overview/lianja-sql-server Lianja SQL Server]
+
See [[Lianja_Cloud_Server_FAQ|Lianja Cloud Server FAQ]] for further details.
  
* [http://www.lianja.com/overview/lianja-cloud-server Lianja Cloud Server]
+
==Installation Guide==
  
 +
<div style="overflow:scroll;height:60px;margin-top:15px;padding:5px;border:0px solid orange;border-left:5px solid orange;background:#fff8dc;vertical-align:middle;position:relative;">
 +
[[File:bm-noteicon.png|top|40px|link=]]
 +
<div style="position:absolute;top:7px;bottom:5px;margin-left:50px;">
 +
If you have already installed the Lianja App Builder you should not install the Cloud Server as it will be already installed.
 +
</div>
 +
</div>
  
The Lianja Cloud Server provides a variety of features that are grouped by functionality.
+
===Windows===
  
==App Deployment Services==
+
[[Install_Cloud_Server_on_Windows|Install Cloud Server on Windows]]
  
===[http://www.lianja.com/resources/blog/39-coding-tips/412-the-lianja-html5-client Lianja HTML5 JavaScript Web Client]===
+
===Linux===
The Lianja Web Client is a pure HTML5 JavaScript client that runs Apps developed in the Lianja App Builder using best practices in any HTML5 compatible desktop browser. It uses best of breed technologies to provide a rich and responsive user experience.
+
  
===Lianja HTML5 JavaScript Mobile Client===
+
[[Install_Cloud_Server_on_Linux|Install Cloud Server on Linux]]
The Lianja Mobile Client is a pure HTML5 JavaScript client that runs Apps developed in the Lianja App Builder using best practices on mobile devices. The Lianja Mobile Client is implemented as a responsive UI and will automatically adjust its appearance on iPhone, iPad, Android Phones and Android Tablets. It incorporates the PhoneGap JavaScript APIs and can be packaged up as a self contained App using the Adobe PhoneGap Build Service that can be submitted to the Apple App Store or Google Play.  See pages in the [[:Category:PhoneGap Apps|PhoneGap Apps Category]] for more information.
+
  
==Data Services==
+
===MacOS===
 +
 
 +
[[Install_Cloud_Server_on_Mac|Install Cloud Server on MacOS]]
 +
 
 +
==Authentication Services==
 +
 
 +
The Cloud Server has built-in support for authenticating users.
 +
 
 +
When logging into  the Lianja App Center, once authenticated only those Apps a user has permission to run are displayed in the App Center.
 +
 
 +
Once authenticated and running an App by clicking on a tile in the App Center, the operations that can be performed by the authenticated user are restricted by [[Users_and_Roles|Roles and Permissions]]. Additionally [[Users_and_Roles#Row_level_Security_.28RLS.29|Row Level Security (RLS)]] controls what records the user can see and [[Understanding_Dynamic_Data_Masking_in_Lianja|Dynamic Data Masks (DDM)]] control what data within the records a user can see.
 +
 
 +
You can also use the [[Nodejs_Integration|Node.js Module]], the [[Python_Module|Python Module]] or the [[Dotnet_Assembly|.NET Assembly]] to authenticate and perform CRUD operations on your data from any client.
 +
 
 +
==App Deployment and Delivery Services==
 +
 
 +
The Lianja Web Client is a pure HTML5 JavaScript client that runs Apps developed in the Lianja App Builder using best practices in any HTML5 compatible desktop or mobile browser. It uses best of breed technologies to provide a rich and responsive user experience.
 +
 
 +
You visually build Apps using the Lianja App Builder and deploy them as packages to a Lianja Cloud Server typically using the [[Upload_and_Install_Apps_using_the_Lianja_Admin_Console|Lianja Admin Console]].
 +
 
 +
[[pwa|Progressive Web Apps (PWA)]] are web apps that use emerging web browser APIs and features along with the traditional progressive enhancement strategy to bring a native app-like user experience to cross-platform web applications. Apps generated by the Lianja App Builder can optionally be enabled as Progressive Web Apps and installed on Desktops and Mobile device home screens.
 +
 
 +
==Cloud Data Services==
  
 
===Lianja ODBC data access===
 
===Lianja ODBC data access===
Open Database Connectivity (ODBC) is an industry standard interface for accessing data in a heterogeneous environment of relational and non- relational database management systems. Based on the Call Level Interface specification of the SQL Access Group, ODBC provides an open, vendor- neutral way of accessing data. Using the Lianja ODBC Driver in conjunction with the Lianja SQL Server, third party ODBC-aware products have full CRUD (Create, Read, Update, and Delete) access to Lianja data no matter where it resides.
+
Open Database Connectivity (ODBC) is an industry standard interface for accessing data in a heterogeneous environment of relational and non- relational database management systems. Based on the Call Level Interface specification of the SQL Access Group, ODBC provides an open, vendor- neutral way of accessing data. Using the Lianja ODBC Driver in conjunction with the Lianja Cloud Server, third party ODBC-aware products have full CRUD (Create, Read, Update, and Delete) access to Lianja data (Local and Remote) no matter where it resides.
  
 
===Lianja OData Server===
 
===Lianja OData Server===
OData is a standardized protocol for creating and consuming data APIs. OData builds on core protocols like HTTP and commonly accepted methodologies like REST. The result is a uniform way to expose full-featured data APIs. The Lianja Cloud Server has built-in support for OData. There is no need to write any custom code to use this functionality, you just point at an OData URI and the Cloud Server will perform the requested OData operation returning data in industry standard JSON format. [http://lianja.com/resources/blog/39-coding-tips/379-part-1-working-with-odata-in-lianja-sql-server- See this article for details].
+
OData is a standardized protocol for creating and consuming data APIs. OData builds on core protocols like HTTP and commonly accepted methodologies like REST. The result is a uniform way to expose full-featured data APIs. The Lianja Cloud Server has built-in support for OData. There is no need to write any custom code to use this functionality, you just point at an OData URI and the Cloud Server will perform the requested OData operation returning data in industry standard JSON format. [https://www.lianja.com/doc/index.php/Category:OData_Functions See this article for details].
 +
 
 +
===Working with JSON and JQL===
 +
 
 +
JQL leverages the complete flexibility of JSON with the full power of SQL. Created specifically for use with Web and Mobile applications, JQL provides a common query language and JSON-based data model that operates independently from the underlying SQL database.
 +
 
 +
JQL is based on standard SQL. It has familiar data definition language (DDL), data manipulation language (DML), and query language statements.
 +
 
 +
The JQL DDL extends SQL with support for a native JSON data type.
 +
 
 +
The JQL DML provides transparent access to the (possibly nested) members of JSON data columns. You do not need to use any special functions or operators to reference JSON encoded object members as this is handled natively by the JQL engine.
 +
 
 +
See [[Working_with_JSON_and_JQL| Working with JSON and JQL]] for details.
 +
 
 +
===Node.js Module===
 +
 
 +
Lianja Cloud Server includes a Node.js module '''lianjaclouddataservices''' enabling Node.js applications to connect to a local or remote Lianja Cloud Server and perform a variety of operations.
 +
 
 +
See [[Nodejs_Integration|Using the '''lianjaclouddataservices''' Node.js Module]] for details.
 +
 
 +
===Python Module===
 +
 
 +
Lianja Cloud Server includes a Python module '''lianjaclouddataservices''' enabling Python applications to connect to a local or remote Lianja Cloud Server and perform a variety of operations.
 +
 
 +
See [[Python_Module|Using the '''lianjaclouddataservices''' Python Module]] for details.
 +
 
 +
===.NET Assembly===
 +
 
 +
Lianja Cloud Server includes a .NET Assembly '''lianjaclouddataservices''' enabling .NET applications to connect to a local or remote Lianja Cloud Server and perform a variety of operations.
  
===Lianja WebSockets Server===
+
See [[Dotnet_Assembly|Using the '''lianjaclouddataservices''' .NET Assembly]] for details.
WebSockets is an advanced technology that makes it possible to open an interactive communication session between the user's browser and a server. With this API, you can send messages to a server and receive event-driven responses without having to poll the server for a reply. The Lianja Cloud Server has built-in support for writing WebSocket servers in both Visual FoxPro compatible scripting or JavaScript on all supported platforms.
+
  
 
==Dynamic Page Services==
 
==Dynamic Page Services==
Dynamic pages contain HTML and page processing directives in the same way as a PHP page does. You use page processing directives to generate HTML code dynamically. Page processing directives are typically enclosed in <% and %> in both Visual FoxPro Server Pages (.rsp files), JavaScript Server Pages (.jssp files) and Python Server Pages (.pysp files).
+
Dynamic pages contain HTML and page processing directives in the same way as a PHP page does. You use page processing directives to generate HTML code dynamically. Page processing directives are typically enclosed in <% and %> in both LianjaScript Server Pages (.rsp files), LianjaScript Server Pages (.jssp files) and Python Server Pages (.pysp files).
  
===[[Visual FoxPro Server Pages|Visual FoxPro Server Pages (.rsp files)]]===
+
===[[Visual FoxPro Server Pages|LianjaScript Server Pages (.rsp files)]]===
  
 
===[[JavaScript Server Pages|JavaScript Server Pages (.jssp files)]]===
 
===[[JavaScript Server Pages|JavaScript Server Pages (.jssp files)]]===
Line 48: Line 115:
  
 
==Server side procedures==
 
==Server side procedures==
 +
You can integrate with business logic on the server by calling server side procedures from Web/Mobile or Python/Node/.NET clients.
 +
 
Remember that when invoking server side procedures in the web/mobile client, the server knows nothing about the UI or the data state: it is "stateless".  What this means is that any required UI information should be passed as arguments to the server side procedure and that the procedure should open the database and tables that it needs.  When testing on the desktop, the situation is different as the desktop App is stateful: it has access to the UI, the database is open and the tables may be in an active state.
 
Remember that when invoking server side procedures in the web/mobile client, the server knows nothing about the UI or the data state: it is "stateless".  What this means is that any required UI information should be passed as arguments to the server side procedure and that the procedure should open the database and tables that it needs.  When testing on the desktop, the situation is different as the desktop App is stateful: it has access to the UI, the database is open and the tables may be in an active state.
  
So, as a best practice you should write any server side procedures that work with data to include [[ISSERVER()|not isserver()]] conditional code with [[PUSH DATASESSION|push]] and [[POP DATASESSION|pop datasession]].  
+
So, as a best practice you should write any server side procedures that work with data to include [[PUSH DATASESSION|push]] and [[POP DATASESSION|pop datasession]].  
  
e.g. (Lianja/VFP example)
+
e.g. (LianjaScript example)
  
 
<code lang="recital">
 
<code lang="recital">
 
proc getBalance(database, table, args)
 
proc getBalance(database, table, args)
 
   local result  = 0
 
   local result  = 0
   if not isServer()
+
   push datasession  
      push datasession
+
  endif
+
 
   open database &database
 
   open database &database
 
   use &table   
 
   use &table   
Line 65: Line 132:
 
   use
 
   use
 
   close database
 
   close database
   if not isServer()
+
   pop datasession
        pop datasession
+
  endif
+
 
   return result
 
   return result
 
endproc
 
endproc
 
</code>
 
</code>
  
The following methods can be used to call server side procedures (JavaScript or Lianja/VFP).
+
The following methods can be used to call server side procedures that are written in LianjaScript, Python or JavaScript.
  
 
===exports.conf===
 
===exports.conf===
A function can be called directly if it is declared in [[exports.conf]].
+
Apps running in the Lianja Web/Mobile Client can call remote functions directly if they are declared in the [[exports.conf]] file in the App.
 
<pre>var result = myfunc();</pre>
 
<pre>var result = myfunc();</pre>
 +
 +
See also: [[Server Side Procedures - Parameter Passing Examples]]
  
 
===Lianja.evaluate()===
 
===Lianja.evaluate()===
The [[Lianja|Lianja.evaluate()]] method can be used to call a Lianja/VFP function/procedure.
+
The [[Lianja|Lianja.evaluate()]] method can be used to call a LianjaScript function/procedure.
 
<pre>var result = Lianja.evaluate("myproc()");</pre>
 
<pre>var result = Lianja.evaluate("myproc()");</pre>
  
To call a procedure in a library, prefix the procedure name with the library name and '::'.
+
To call a procedure in a library, prefix the procedure name with the library name and '::'. The library will be loaded only once on the server.  
 
<pre>var result = Lianja.evaluate("mylib::mylibproc()");</pre>
 
<pre>var result = Lianja.evaluate("mylib::mylibproc()");</pre>
 +
 +
See also: [[Server Side Procedures - Parameter Passing Examples]]
  
 
===Lianja.evaluateJavascript()===
 
===Lianja.evaluateJavascript()===
Line 91: Line 160:
 
The file 'myfunc.js' should be in the app or library directory and contain a function with the same name as the file.  If the 'myfunc.js' file does not exist in the app or library directory and the file 'server_functions.js' exists then the function 'myfunc' is assumed to be defined in the 'server_functions.js' file.
 
The file 'myfunc.js' should be in the app or library directory and contain a function with the same name as the file.  If the 'myfunc.js' file does not exist in the app or library directory and the file 'server_functions.js' exists then the function 'myfunc' is assumed to be defined in the 'server_functions.js' file.
  
To call a function in a library, prefix the function name with the library name and '::'.
+
To call a function in a library, prefix the function name with the library name and '::'. The library will be loaded only once on the server.
 
<pre>var result = Lianja.evaluateJavascript("myjslib::mylibfunc()");</pre>
 
<pre>var result = Lianja.evaluateJavascript("myjslib::mylibfunc()");</pre>
  
Line 97: Line 166:
 
<pre>var result = Lianja.evaluate("javascript:myfunc()");</pre>
 
<pre>var result = Lianja.evaluate("javascript:myfunc()");</pre>
 
<pre>var result = Lianja.evaluate("javascript:myjslib::mylibfunc()");</pre>
 
<pre>var result = Lianja.evaluate("javascript:myjslib::mylibfunc()");</pre>
 +
 +
===Lianja.evaluatePython()===
 +
The [[Lianja_Methods#evaluatePython |Lianja.evaluatePython()]] method can be used to call a Python function.
 +
<pre>var result = Lianja.evaluatePython("myfunc()");</pre>
 +
 +
The file 'myfunc.py' should be in the app or library directory and contain a function with the same name as the file.  If the 'myfunc.py' file does not exist in the app or library directory and the file 'server_functions.py' exists then the function 'myfunc' is assumed to be defined in the 'server_functions.py' file.
 +
 +
To call a function in a library, prefix the function name with the library name and '::'. The library will be loaded only once on the server.
 +
<pre>var result = Lianja.evaluatePython("mypylib::mylibfunc()");</pre>
 +
 +
An alternative syntax using the [[Lianja|Lianja.evaluate()]] method is also available:
 +
<pre>var result = Lianja.evaluate("python:myfunc()");</pre>
 +
<pre>var result = Lianja.evaluate("python:mypylib::mylibfunc()");</pre>
  
 
[[Category:Lianja Server]]
 
[[Category:Lianja Server]]
 
[[Category:Developers Guide]]
 
[[Category:Developers Guide]]
 
[[Category:Lianja SQL]]
 
[[Category:Lianja SQL]]

Latest revision as of 03:01, 29 April 2024

The Lianja Cloud Server is a modern, fast, and flexible cross-platform cloud database Application Server that enables you to share Apps and Data in the Cloud or on premises running on either Linux, Windows or MacOS. Lianja Cloud Server provides an enterprise-class solution for both SMEs and large enterprises.

This article provides a functional overview of the Lianja Cloud Server.

Introduction

The Lianja Cloud Server provides a wide range of features.

Key features:

  • Provides secure Web and Mobile App deployment of Apps developed using the Lianja App Builder.
  • Once published, Lianja Cloud Apps can be run in any modern web browser; desktop or mobile.
  • Available as a docker image (Enterprise Edition).
  • Can be load balanced across multiple server instances (Enterprise Edition).
  • Can be installed and managed in an existing IT infrastructure; Includes an ISAPI extension for IIS on Windows and an Apache plugin for Linux supporting connection pooling.
  • Includes embedded Lianja SQL Server.
  • Access the native (embedded) Lianja database or any third party database using Virtual Tables; MSSQL, MySQL, PostgreSQL etc
  • Built-in authentication with (optional) 2FA support.
  • Integral support for the Lianja App Center.
  • User roles and permissions handled automatically depending on the authenticated user; Control who can run specific Apps and what functionality and data is available to them.
  • Can be configured with real-time data replication and automatic failover on server failure (Linux servers only).
  • Automatic browser client detection with UI personalities (Desktop and Mobile browsers).
  • High performance and scaleable architecture using best of breed technologies.
  • Fully open architecture with connectors for; OData (http/https), Node.js, Python, .NET and ODBC client applications.
  • Lianja Hosted Cloud Server (Amazon AWS).

See Lianja Cloud Server FAQ for further details.

Installation Guide

Bm-noteicon.png

If you have already installed the Lianja App Builder you should not install the Cloud Server as it will be already installed.

Windows

Install Cloud Server on Windows

Linux

Install Cloud Server on Linux

MacOS

Install Cloud Server on MacOS

Authentication Services

The Cloud Server has built-in support for authenticating users.

When logging into the Lianja App Center, once authenticated only those Apps a user has permission to run are displayed in the App Center.

Once authenticated and running an App by clicking on a tile in the App Center, the operations that can be performed by the authenticated user are restricted by Roles and Permissions. Additionally Row Level Security (RLS) controls what records the user can see and Dynamic Data Masks (DDM) control what data within the records a user can see.

You can also use the Node.js Module, the Python Module or the .NET Assembly to authenticate and perform CRUD operations on your data from any client.

App Deployment and Delivery Services

The Lianja Web Client is a pure HTML5 JavaScript client that runs Apps developed in the Lianja App Builder using best practices in any HTML5 compatible desktop or mobile browser. It uses best of breed technologies to provide a rich and responsive user experience.

You visually build Apps using the Lianja App Builder and deploy them as packages to a Lianja Cloud Server typically using the Lianja Admin Console.

Progressive Web Apps (PWA) are web apps that use emerging web browser APIs and features along with the traditional progressive enhancement strategy to bring a native app-like user experience to cross-platform web applications. Apps generated by the Lianja App Builder can optionally be enabled as Progressive Web Apps and installed on Desktops and Mobile device home screens.

Cloud Data Services

Lianja ODBC data access

Open Database Connectivity (ODBC) is an industry standard interface for accessing data in a heterogeneous environment of relational and non- relational database management systems. Based on the Call Level Interface specification of the SQL Access Group, ODBC provides an open, vendor- neutral way of accessing data. Using the Lianja ODBC Driver in conjunction with the Lianja Cloud Server, third party ODBC-aware products have full CRUD (Create, Read, Update, and Delete) access to Lianja data (Local and Remote) no matter where it resides.

Lianja OData Server

OData is a standardized protocol for creating and consuming data APIs. OData builds on core protocols like HTTP and commonly accepted methodologies like REST. The result is a uniform way to expose full-featured data APIs. The Lianja Cloud Server has built-in support for OData. There is no need to write any custom code to use this functionality, you just point at an OData URI and the Cloud Server will perform the requested OData operation returning data in industry standard JSON format. See this article for details.

Working with JSON and JQL

JQL leverages the complete flexibility of JSON with the full power of SQL. Created specifically for use with Web and Mobile applications, JQL provides a common query language and JSON-based data model that operates independently from the underlying SQL database.

JQL is based on standard SQL. It has familiar data definition language (DDL), data manipulation language (DML), and query language statements.

The JQL DDL extends SQL with support for a native JSON data type.

The JQL DML provides transparent access to the (possibly nested) members of JSON data columns. You do not need to use any special functions or operators to reference JSON encoded object members as this is handled natively by the JQL engine.

See Working with JSON and JQL for details.

Node.js Module

Lianja Cloud Server includes a Node.js module lianjaclouddataservices enabling Node.js applications to connect to a local or remote Lianja Cloud Server and perform a variety of operations.

See Using the lianjaclouddataservices Node.js Module for details.

Python Module

Lianja Cloud Server includes a Python module lianjaclouddataservices enabling Python applications to connect to a local or remote Lianja Cloud Server and perform a variety of operations.

See Using the lianjaclouddataservices Python Module for details.

.NET Assembly

Lianja Cloud Server includes a .NET Assembly lianjaclouddataservices enabling .NET applications to connect to a local or remote Lianja Cloud Server and perform a variety of operations.

See Using the lianjaclouddataservices .NET Assembly for details.

Dynamic Page Services

Dynamic pages contain HTML and page processing directives in the same way as a PHP page does. You use page processing directives to generate HTML code dynamically. Page processing directives are typically enclosed in <% and %> in both LianjaScript Server Pages (.rsp files), LianjaScript Server Pages (.jssp files) and Python Server Pages (.pysp files).

LianjaScript Server Pages (.rsp files)

JavaScript Server Pages (.jssp files)

Python Server Pages (.pysp files)

Server side procedures

You can integrate with business logic on the server by calling server side procedures from Web/Mobile or Python/Node/.NET clients.

Remember that when invoking server side procedures in the web/mobile client, the server knows nothing about the UI or the data state: it is "stateless". What this means is that any required UI information should be passed as arguments to the server side procedure and that the procedure should open the database and tables that it needs. When testing on the desktop, the situation is different as the desktop App is stateful: it has access to the UI, the database is open and the tables may be in an active state.

So, as a best practice you should write any server side procedures that work with data to include push and pop datasession.

e.g. (LianjaScript example)

proc getBalance(database, table, args)
   local result  = 0
   push datasession 
   open database &database
   use &table   
   // Insert your code here to do what you need to do
   use
   close database
   pop datasession
   return result
endproc

The following methods can be used to call server side procedures that are written in LianjaScript, Python or JavaScript.

exports.conf

Apps running in the Lianja Web/Mobile Client can call remote functions directly if they are declared in the exports.conf file in the App.

var result = myfunc();

See also: Server Side Procedures - Parameter Passing Examples

Lianja.evaluate()

The Lianja.evaluate() method can be used to call a LianjaScript function/procedure.

var result = Lianja.evaluate("myproc()");

To call a procedure in a library, prefix the procedure name with the library name and '::'. The library will be loaded only once on the server.

var result = Lianja.evaluate("mylib::mylibproc()");

See also: Server Side Procedures - Parameter Passing Examples

Lianja.evaluateJavascript()

The Lianja.evaluateJavascript() method can be used to call a JavaScript function.

var result = Lianja.evaluateJavascript("myfunc()");

The file 'myfunc.js' should be in the app or library directory and contain a function with the same name as the file. If the 'myfunc.js' file does not exist in the app or library directory and the file 'server_functions.js' exists then the function 'myfunc' is assumed to be defined in the 'server_functions.js' file.

To call a function in a library, prefix the function name with the library name and '::'. The library will be loaded only once on the server.

var result = Lianja.evaluateJavascript("myjslib::mylibfunc()");

An alternative syntax using the Lianja.evaluate() method is also available:

var result = Lianja.evaluate("javascript:myfunc()");
var result = Lianja.evaluate("javascript:myjslib::mylibfunc()");

Lianja.evaluatePython()

The Lianja.evaluatePython() method can be used to call a Python function.

var result = Lianja.evaluatePython("myfunc()");

The file 'myfunc.py' should be in the app or library directory and contain a function with the same name as the file. If the 'myfunc.py' file does not exist in the app or library directory and the file 'server_functions.py' exists then the function 'myfunc' is assumed to be defined in the 'server_functions.py' file.

To call a function in a library, prefix the function name with the library name and '::'. The library will be loaded only once on the server.

var result = Lianja.evaluatePython("mypylib::mylibfunc()");

An alternative syntax using the Lianja.evaluate() method is also available:

var result = Lianja.evaluate("python:myfunc()");
var result = Lianja.evaluate("python:mypylib::mylibfunc()");

Subcategories

This category has only the following subcategory.