Se2030-03 Synchronizing Source Code With UML Models

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 9

Synchronizing Source Code with UML

Models

1
Forward, Reverse, Round-Trip Engineering

2
Forward, Reverse, Round-Trip Engineering…

3
Forward, Reverse, Round-Trip Engineering…

4
Synchronizing source code with UML models

 Forward engineering: a system model is refined from an architecture into


designs at several levels of abstraction, and, eventually, an implementation.

 Reverse engineering: a system’s design and/or architecture is abstracted


from its implementation.
5
Synchronizing source code with UML models

 Round-trip software engineering.


 Forward engineering: a system model is refined from an
architecture into designs at several levels of abstraction, and,
eventually, an implementation. Certain system aspects may
be implemented directly from an architectural description.
 Reverse engineering: a system’s design and/or architecture
is abstracted from its implementation. Modifications to a
model at any level must be properly reflected in higher- and
lower-level models

6
Synchronizing source code with UML models

 Round-trip engineering based on UML needs three basic


components for software development:
 Source Code Editor;
 UML Editor for the Attributes and Methods;
 Visualization of UML structure.
 An example of basic round-trip engineering is accessible as a
web-based Open Source tool is:
 JavaScript Class Creator allows integrated round-trip engineering for
JavaScript Classes.
 UML Diagrams are generated with a diagram library JointJS.
 Editing of Javascript Source Code is realized with the editor ACE

7
Synchronizing source code with UML models

 Synchronize Model and Code


 In addition to generating and importing code, Enterprise
Architect provides the option to synchronize the model and
source code, creating a model that represents the latest
changes in the source code and vice versa.

8
Synchronizing source code with UML models

 Use model as the source, or the code as the source.


 For example: you generated some source code, but made
subsequent changes to the model.
 When you generate code again, Enterprise Architect adds
any new attributes or methods to the existing source code,
leaving intact what already exists.
 This means developers can work on the source code and then
generate additional methods as required from the model,
without having their code overwritten or destroyed.

You might also like