Nothing Goes From Idea To Container Faster

Introduction to Models

realMethods architecture is a Model Driven Architecture and as such requires a business model in order to generate an application. The business model should capture:

  • The name of each business entity (Employee, Account, Company, etc..)
  • The data attributes for each business entity (first name, last name, ssn, dob, etc...)
  • Enumerated types that encapsulate a group of like data Ex: enum type VolumeLevel - (High, Medium, Low)
  • The parent name for an entity with a parent that represents an "is-a" relationship. Ex: (PlasmaTV is-a TV)
  • All relationships between entities. These relationships can be one direction (uni-directional) or both directions (bi-directional) and have varying multiplicity. Typical examples are: 1-to-1, 1-to-Many, Many-to-1, and Many-to-Many.
  • What To Consider

    Primary Keys

    In your model, it is best to exclude a primary key attribute. realMethods will auto-generate a primary key attribute and name it using the format {className}Id. If you create a primary key field, you should follow this naming convention so realMethods will infer the field is actually a primary key field

    Compound Primary Keys

    It is best NOT to use compound primary keys. realMethods has been designed to handle compound keys but the level of complexity it introduces does not warrant their usage. There is no guarantee each supported technology will effectively accommodate a compound primary key. Therefore, it is suggested to avoid compound keys.

    Model File Extension

    It is important the name of a model file have the appropriate extension so realMethods can deduce the model type. Each supported model type and expected extensions can be viewed below.

    Supported Model Formats

    realMethods supports the following model formats:

    YAML - file extension: [yaml or yml], example file
    JSON - file extension: [json], example file

    These formats are the fastest and easiest way to create a business entity model. Using a simple text editor, you can quickly create a model to reflect the model of your application. As with any other standard model, you can provide such things as entity names, data (type and scope), relationships including multiplicity, and enumerated types.

    Note: The structure of both the YAML and JSON files are specified by realMethods and are not an industry standard format. The example contains containers, subystems, components, and methods. These are empty in the example and will be available for specification soon.

    UML (Unified Modeling Language), file extension: [uml], versions: [2.0, 2.1], example file

    The Unified Modeling Language is a general-purpose, developmental, modeling language in the field of software engineering that is intended to provide a standard way to visualize the design of a system. Although most UML graphical tools (such as Argo UML) support many types of standard UML models, you only need to provide realMethods with a class diagram.

    XMI (XML Metadata Interchange), file extension: [xmi], versions: [1.1, 1.2], example file

    To realMethods, XMI is referring to older versions of UML files which were denoted as XMI 1.1 and 1.2. Although the syntax is different when compared to more recent UML files, the intent of such a file is relatively the same. Support for these XMI versions allows you to provide models for existing applications that were likely created years ago. In this way, when applied to a modern technology stack, realMethods is used to re-factor an existing application.

    SQL Script, file extension: [sql], example file

    A SQL script is a set of SQL commands saved as a file in SQL Scripts. A SQL script can contain one or more SQL statements or PL/SQL blocks. You can use SQL Scripts to create, edit, view, run, and delete script files. All modern RDMBS' allow you to export an existing database into a single SQL Script file.

    realMethods loads your SQL Script into a secure managed database in order to infer its entity model. The database tables and columns contain information that allow realMethods to deduce each business object, attribute types, and relationships between business objects.

    Note: The name of the SQL Script file must be prefixed with the name of the database table it references. For example, the example SQL Script file name is classic-model.sql. The database name the script references is classic. The script file is not expected to contain more than one database description/definition.
    Note: You may discover a database table manages its uniqueness using compound (more than one) primary keys. As mentioned, this is discouraged and before exporting to a SQL Script file, steps should be taken to consolidate the multiple keys into a single key.

    POJOs - Plain Old Java Objects, file extension: [jar], example file

    A POJO model type is a JAR file that contains one or more POJOs. A POJO is defined as a Java Bean where it fundamentally only contains one or more constructors, attributes, and accessor methods for each attribute. realMethods will ignore all methods defined on a POJO and will generate a get/set method pair for each attribute.

    Note: To effectively parse the JAR file to locate its POJOs, realMethods requires the specification of the root Java package. You can provide it during publishing with either with the realMethod CLI or Web Client.

    EMF (Eclipse Modeling Framework), file extension: [ecore], example file

    The EMF is a simple to use yet powerful modeling plugin for the Eclipse IDE. It can accommodate both simple and complex model definitions. If you use the Eclipse IDE, and are not using another modeling tool, this plugin is a good way to create a model.

Close Menu