View Full Version : Page lifecycle

2016-12-01, 17:39
Is there a document that describes the Page lifecycle? Specifically, I'm looking to understand whether all Pages are created when the app is started and destroyed upon app completion (close) or whether it's possible to create a Page and have it destroyed at the end of it's use. In our VFP apps, we often create modal forms and destroy them after collecting the necessary input or displaying the desired output.


2016-12-01, 17:56
Hi Scott,

Lianja Mobile Apps are Single Page Applications (SPA). A single DOM is sent that contains no data, only the pages. That is the nature of SPA apps, and is the nature of Cordova/PhoneGap apps. Google Docs, etc. work the same way.

What is your concern? Remember that in the modern app age (of SPA apps), there is no monolithic huge app that hogs a ton of memory.

Here's a link to build Lianja Web and Mobile apps: http://www.lianja.com/resources/blog/39-coding-tips/404-an-introduction-to-building-web-and-mobile-apps-in-lianja


2016-12-02, 11:18
Hi Scott,

Just wanted to chime in.

Lianja gives you the ability to define a form and release it when done;I do this in the customvfp sections.

So within a single page, I can have many forms defined and show them when needed, then release them when done.

Lianja gives you many options.


2016-12-02, 12:08

To be clear, while we may eventually develop web/mobile apps, we currently develop desktop applications, so that's my frame of reference. I fully admit to not yet completely understanding the "Lianja way" of developing applications.

Suppose in the event delegate for the click event of a command button I would like to open a page to collect some parameters and when the data entry for that page is complete, perform some sort of processing on the database based on the input from the page. How would I go about doing this? Is it possible to use Showdocument() modally to open the new page, and have control returned to the delegate after the page is closed? (Desktop only - I understand this probably doesn't make sense in a web/mobile environment.)


2016-12-02, 14:08
Hi Scott,

There are multiple ways to handle this.

Have a look at showdialog and showdialogpanel. You can use these command to either pop-up or slide in another page to handle multiple documents.

You can also define a form as an object, and show it to handle inputs.

I can post some examples of this a little later today.


2016-12-02, 22:56

Look at Lianja.showDialog() and Lianja.showDialogPanel(). They provide the required functionality.