8
Views
8
Comments
Solved
How to sync web-app database with mobile app database
Question
Application Type
Mobile

I want to have only 1 database. I have a web app and a mobile app, both are the same ofcourse. But i want it to be possible to have only 1 database where both of the apps save their datas to. So when i save something to the database on the mobile app, it needs to save it to 1 database. And when i open the webapp and want to see the data for example, the things saved from the mobile app needs to be visible, because it is 1 database. How can i sync the database of the webapp for the mobile app?

Solution

Yes that's the solution if you want to use a database that is not in your eSpace. 

In your case you can have both your applications, web and mobile, linked to the same database. In such a situation , best practices state that you should have a separate eSpace to hold the database  and in the dependencies in each app choose that eSpace entities. 

Graça

Hi!

You can use the the exact same database, create it in a eSpace just for the database and use it in both apps. 

Or you can have two databases and create CRUD actions for each database that simultaneously update the other or trigger the update on the other. 

My choice would be to have just one data base. 

 Hope this give you ideas

Graça

Solution

Yes that's the solution if you want to use a database that is not in your eSpace. 

In your case you can have both your applications, web and mobile, linked to the same database. In such a situation , best practices state that you should have a separate eSpace to hold the database  and in the dependencies in each app choose that eSpace entities. 

Graça

Your entities have to be  defined as "public"
Then they will be visible from the eSpace is going to use them


Sorry, I forgot to explain

to see those actions you must define the "expose read only" as "no" 

If is Yes you only can read the entity with aggregates or directly with the "Get..." action. 

Perhaps you can follow this online course 

Developing Web Apps (OutSystems 11)

to refresh your knowledge on web apps