Automation for GeneratorApp – Building

I’m continuing my previous post about Automation for Java Developers with some comments, basic procedure and some ideas that I have used or I will use in the future. Sense my GeneratorApp tool contains generation functionality not only for Java Frameworks it will need a lot more tools and environments and platforms. I will just need to setup wire things up once I will have the building blocks and very described path of what is needed for it. With this article I will force myself to increase the number of automated actions sense, I am no machine – I too make mistakes – and with these scripts, steps, pseudo-codes in place, I will prevent myself from publishing broken functionality in the future. Also it will bring more documentation about all the features in the GeneratorApp currently has.

Get some Data Model from somewhere – I’ve created several Models with very different cases that are already used in GeneratorApp Android for non-developers, that I’ll probably use to test every upcoming stuff.

Update Project files (because of environment settings, or because of the Data Model specifics)

Generate Source from the Data Model

Compile -> Build -> Package

Clean up – source, compilation files, leave only the packaged result, if the last step is included in the Jenkins Job

Distribute (optional step)

Here is the full list of Platforms I have planned in the beginning to support in the GeneratorApp. Some of them are very tested and bug-fixed, some are in a phase that is OK – Is working with the initial, internal dummy data model, but didn’t have the time to improve it, especially because, every platform evolves on its own and some stuff gets out of date, and some of the environments are not even started. I’ll write down the progress on each of them and steps for what is required, to get them building (in my internal case – automatically).

PHP, PHP_JSON – Generate a layer that exposes the Php Models using the Php Data Access layer to the Web – with a Rest(JSON) interface and a Web Page interface0) Requirements – Same Requirements from PHP_DATA_ACCESS 1, 2, 3, 4) Curl – for Read/Add/Edit/Delete End Points (with functional checks/tests)

Android_with_Room_Kotlin– Generates All – models, data access, gluing code and fragments and activities with default operations on records of type defined by the user.The latest and most developed Generator (in the DEV channel, used in the Android Generator for non-Developers. This is the Jenkins Job I have. It has: 0) Requirements – A zipped base project – with standard android app structure, configuration files, some environment setup1) Download a Data Model from my site1.1) Update some files and folders in the base project needed for the model2) Generate code3) Build for release (obfuscation included)3.1) Upload APK4) Clean everything

Android_with_Room – Generates All – models, data access, gluing code and fragments and activities with default operations on records of type defined by the user.Until the end of 2018 I developed it alongside with the Kotlin Version. I’ll need to replicate the Jenkins Job, but using this as Generator and update it, because I left it and focused on Room With Kotlin..

Android_with_greenDAO– Generates All – models, data access, gluing code and fragments and activities with default operations on records of type defined by the user.Temporary stopped from development. At the time of writing it was OK with test data models from the Standard Channel of GeneratorApp. It is broken in the DEV channel of the GeneratorApp because of the migration of the generated source code to Android Architecture Components. The step for building will be the same as Android_with_Room_Kotlin

Android_with_greenDAO_Kotlin_incompatible_for_now– Generates All – models, data access, gluing code and fragments and activities with default operations on records of type defined by the user. (probably permanently) stopped from development because, at the time of researching about it GreenDao Library had it functionality encapsulated with OOP methodologies without exposing APIs from customization and Kotlin generates not exactly the same as Java byte-code which prevented me from from finishing the integration. I Don’t see value in continuing.

Android_with_ObjectBox– Generates All – models, data access, gluing code and fragments and activities with default operations on records of type defined by the user. Added after a feedback from LinkedIn- temporary stopped from development. At the time of writing it was OK with test data models from the Standard Channel of GeneratorApp. It is broken in the DEV channel of the GeneratorApp because of the migration to source code generation of Android Architecture Components. The step should be the same as Android_with_Room_Kotlin.

Android_with_ObjectBox_Kotlin– Generates All – models, data access, gluing code and fragments and activities with default operations on records of type defined by the user. Added after a feedback from LinkedIn- temporary stopped from development. At the time of writing it was OK with test data models from the Standard Channel of GeneratorApp. It is broken in the DEV channel of the GeneratorApp because of the migration to source code generation of Android Architecture Components. The step should be the same as Android_with_Room_Kotlin.

FLUTTER_under_development– Generates models, data access layer and widgets for managing the models0) Requirements – Flutter SDK. The Flutter Command Line has the commands that I’ll probably need. The first, before doing anything is the ‘doctor’.After it is OK:0.1) “create” flutter command – for creating project1) Get a Data Model2) Generate code2.1) Update the main.dart – to include the new Widgets3) ‘build’ flutter command4) Clean & Remove

JPA_MODEL_under_development– Generates Pojos, but with added JPA annotations (javax.persistence.* – @Entity, @Column, @Id, etc)0) Requirements – JDK, any working directory will be ok.Will be tested only for compilation/syntax errors.1) Get a Data Model2) Generate Code3) Compile3.1) Test the annotation with some kind of application that at scans the JPA models and loads them to the application context4) Clean & Remove

JDBC– Generates the simplest and minimal in Java bridge between the POJOs and the Database – Data Access Layer0) Will require JAVA_MODELS and The Databases Systems or libs. Will be tested only for compilation/syntax errors. 1) Get a Data Model2) Generate Code3) Compile3.1) (For Future Development) – Generate/Run Tests4) Clean & Remove

HIBERNATE_DAO_under_development– Generates Data Access Layer by using the Hibernate API (org.hibernate.* – Session, SessionFactory, CriteriaBuilder, Query)0) Will require HIBERNATE_MODEL have been run before and The Databases Systems or libs. Will be tested only for compilation/syntax errors. 1) Get a Data Model2) Generate Code3) Compile3.1) (For Future Development) – Generate/Run functional Tests4) Clean & Remove

Swift_Core_Data_early_alpha– generates models and the xmls that Core Data uses (or at least was using) to describe the models that it saves with this Data Framework by Apple.0) Requirements – will probably require Mac OS1) Get Data Models2) Generate Code (on non-Mac just for in-GeneratorApp Bugs)3) (For future Development) see how to integrate/load the XML directly to xcode/or search for some CL compiler4) Clean Up

FRAMEWORK7_under_development– Should generate Framework7 Front-End using some Rest/Web back-end. Currently not started.

ReactNative_under_development– Should generate Cross-Platform App using some local sqlite or Rest back-end repo. Currently not started.

NativeScriptAngular_under_development– Same as Angular Generator, but tries to generate NativeScript HTML(XML) UI – WIP0) Requirements – nodeJS/NPM installment, angular framework downloaded, cached whatever possible (so not every test run – will download all the stuff) 1) Get Data Models 2) Create NS Project 2.1) Move current directory to the app2.2) install additional libs and themes if necessary2.3)Generate Code3) Compile It – for debug/or production3.1) Run the app on a simulator (have a back-end app generated and started before if needed – like Spring, PHP_Json, JSP_Json, whatever)4) Stop app4.1) Clean up

VUE_JS_under_development– Should generate Vue Front-End Components using some Rest/Web back-end. Currently not started.

Legend – The solid green generators are considered ready for automation, the not exactly green will require some small effort or some kind of tuning to make it work, the pink generators are estimated to require a lot of effort and the red generators are considered as stopped from development for now.