App Center

Note that the Lianja App Builder is for development, users use the Lianja App Center


The default login page for the Lianja App Center desktop client is drive:\lianja\cloudserver\appcenter\login.rsp,
for the web client it is drive:\lianja\cloudserver\tenants\public\wwwroot\l ogin.rsp.
So, you can back these up then modify as required or have a starting Page in your App that does further validation after the initial Lianja login.


The Lianja App Builder (development) runs with data access in exclusive mode to allow you to modify structures, build tag indexes, zap, pack etc.
The Lianja App Center (runtime) runs with data access in shared mode unless you specifically set exclusive on or specify exclusive use on the open database or use commands.


The embedded HTTP server port setting is in app settings. The port is shared between the app builder and the app center.


Q:
exist a way to know if I’m inside on Lianja App Builder or Lianja App Center?
A:
Try Lianja.isRuntimeMode()

Advertisements

App Center

Q:
I see the app in a web page, but not in the app center…
A:
Make sure the App is ‘Published and that you are looking in the correct App Category in the App Center.


The Lianja App Builder is the development environment.
The Lianja App Center is the desktop client for published and deployed Apps.
When you install the Lianja App Builder, one user is already created – the admin’ user, with the same password: ‘admin‘.
You don’t need to use these login details when you start the App Builder – you will be logged in automatically – but you do need them to log into the Lianja App Center or when you log out of the App Builder Home Workspace and want to login again without exiting the App Builder.


The normal way to use Lianja is to deploy Apps and let your users choose what App to run from the App Center after they login.
But did you know that for desktop apps you can design your own custom home page so that after a user logs in or they click on the “Home” icon in the header bar your custom home page app is displayed rather than the App Center.
Just add this command line switch to the App center on the desktop.

Code:
--homepageapp yourhomepageapp

Note also that there is an attribute in the App Settings to specify the “Home page app”.


Q:
Does a web app always have to begin with a login from App Center?
Can I have a Lianja web app run along with other legacy .NET apps – and ideally be able to queryWindows authentication instead of having a login?
[That’s our scheme today. We have a single authentication when people log into our intranet. After that, our separate web apps do a .NET call to look up the Windows login.]
A:
No, if you look in the App settings you can enable guest access.
The reason the authentication through the App Center is important is that after login roles and permissions are assigned for the authenticated user. Bypassing Lianja authentication you lose that functionality.


Q:
We need to run our program automatically (absolutely no user intervention) at system startup on both windows and linux and in full screen (called kiosk mode?).
A:
You just need to put the –kiosk –app appname switches on the lianjaruntime and set the app as guest access.


Q:
How could I set the window size of the app center to a fixed size and disable the maximize button?
I tried to set the window size of the application in app settings but upon deploying the app, lianja app center maximizes its size. I want the app center to be not re-sizable.
A:
…window which contains the Webview hosting the desktop app center.
The issue is that there is a minumum resolution the main Windows can run in otherwise it will be maximized. I believe this was fixed in v2.0 and can be set with –geometry x,y,width,height


Q:
My application is made up of multiple apps.
Is there a way (an event or delegate of the app center) I can
display a special page when the users login into the application via the app center?
A:
The “Initial page” attribute in the app settings handles that.
The “home page” attribute in the app settings determines what page to navigate to when the home icon is clicked.
The app center is also customizable as is the login page.


Q:
We need to run our program automatically (absolutely no user intervention) in full screen (called kiosk mode?)
A:
Command line switches, including –kiosk to run the Lianja App Center in full screen kiosk mode
Have a look at the Command Line Switches doc – you can also specify –loginapp, –nosplashscreen, –username and others to configure whether the user needs to login, whether they see the App Center, splashscreen etc.


Q:
How to set the app as guest access?
A:
‘Enable guest access’ is an App Setting.
Here I have set it to true, so without logging in I can access the example_mobileapp1 from:

Code:
http://localhost:8001/apps/example_mobileapp1/index.html

Also, if the Lianja Cloud Server is enabled on port 80 or you are using the IIS ISAPI extension from:

Code:
http://localhost/apps/example_mobileapp1/index.html

 


Q:
When I press the button, the “label1” shows me 0, as if not recording or anything like I was not accessing the DB.
I should show what returns TTOC (DATETIME (), 1) as I show in the next picture being in the development environment:

And this other image Lianja App Center:
What could be happening? Is there a log of Lianja App Center?

Code:
Select a
use mytable order tag mytable again
...
Replace myfield with ttoc(datetime(),1)

