Building an Application using AjGenesis (Part 1)

This is the first step in a tutorial about how to use AjGenesis to generate an application. The target solution will be .NET, with C#, but I will add some VB.NET, PHP and Java examples, as a “proof of concept” of the power of an abstract model.

This is the first step: write a simple model. You can write the model in XML files, or in plain text files. In this first step, I will write the model in XML format.

The initial model is a free one: you can design the model as you want. In this serie of post, I will refine the model, step by step, to show how to design a complete solution, that can be reused and extended with manual code and extensions. I want to model an enterprise application: customers, suppliers, invoices, payments, etc. Let start with Customer and Supplier.

(You can download the code from (only three short XML files))

This is the Customer.xml file:


There is a similar file for Supplier.xml. Note that there is no schema to follow: you can add any tag in a well formed document. In the next steps, I will load the model in memory, to be process by AjGenesis tasks and template. AjGenesis will recognize automatically that <Properties> is a list of tags <Property>. See that there is simple values, like <Name>, and compound ones, like <Property>.

One of the principles that guided me in my design choices was: the model (XML, text file, etc..) should not hurt my eyes. So, instead of write all the model in only one file, I wrote another XML file that include the entities:

	<Description>Building an Application using AjGenesis</Description>
			<Entity Source="Customer.xml"/>
			<Entity Source="Supplier.xml"/>


The attribute Source is a distinguished one: AjGenesis process that tag including the content of the referenced file, as it were in the parent file. When AjGenesis load the model, it will be one in memory, altought it is serialized in many  files.

Next steps: how to use this model in AjGenesis, and generate some C# files from it.

Keep tuned!

Angel “Java” Lopez

4 thoughts on “Building an Application using AjGenesis (Part 1)

  1. Pingback: Armando una aplicación usando AjGenesis (Parte 2) - Angel "Java" Lopez

  2. Pingback: Armando una aplicación usando AjGenesis (Parte 3) - Angel "Java" Lopez

  3. Pingback: Building an Application Using AjGenesis (Part 4) « Angel “Java” Lopez on Blog

  4. Pingback: Armando una aplicación usando AjGenesis (Parte 5) - Angel "Java" Lopez

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s