Separating an existing UIBuilder App into different containers

I have an existing UI Builder app with 10 pages. These pages are destined to 3 different audiences: Students, Tutors, Admin. So I would like to separate into 3 UI containers.

I would like to:
a) Fork the existing container twice, remaining them so as to have an Admin, Tutors, and Students container.
b) Delete the irrelevant pages for each container.
c) Rename the default container accordingly

Aside from making sure that the login functionality applies to the pages within a group container, is there any other risk or issue I need to mitigate before doing this?

1 Like

Can I please have some feedback on this?

Hello @Andreas_Marinopoulos,

you can do all of this safely. I don’t see any points where something could go wrong. However, if you want to be able to quickly restore everything as it was, you can make a copy of the ui-builder directory in your files before you start (formally make a backup). This way you can restore everything back if something happens. However, as I said, all actions should go without problems. If there are, let us know.


Hi @Andreas_Marinopoulos

In additional:

After creating those copies please do not remove/rename the source ui-container.
Copying files takes some time, especially if you’ve got lots of pages/functions/etc., so the immediate removal might lead to problems with the target ui-containers, it doesn’t happen always, but a couple of minutes delay won’t be redundant. This is a known issue and we are going to fix it asap.

1 Like

@vladimir-upirov one more question.

If we do not rename the old page, how do we direct people who already have our link to the new page?

eg. we have a page Assuming we have done the replication and we have SampleTest pages in both the default and the new container.

Our assumption is that currently, when one clicks on the link, they see the default page, and that if we rename the default container page to SampleTest_old, then they will see the new one. Is this assumption correct?

UI Container name is just for you as a developer, and you can publish it into any location, it means you can publish the same UI container into several places, for instance: ‘/web/first-version’ and web/second-version.

I assume your custom domain is mapping to the “web/bg” directory, so if you publish in the directory another UI container the proved link will open the latest published container

Your assumption is correct, our custom domain is mapping to the “web/bg” directory.

I think I do not fully understand how this works

The ui containers are in root/ui-builder/containers whereas our custom domain is pointing to web/bg.

There are no ui containers in web/bg. Is this a mistake? If so, what steps should we take to remediate without any business interruption.

If it is not a mistake, how do we make sure our custom domain will select the right link? Does it mean that it looks in all relevant containers for that page name and selects the most recent one?

when we click on the following URL it opens an app that’s located in the “web/bg”, is that correct?

Yes. But that folder does not contain a ui-builder folder.

yes, because this is already composed ui-container

I see. And therefore how should we manage adding new containers, how should the folder structure of web/bg change?

when you publish a new UI container into the folder it will replace the current one

do you want to publish another ui-container into the “web/bg” folder?

I would like to have 3 different ui containers all containing pages that are accessible from my custom domain, is this possible?

Oh, now I see what you are talking about.

Yes, it’s possible, just publish your containers into sub directories, for example: web/bg/cont1 web/bg/cont2 web/bg/contN, or you can publish your container into web/cont1 web/cont2 web/contN and mapping your domain to the /web directory

Is this what you are looking for?

Yes, thank you, I will try that!

@vladimir-upirov I believe I need to do some housekeeping.

It seems to me that the files necessary to a functioning UI are

We have a set of these files in these locations:

Our custom domain points to files/web/bg

We do not have other apps or need other apps.
I will of course make backups, but, if I conclude they are not used, would it be okay to delete the files in files/ui-builder/containers/default/, files/web?

However, when we create new containers from the Backendless UI, they are created in files/ui-builder/containers. Do I simply move them into files/web/bg as you indicate here?

the source files for the default container are located by the following path files/ui-builder/containers/default/, so do not delete anything here because you won’t be able to open the container in the UIBuilder designer. Instead of copying files manually, you have to use the “Publish” button to build/publish files of the container into a target directory

I almost understand.

So the files in the following path files/ui-builder/containers/default/, are not working files, they are source files, like a template?

Because I confirm that when I click on file /files/ui-builder/containers/default/index.html from the Files section, this is not my index page that opens when I open, the index page is actually located at /files/web/bg/index.html. Is this normal?

But it is confusing as when I am looking at the index file in the UI Builder, the url appearing is the ui-builder folder. How does this work?

So the ui-builder folder is a sort of template folder? And if I want to create working files, I publish here:

Question: For housekeeping, say I want the default container do be placed in the root /web folder. Then I would like my subcontainers in /web/cont1, /web/cont2.

Are the steps I need to take the following?

  1. Backup the entire /web folder
  2. Go to the default Main Page in Ui Builder
  3. Click Publish and choose the ROOT (/web) folder. Do I need to do this for each page?
  4. Go to the next container in UI Bulder, publish to a subfolder, etc?

yes, you got it!

no, it should replace only affected files, for instance, the following folders will be replaced components, library, styles, theme, in other words, will be replaced only working directories and files and any custom files/folder should not be replaced

Sorry @vladimir-upirov I made an edit to the previous post while you were replying. I am still a bit confused as to the difference between the ui-buider folder and the web/ folder…