A:
Try removing the ‘again‘. You can run multiple sessions with the same App Center application to try.



Q:
Is it possible to run my app directly?
Without having to go through the “Lianja Login” and “Lianja App Center” where Apps are selected.
A:
Yes, see here: Command Line Switches
For example:

Code:
C:\lianja\bin\lianjaruntime.exe --app myapp
Code:
C:\lianja\bin\lianjaruntime.exe --app myapp --nosplashscreen
Code:
C:\lianja\bin\lianjaruntime.exe --app myapp --nosplashscreen  --username admin --password admin


Q:
I would like to
start my app with a customised page size. i.e Less than maximised.
A:
Have a look at the –geometry command line switch.
Command Line Switches



Q:
I can not use the app center on my computer, where I have the app builder.
in another PC where only the app center is, works my application.
the aplication it´s on a server drive w:\
I run this:

Code:
C:\lianja\bin\lianjaruntime.exe --app W:soporte

this only works at pc with only app center
this not works at pc with app builder
A:
Your ‘soporte’ App is in the ‘public’ tenancy on the server in C:\lianja\cloudserver\tenants\public\apps\soporte

If your W: drive is mapped to C: on your server, the command would be

Code:
C:\lianja\bin\lianjaruntime.exe --runtimedir W: --app soporte

Or, if your W: drive is mapped to C:\lianja\cloudserver\tenants\public on your server, the command would be

Code:
C:\lianja\bin\lianjaruntime.exe --tenancy W: --app soporte

Have a look at the file c:\lianja\log\log.txt. That will list the directories it is using.

Did you specify a different drive for shared files when you installed the Lianja App Center?
It is not finding the data if you can see the form but not the data values.

App Center

To provide a nicer user experience in v1.2.4 the icon specified for an App tile is now deployed automatically and displayed in an App Center tile in both desktop and Web. Note that the minimum optimum size for an App tile icon is 96×96.

These tile icons are also active in the new “Page Center”.
You can copy your icons into the library directory (just drag and drop) and then reference them in the App “Settings” for the tile like this lib:/iconname.png


On your desktop shortcut if all you want to do is bypass the App Center and run a custom application written in Lianja/VFP using the Application Framework.
c:\lianja\bin\lianjaruntime main
By default that will look for the compiled main.dbo file.
You can run PHP, Python or JavaScript Applications just by adding the appropriate file extension.
You can add this shortcut inside your installer with a custom icon and remove the app center desktop shortcut.


Lianja as many of you know by now is a “platform” for developing and deploying business Apps, not just an IDE.
The basic development methodology is to break an application down into groups of smaller Apps. You then break the Apps down into pages then break the pages down into sections, fields and gadgets.
The focal point for end users is the “Lianja App Center” which provides optional login and displays tiles representing the Apps that the user has permission to run.
In the next version I have implemented the “
Lianja Page Center” which can optionally be used to navigate between the pages of an App. This is fully configurable.
So the steps are.
1. User logs in.
2. Selects an App from the App Center (Only those that the user can run are displayed based on their roles and permissions).
3. The Page Center for the App is displayed. The categories such as “Select a Page” (as can be seen in the attachments) are new attributes in the page attributes as is the tile size, color and caption. You tell the App to render a Page Center in the App attributes by checking the “Show Page Center” checkbox.
4. The user clicks a “Page Center tile” and navigates between the pages. Clicking the “Page menu icon” in the top left switches back to the page center. Clicking the “Home icon” in the header of any page or the Page Center itself switches back to the App Center.
This is all generated dynamically. You just set the attributes.
I will also add the ability to specify the icon to display in the “Tile”.
The existing page navigation menu can still be used as can the page selection panel in the left sidebar. The “Page Center” provides you with a simplified touch friendly interface for navigating between the pages of an App and reduces software maintenance and training of end users as it is a common interface for interacting with Apps and the pages of the Apps that you build in Lianja.
1. Login


2. The App Center is displayed.

3. Click or touch an App Center tile to display the “Page Center” for the App.

4. Click or touch a Page Center tile to switch between pages.

You declare the Page Center attributes for the tiles in the Page attributes dialog and the App Settings dialog.

customize the size and style of the tiles
Yes, and you can. The tiles are declared in the page attributes.



