Difference between revisions of "Category:Lianja Cloud Server"

From Lianjapedia
Jump to: navigation, search
(Dynamic Page Services)
(App Delivery Services)
 
(57 intermediate revisions by 2 users not shown)
Line 1: Line 1:
 
{{DISPLAYTITLE:Lianja Cloud Server}}
 
{{DISPLAYTITLE:Lianja Cloud Server}}
The Lianja Cloud Server is a modern, fast, and flexible cross-platform cloud database Apps Server that enables you to share Apps and Data in the Cloud or on premises running on either Linux or Windows. Lianja Cloud Server provides an enterprise-class solution for both SMEs and large enterprises.
+
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.
 
This article provides a functional overview of the Lianja Cloud Server.
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.
 +
* Can be load balanced across multiple server instances.
 +
* Can be installed and managed in an existing IT infrastructure; Includes ISAPI extension for IIS on Windows and 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.
 +
* 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), Node.js, Python, .NET and ODBC client applications.
 +
* Lianja Hosted Cloud Server Edition (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]
+
==Authentication Services==
  
 +
The Cloud Server has built-in support for authenticating users.
  
The Lianja Cloud Server provides a variety of features that are grouped by functionality.
+
When logging into  the Lianja App Center, once authenticated only those Apps a user has permission to run are displayed in the App Center.
  
==App Deployment Services==
+
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 controls what records the user can see.
  
===[http://www.lianja.com/resources/blog/39-coding-tips/412-the-lianja-html5-client Lianja HTML5 JavaScript Web Client]===
+
You can also use the Node.js module, the Python module or the .NET assembly to authenticate and perform CRUD operations on your data.
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===
+
==App Deployment and Delivery Services==
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==
+
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 to your Lianja Cloud Server as packages 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.
 +
 
 +
See [[Pwa|Progressive Web Apps]] for details.
 +
 
 +
==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 Visual FoxPro 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|Visual FoxPro Server Pages (.rsp files)]]===
Line 48: Line 96:
  
 
==Server side procedures==
 
==Server side procedures==
 +
You can integrate with business logic on the server by calling server side procedures from the Web/Mobile client.
 +
 
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 [[ISSERVER()|not isserver()]] conditional code with [[PUSH DATASESSION|push]] and [[POP DATASESSION|pop datasession]].  
  
e.g. (Lianja/VFP example)
+
e.g. (LianjaScript example)
  
 
<code lang="recital">
 
<code lang="recital">
Line 72: Line 122:
 
</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]].
+
A function can be called directly if it is declared in [[exports.conf]] in your 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 145:
 
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 151:
 
<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 01:35, 28 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.
  • Can be load balanced across multiple server instances.
  • Can be installed and managed in an existing IT infrastructure; Includes ISAPI extension for IIS on Windows and 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.
  • 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), Node.js, Python, .NET and ODBC client applications.
  • Lianja Hosted Cloud Server Edition (Amazon AWS).

See Lianja Cloud Server FAQ for further details.

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 controls what records the 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.

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 to your Lianja Cloud Server as packages 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.

See Progressive Web Apps for details.

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 Visual FoxPro Server Pages (.rsp files), LianjaScript Server Pages (.jssp files) and Python Server Pages (.pysp files).

Visual FoxPro 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 the Web/Mobile client.

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 not isserver() conditional code with push and pop datasession.

e.g. (LianjaScript example)

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

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

exports.conf

A function can be called directly if it is declared in exports.conf in your 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.