Existing g9 generators
Included with g9 are a suite of generators that are used in conjunction with the various models to generate the java code for both the back-end and front-end parts of the application. The Xtend based generators can be copied to create new variants or they can be modified to adhere to company standards and adapt best practices.
Hover over the names to get more details.
Model Category | Generator |
---|---|
Domain Model
The domain model is a conceptual model that describes the application, the various entity classes, their attributes, roles, relationships, associations and constraints.
|
Java Domain
The Java domain generator generates domain classes for each class defined in the domain model including the Enumeration classes. By default, the domain generator will generate two Java classes for each domain model class. The two classes are named <ClassName>Default.java and <ClassName>.java, the last one being a subclass of the first. The superclass will always be overwritten each time the domain generator is run. The subclass will only be generated if the Java file does not exist, thus preserving existing code in the subclass.
|
Xcore
The Xcore generator generates an Xcore representation of the g9 domain model. One Xcore file is written for each package that contains a Class, an Enumerator or an Interface to be generated. For referenced Usertypes, Converters and Groups, their package files are also written.
|
|
REST client
The RESTclient generated code makes requests to a service based on what is modeled by the user and returns the data to whichever target is being used. The supported data format is JSON.
|
|
REST server
The RESTserver generated code listens to a set of URIs modeled by the user, invokes business logic, and returns a response to the client. The supported format is JSON.
|
|
SOAP/Castor
The SOAP/Castor Domain generator target generates Java transport classes that correspond to the OS-roles bound to interfaces in the model. It uses the Castor open source data binding framework to marshal the transport objects to and from XML. (See http://castor.codehaus.org) The generator also generates converter classes used to transfer values to and from the domain and transport layer. Castor mapping files are also generated to map the java classes with XML.
The generated java code is intended to be used alongside code generated with the WSDL, WSClient and XSD target generators. |
|
WS client
The WS Client generator is used for generating a web service client implementation of an interface. It creates the file <InterfaceName>WSClient.java for each interface defined in the domain model. The implementation handles the conversion to and from the domain and transport objects and delegates the web service invocations to the Spring WebServiceTemplate object which marshals the web service message. The generator also generates the web service property file and web service implementation files.
|
|
WSDL
The WSDL generator is used for generating the Web Service Description Language document for the interface defined in the domain model. Depending on the configuration properties, it also generates the following files:
|
|
XSD
The XSD generator is used for generating the XML schema definition for the interface defined in the domain model and a schema definition for each root role defined in the object selection that is bound to the interface. The generated schemas are saved in the specified XSD directory using the TransportPackage parameter and are named as follows:
|
|
Dialog Model
A dialog model is a model that describes the user-interface components specific to the client target that are used in an application. Depending on the target client, a dialog could refer to an application window in the windows environment or it could refer to a web page in a web browser. The information for the dialog can be defined in the domain model and can be visually displayed.
|
ReactJS
The ReactJS target is a REST based web target, using the ReactJS framework and Redux framework which are used for component data bindings. ReactJS uses NodeJS and Webpack to transpile/compile javascript code to javascript bundles. Node Package Mananger (NPM) is used to download dependencies used by Webpack.
ReactJS is a Javascript based framework where React components in a shadow DOM generate simple HTML with events that simply binds back to the components in the shadow DOM. ReactJS uses a mix of JSX markup and the latest experimental javascript features from ES2016. This is transpiled by Babel into javascript code compatible with all popular web browsers. The HTML code is based on HTML5 which has a mixed browser support, but will still work nicely for unsupported features. ReactJS server-side uses a REST-wrapper for JGrape services. |
Swing
The Swing generator is used for generating the client GUI java code using Swing components in JFC. The generated code is based on the dialog models and their corresponding object selections along with the generator configuration parameters.
The generated code is used along with the code generated by the Service generator through either a local interface using POJOs or it may access the service through an EJB interface and the Spring framework is used for managing the application context. |
|
ICEfaces
ICEfaces is an Ajax based web target using the ICEfaces JSF framework which is an open source framework based on the Java Server Faces 2 standard. It consists of a suite of components (ACE) and a framework for extending the capabilities of standard JavaServer Faces. The Java ICEfaces generator builds the java code for the web client and all supporting files. This includes the Java controller and view classes, JSF configuration files, the Facelet files (a page declaration markup language), the CSS stylesheets, Ant build files and a helper class for running the Jetty embedded servlet container.
|
|
Jouteur
Jouteur is a tool for enabling automated test of g9 based applications. It is designed to encapsulate and remove many of the problems that typically arise when producing test suites for GUI applications. It defines an interface for emulating user actions on a dialog and generates classes for simulating user interactions. Jouteur can also read data from a domain model and inject the data into the dialog.
The client generator generates classes for simulating user interactions during test, setting up the test environment, classes for reading and constructing test data and injecting this data into a dialog. Note that Jouteur does not generate test scripts nor does it generate test data. |
|
AngularJS/Bootstrap
The AngularJS/Bootstrap generator enables you to quickly generate a html5 client, styled with Bootstrap, using AngularJS for controller logic and REST server communication. The generator makes use of both dialog models and object selections in g9, and uses interfaces and the bind model to define server communication.
|
|
Jasper Report
The Jasper Report generator is used for generating reports that are visual representations of the dialog models. The generator uses the JasperReports Library which is an open-source Java library for creating reports from within a java environment.
The generator creates .jrxml files which are report templates based on the dialog models. These files must be validated and compiled into one or more JasperReports objects, and serialized as .jasper files. The generator creates a build.xml that calls upon an Ant task included in the JasperReports distribution to take care of this step. The result of all this is that there will be one or more .jasper files for each dialog that is printable. |
|
Spreadsheet Export
The Spreadsheet Export generator generates Java code for exporting g9 dialogs and data to Excel spreadsheets. An 'exportToSpreadsheet' action exists that allows the user to assign the creation of the spreadsheet to a method and GUI system event. The runtime and generated code uses the Apache POI library which supports the generation of Excel file formats: HSSF: Excel '97(-2007) file format (.xls) and XSSF: Excel 2007 OOXML file format (.xlsx)
|
|
Dialog Model Report
The Dialog Model Report generator is used for generating dialog specification reports in an HTML format. The specifications are based on a set of HTML templates.
|
|
Object Selection
An object selection is a subset of a class model that specifies those classes that comprise the information model used by a dialog or a service. Normally, you have one object selection for each dialog specified in the domain model. The object selection is used to generate service code that provides CRUD operations for the dialog.
|
JGrape
The JGrape generator generates code for the service part of the application. This includes the code for all necessary CRUD actions. The code generated is based on the object selections together with the parameter settings.
|
REST JGrape Wrapper
The REST JGrape Wrapper generator generates a REST layer on top of the JGrape service code for an Object Selection. The REST layer is based on Spring Boot, and generates an Application class for the Application Model, and one RestController class for each Object Selection.
|
|
Java2XML
The Java2XML generator is used for converting an object selection to an org.w3c.dom.Document that is used when printing Dialog reports using Jasper Reports.
Two classes will be generated for each object selection:
|
|
JMS/Castor
The JMS/Castor generator is similar to the SOAP/Castor generator in that generates transport classes, however since it is a service generator, it generates artifacts for all OS root roles defined in the object selections, not just the OS-roles bound to interfaces. It also generates the Spring message converter classes for every OS root role.
|
|
Object Selection Report
The Object Selection Report generator is used for generating object selection reports in an HTML format.
|
|
Database Model
A database model is used to define a a specific database implementation for a target DBMS. The model is generated from the persistent parts of the class model, as defined in the domain model. The model allows for the generation of DBMS schema scripts based on the target DBMS.
|
Hibernate
The Hibernate generator is used for generating the configuration and data access files required by the Hibernate ORM. Hibernate is a Java object relational mapping library used for mapping a domain model to a relational database.
The generator creates a mapping class for each domain class named <ClassName>.hbm.xml and is generated in the package as defined for the class. These files map the classes and its attributes to the database tables and its columns. For value object columns in the Database Model, the Hibernate generator will create component elements in the mapping. Component elements may be nested if a value object class contains value object attributes. |
MySQL
The MySQL DBMS Schema generators are used to generate MySQL scripts which can be used to generate the database.
|
|
Derby
The Derby DBMS Schema generators are used to generate Derby scripts which can be used to generate the database.
|
|
Oracle
The Oracle DBMS Schema generators are used to generate Oracle scripts which can be used to generate the database.
|
|
Sybase
The Sybase DBMS Schema generators are used to generate Sybase scripts which can be used to generate the database.
|
|
SQL Server
The SQL Server DBMS Schema generators are used to generate SQL Server scripts which can be used to generate the database.
|