In Lianja v1.2, note that in a desktop App you can now extend the Lianja system object like this to pass data between apps. Try this from the console.
Lianja.mydata = object()
Lianja.mydata.name = “Barry”
declare mytable[10]
Lianja.mydata.mytable = mytable
Lianja.mydata.mytable[1] = “Lianja”
Lianja.mydata.mytable[2] = object()
Lianja.mydata.mytable[2].name = “Hello world”
? json_encode( Lianja.mydata )
? json_decode( json_encode( Lianja.mydata ) )
So in other words
you can extend the Lianja system object with your own data that persists between each App that you open.
Lianja, unlike VFP reference counts the arrays and objects so they can be assigned into data structures as above.

App Center

Make sure you have put your icon in .\lianja\library\ and not .\lianja\lib\



Make a copy of the file \Lianja\cloudserver\tenants\public\wwwroot\login.r sp, modify it to your liking and then change the default page in the Lianja Server Manager to point to your new file.



App Center is the desktop client (runtime) and the default login is admin/admin. When you start the Lianja App Builder, you are logged in automatically. You can also use admin/admin as the username/password if you log out and want to log in again. The Lianja App Builder includes theLianja App Center for testing your Apps once built, published and deployed.



If you include the Lianja App Center desktop client in your Installer as discussed on the Forums previously (and the default behaviour of the Installer template), your users will start the Lianja App Center from the desktop shortcut, just as you can do on your development machine.



The App Center should be looking for Library files in C:\Lianja\cloudserver\tenants\public\library.



Q:
Is there an easy way to have a top menu bar sort of an application toolbar that provide user direct accessibility to sertain functions from any pages or any apps?
In my case, I have many apps and want the toolbar to available to the user once they login to the app centre which display all my apps. The
toolbar should persists when user get into the page centre too.
This will be similar to the top toolbar in Lianja app builder provides where we find options like “Dashboard”, “Documentation”, “Reset” and “Logout”
A:
The App Center and the Page Center are .rsp files that generate dynamic HTML5/JavaScript.
you can customize these with your own background image and branding, and also add the menu bar that you mention by reading the appcenter.rspsource code.



Q:
I have a test app and now I want to see if I can create an installation file that I can run on another computer. I’d like to be able to run my app on a computer that does not have Lianja installed.
Looks like I need to install the “App Center Runtime Client Only” installed in \Lianja\Redist.
A:
Just download the App Center Distro that matches the version of the App Builder and copy it into the redist directory.
This will be embedded in your installer file for you App and will install quietly on the target machine if it is not already installed.



Q:
What is the easiest way to customise the APP Center login screen?
Want to change the “Lianja login” and graphics, window title etc but will obviously leave all the copyright stuff intact at the bottom.

This is App Center on the desktop (we are using RDP to serve up Lianja). We don’t use Server Manager.
On dev machine have modified every version of Login.rsp & nothing changes when we fire up app Center.

A:
That’s because you start Lianja with the –rdp switch which uses login_rdp.rsp not login.rsp.
it will be in the following location for desktop apps started with the –rdp command line switch:
c:\lianja\cloudserver\appcenter\login_rdp.rsp
Without that switch it is in:
c:\lianja\cloudserver\appcenter\login.rsp
After logging in the App Center will be displayed.
This is in:
c:\lianja\cloudserver\appcenter\appcenter.rsp
and for –rdp
c:\lianja\cloudserver\appcenter\appcenter_rdp.rsp
For Web Apps it is located in a tenancy (default is public) so it can be customized for each customer in a hosted cloud.
c:\lianja\cloudserver\tenants\public\wwwroot\login .rsp
and then the App Center…
c:\lianja\cloudserver\tenants\public\wwwroot\appce nter.rsp
So… You would setup virtual host mapping in the http server to map a customers data and apps. e.g. smithco.lianja.com which would you map to.
c:\lianja\cloudserver\tenants\smithco\wwwroot\
The customer then would hit on

http://smithco.lianja.com/login.rsp

Which would cause all data accessed and all apps run to be via that virtual hosts wwwroot. If you register a domain name for the customer and setup the address record for that domain (e.g. in network solutions) you can then redirect to your hosted apps. e.g.
http://www.smithcoapps.com/

You can then have the default page to be login.rsp.
This is basically how multi-tenancy works in Lianja Cloud Server. One server and multiple customers. The “Tenancy” is the “domain” specified for the user when they login.
Also note that when firing up a desktop app using rdp you can have different login and app centers for each customer.
You accomplish this using the –customer custname command line switch.
This causes login_custname and app center_custname to be used so you can host multiple customers on a single server.
I hope this better explains how to customize the user experience for individual hosted customers.

In fact thats for the Web Client.
The desktop client (for –rdp) is in:
c:\lianja]cloudserver\appcenter\login_rdp.rsp