Skip to content

Business Object from External Data Structure

Imagine you have an External REST API, that you are using to get information about the Countries in the world, their Languages, Currencies etc. The API will have its own structures, representing the requested Data.

Now, most often, you will want to save the Data into your Database, or display it within your Application. To do that, you would need to create new Business Objects, representing the API's Data, as well as their relationships. A tedious task, especially for a large amount of Classes, Attributes, Associations etc.

In order to help you minimize the time and effort required for such a task, zAppDev automates the representation of your API Structures as Business Objects, by creating a business object from your External Data Structure.

New Business Object from External Data Structure

To create a new business object, containing your Classes from an API adapter:

  • Right-click Domain in the Project Explorer and choose Add.... The Add new item window lists two templates in the Domain category.
  • Choose Business Object from External Data Structure (Import from API)
  • Select your API adapter as the Interface
  • Name your new Model
  • Optionally check AI completion (Beta), which suggests fields from the model name
  • Select those Classes that you would like to be transformed to Business Objects
  • Click Add item

The two Domain templates

The template Business Object from External Data Structure, with Interface, Name, AI completion and Classes

As soon as you are finished, you will see all your Structures transformed into Classes and their Associations, set and ready for you to use them in your Application.