Results 1 to 4 of 4

Thread: [Answers] Lianja files

  1. #1
    Lianja MVP
    Join Date
    Dec 2012
    Location
    Croatia, Zagreb
    Posts
    1,135

    [Answers] Lianja files

    By default all files for a particular App are contained in the .\Lianja\apps\<app_name>\ directory. This includes programs, images, html, css, rsp, etc.
    Tables are contained in the .\Lianja\data\<database_container_name>\ 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.



    Q:
    Create temp tables or cursors which I can access when my SP finished
    A:
    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 (...)



    Q:
    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
    A:
    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



    Q:
    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?
    A:
    It takes care of it for you including conversion to lower case for linux (Mac filesystems are typically formatted case-insensitive).



    Q:
    what folders and files that I need to copy to restore my Lianja app from one PC to another?
    A:
    "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.



    Q:
    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.
    A:
    .dbo files are compiled .prg files just as .rso files are compiled .rsp files.



    All topics in [Answers] alphabetically: http://www.lianja.com/community/show...ll=1#post12352
    Last edited by josipradnik; 2016-11-29 at 05:10.

  2. #2
    Lianja MVP
    Join Date
    Dec 2012
    Location
    Croatia, Zagreb
    Posts
    1,135
    Q:
    How do I create a folder under app directory if it doesn't already exist?
    A:
    The files in the app directory will not be displayed in the files tree in any subdirectory. This is by design so that packaging is easier for web and mobile apps in particular.
    We plan to implement smart folders in v2.



    When specifying custom code and gadgets you can prefix the filename with any of these special prefixes that are recognized by Lianja.
    The current App directory:
    app:/

    The library directory:
    lib:/

    The pages library directory:
    pagelib:/

    The current database directory:
    data:/

    The themes directory:
    themes:/

    The cloudserver base directory:
    cloudserver:/

    The images directory under the current app directory:
    images:/



    All topics in [Answers] alphabetically: http://www.lianja.com/community/show...ll=1#post12352
    Last edited by josipradnik; 2016-11-29 at 05:06.

  3. #3
    Lianja MVP
    Join Date
    Dec 2012
    Location
    Croatia, Zagreb
    Posts
    1,135
    Q:
    what is the use of RSO file in the project folder? Is it the same as RSP file?
    Every RSP file also has a RSO file.
    A:
    .rsp files are dynamically compiled into .rso object files. This is then executed. The compilation is only done if the rsp file is newer than the rso file.



    Q:
    What is the map and format of the config.db ?
    The map (C:\lianja\cloudserver\tenants\public\) is still empty.
    config.db is not present in the lianja-structure.
    I tried "set currency to .." in just one page in an init-event.
    But of cours, it belongs in a config or setting-screen..
    A:
    For development purposes you can create a config.db in the .\Lianja\conf\ directory and put your SET commands there.
    config.db resides in the conf directiory, under Lianja for desktop apps, and under <drive>:\cloudwserver\tenants\public for web apps.
    The command in config.db can be any of the SET commands.
    The config.db must be compiled. And at least until 1.3, both files must be deployed to the conf directory.



    All topics in [Answers] alphabetically: http://www.lianja.com/community/show...p?2717-Answers

  4. #4
    Lianja MVP
    Join Date
    Dec 2012
    Location
    Croatia, Zagreb
    Posts
    1,135
    Q:
    in App Builder this work..
    but in App Center, this command:
    Code:
    select 0
    SELECT * FROM syscolumnconstraints where lower(table_schem) = lower(dbname) into cursor cur_columnconstraints
    not work..
    error message: File 'syscolumnconstraints.dbf' does not exist.
    I think this is not a real table..

    A:
    Correct: it is not a table. It is effectively (don't know what it really is) a stored procedure that reads the information for you. You can't write to it
    System tables do not exist in the system database, they are pseudo tables that are created dynamically.



    Editing the .lianja file for an app is discouraged and unsupported.



    Q:
    while reviewing the example_jqueryui app.
    I opened the app and went to the Page:Navigation Panelata Source and it showed lib:/treeview.rsp?ondblclick=page1_navtreeselection&key =address%2Bcity%2Bcountry.
    I clicked on the ellipse and it brought up treeview.rsp in the script editor but it was blank. On clsing the script and returning to the page work space Data Source was showing
    app:/lib:/treeview.rsp?ondblclick=page1_navtreeselection&key =address%2Bcity%2Bcountry
    and the treeview wasn’t working. Removing the app:/ prefix got everything working again but the editor still brings up a blank script and adds the app:/ prefix. This occurs from the app inspector as well as from the page attributes panel. In the end, in order to view/edit the treeview script I have to open it from the library work space.

    A:
    yes, that’s an editor infelicity. Same thing happens when debugging and you get the “Do you want to fix” dialog: the debugger thinks the file is always in the app directory. Click on “Yes” (you want to edit) and it creates a blank one in the app directory.




    All topics in [Answers] alphabetically: http://www.lianja.com/community/show...ll=1#post12352

    These answers are also systematized on the site "Lianja developer": https://lianjadeveloper.wordpress.co.../lianja-files/
    Last edited by josipradnik; 2017-12-12 at 01:03.

Bookmarks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Journey into the Cloud
Join us