Developer Reference

What is Codegen?

Codegen converts defined data model to programming source code files for respective application development.

How to generate codes?

Developer implements conceptual data model in CloudyRec. After loading the App to SandBox,he can generate the code for desired application platforms under Dashboard > Generate tab.

Generate tab.
Generate tab

Developer can choose the platform for which to generate the code for data model.
Select platform to generate code


Generated Codes

What is generated?

Basically, followings are generated;

1. Connectivity classes
2. Abstract resource class
3. Defined data model classes
4. Other helper library classes
6. Necessary libraries to include

Connectivity classes

This is a collection of source code files which performs HTTP connections to API server. The generated file name and number of files may vary on different platforms. But implemented functionalities are same.

For example in Android, source file is “CloudyRecConnector.java” and in iOS, two code files are “CloudyRecConnector.h” and “CloudyRecConnector.m”.

IMPORANT! Currently all HTTP calls are synchronous and there will be program UI freezing depending on the connection speed. Developer shall wrap resource calling (list,load,save) methods with timeout and separate threads.

Abstract resource class

Generated code for data models are implemented in Object Oriented design. All data model classes inherits from structured Resource class.

This mother class contains common functionalities to Read, Create, Update, Delete data from API via Connectivity Classes

Defined data model classes

Codegen converts each resource type into class, with attributes as class properties. The generated file name and number of files may vary on different platforms.

All generated classes inherit Abstract resource class

Other helper library classes

This is the collection of source code files which complement Connectivity classes and Model classes for error handling, data simplification and JSON etc..

Necessary libraries to include

This is a collection of compiled library files which is used by Connectivity classes and Model classes . Depending on the platforms, libraries are JAR or DLL files.