Lianja files

By default all files for a particular App are contained in the .\Lianja\apps\\ directory. This includes programs, images, html, css, rsp, etc.
Tables are contained in the .\Lianja\data\\ directory.
Files that are shared among Apps are in the .\Lianja\library\ directory.
These defaults can be changed by clicking the “Settings” button in the bottom right of the Lianja screen. Of course, the usual SET DEFAULT, SET PATH, etc commands do work.

Please bear in mind that the Lianja directory structure is intended to facilitate sandboxing and tenancy. By working outside this structure you are limiting your deployment options with regard to cloud, mobile and cross platform deployments.

Create temp tables or cursors which I can access when my SP finished
The TMPNAM() function will give you a temporary filename in the current temporary directory (default for Lianja Server is C:\lianja\server\tmp and for Lianja App Builder C:\Users\your-user\AppData\Local\Temp\ on Windows). You can use this with create table or select .. into table, e.g.
mtmp = tmpnam()
create table &mtmp (…)

I click “Console” on the left side bar to get into Lianja command window
This is what I did
cd f:\staff\yth
modi comm test
The above will get me into the program editor
After saving it with CTRL-W, I could not find test.prg in my f:\staff\yth folder
With no App open, it should be in f:\staff\yth\. With an App open it should be in drive:\lianja\apps\name-of-your-App\.
When you click CTRL-W it should show you the filename and path when prompting you to save.

A VCP is compiled into a VCO. A SCP into an SCO and a PRG into a DBO.

The thing to remember is that the absolute directory of the file executing becomes the default directory so you need to use relative urls inside the file.

So if I am in a file c:\Lianja\apps\erd4Lianja\erd4lianja_main.rsp
../ would take me to c:\Lianja\apps

on Win, file paths take backslash. Other places they take slash. How should we handle this in code? Or does Lianja figure out the difference?
It takes care of it for you including conversion to lower case for linux (Mac filesystems are typically formatted case-insensitive).

what folders and files that I need to copy to restore my Lianja app from one PC to another?
“Restore” or “copy” your App from one development machine to another?
You create a Lianja Package File (.lpk file) in the deploy workspace the “Install package” from the Apps workspace.

When developing on Microsoft Windows developers rarely think about file naming conventions and often name files in mixed case and sometimes use spaces in the filenames.
Lianja will handle this just fine on Windows but if you want your Apps to run on Linux and Mac also, you should take care not to use mixed case filenames. Linux in particular will not find the files as it uses case sensitive filenames. Mac is dependent on what format the disk is in and may fail also.
Best way is to always use lowercase filenames. Thinking about this as you develop your Apps on Windows now will make it easier to move them between platforms. Furthermore it will allow you to share data on a network with Mixed Windows, Linux and Mac clients.
There is no issue with mixed case variable names. This is only referring to filenames, which includes database names).

You specify the default “website” page in the Server settings.
An App itself has an index.html page in it when its deployed.
Web Apps — index.html
Tablet Apps — tablet_index.html
Phone Apps — phone_index.html
The HTML5/JavaScript code that is generated is based on the “UI personalities” that you have specified.
The “Start page” for an App is in the App Settings.

When I call my stored procedure, Lianja Sql server makes a file with dbo extension. What is this ? Is it a fxp equivalent ? If yes, then will it call this file if I remove my orignal prg file from there ? Let’s assume I want to distribute some stored procedures and hide code like distributing fxp files only.
.dbo files are compiled .prg files just as .rso files are compiled .rsp files.

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.