Code Engineering

Return to Introduction  Previous page  Next page

Code Engineering is a process that includes automated code generation, reverse engineering of source code and synchronization between the source code and model.

Code Engineering is only available in the Professional and Corporate editions of Enterprise Architect.

Code Generation

Generating code is also known as Forward Engineering. Enterprise Architect enables you to generate source code from UML model elements, creating a source code equivalent of the Class or Interface element for future elaboration and compilation. In particular you can generate C, C++, C#, Delphi, Java, PHP, Python, ActionScript, Visual Basic and VB.NET source code. The source code generated includes Class definitions, variables and function stubs for each attribute and method in the UML Class. You can use the Source Code Viewer to view any source code you are opening.

The Code Template Framework (CTF) enables you to customize the way Enterprise Architect generates source code and also enables you to generate languages that Enterprise Architect does not specifically support by helping you define the appropriate code generation templates for that language (this is discussed in the Enterprise Architect Software Developers' Kit (SDK)).

You can link the facilities of Enterprise Architect to other development environments. The MDG Link for Eclipse and MDG Link for Visual Studio.NET are standalone products that provide an enhanced code engineering functionality between Enterprise Architect and the development environments.

Enterprise Architect also enables you to rapidly model, forward engineer and reverse engineer XML Technologies, namely XML Schema (XSD) and Web Service Definition Language (WSDL).

Reverse Engineering

Reverse Engineering is the import of existing source code into model elements, mapping the source code structures onto their UML representations. This enables you to examine legacy code and the functionality of code libraries for reuse, or to bring the UML model up to date with the code. You can reverse engineer in the same languages as   you perform code generation with Enterprise Architect.

Enterprise Architect is also able to reverse engineer certain types of binary files: Java .jar files and .NET PE files.

Note: Reverse Engineering of other languages including CORBA IDL is also currently available through the use of the MDG Technologies.


Synchronization is when changes in the model are exported to the source and changes to source are imported into the model. This enables you to keep your model and your source code up to date as the project develops.

Round-Trip Engineering

Round trip engineering occurs as a combination of reverse and forward generation of code and should include synchronization between the source code and the model in all but the most trivial of code engineering projects. In order to get the most out of round trip engineering in Enterprise Architect, you should be familiar with the modeling conventions used when generating and reverse engineering the languages you use.