In Part 1 of the series we created a Data Model which content needs to be saved on a different server. We have chosen restdb.io as our target DB and have setup the rest in- and output methods in Part 2. Now we will create the mechanisms to backup the actual data and the ability to restore the backed up data from the backup overview.
We will use JSON as our backup structure. All we need to do, is to create a mapping of the Person entity to JSON with the address as subentry. We write the JSON into the…
This is the second part of the journey on how to build a backup database in REST-DB and use it with Mendix.
If you do not already have an account (it’s free) in REST-DB go here for a quick start with link to sign up.
Follow the steps in the quick start to create one collection backup. Create two fields: date (Type datetime) and changes (Type string):
Define the represenation of the backup database in Mendix with an entity with attributes date and changes (unlimited String):
Inspired by the article of Minke Van Dooremalen in Mendix Community, I was looking for a simple solution to backup my data from the sandbox projects to an external database. The simplest way to serialize objects in Mendix is to convert them to JSON or XML. JSON can be stored anywhere in textfiles or even in string attributes of databases. So I chose to use an easy to configure, web/cloud-based free of charge solution to store the small amounts of data I have. But before we define the storage, we first create the problem domain.
For this example we just…
The Singleton pattern is one of the creational pattern developed by the Gang of Four (GOF) Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides. It describes a class that has only one object and provides a global access point to that class.
Singletons are often used instead of global variables. For example if you need different Server configurations in your staging environment as you do not want your test space on localhost connect to a productive external data source, then the singleton comes in handy.
In the Mendix environment it is not possible to create strict Singletons as an…
My domain model contains an entity called Object A which has two relations to another entity called Object_B: Object and CounterObject. Object B has two specialisations Spec_L and Spec_K.
Object_A has an attribute ObjectType which may be either Type_X or Type_Y. Type_X means, that Spec_L is the Object and Spec_K the CounterObject. Type_Y means, that Spec_K is the Object and Spec_L the CounterObject.
Full Stack Developer. Building digital things from the early 90s until now. Currently focused on low code development.