Results 1 to 4 of 4

Thread: [Answers] Lianja files

Threaded View

  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.

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