Artifact: Source Code
Source code is the representation of the software of a system in a (usually 3G) language.
Domains: Development
Purpose
The purpose of the source code is to capture the semantics of the software in a language that can easily be compiled into the different native machine languages of desired target computers.
Relationships
RolesResponsible: Modified By:
TasksInput To: Output From:
Description
Main DescriptionFor the most part, the source code can be generated automatically from the UML model of the system or application. In our experience, it is possible to generate 80% - 95% of the application from the model and retain the efficiency of hand-developed source code.  There are cases where legacy source code may be effectively reused (such as with math libraries or device drivers).  Developers are urged to take advantage of already developed and validated source code when it is available and meets the needs of the system under development.
NotationSource code is represented in textual symbols arranged in specific syntactic structures as required by the language of the source code.
Key Considerations
The task of developing source code should not be considered complete until the source code is unit tested and (if desired) peer reviewed. Note however, in a model-based development process or project, the importance of the source code is de-emphasized, since the design is directly represented in the UML. Thus, source code maintenance and reviews become less important than they are in code-based development projects.
Tailoring
Impact of not havingSource code is less important in a model-driven approach than it is in a code-based approach, but nevertheless, the source code is required for compilation into the native machine code for most available modeling tools. Additionally, it provides another point at which changes can be made, when desired; however, it is crucial that the changed source code be brought back into the model when this is done.
Reasons for not needingA modeling tool might elect to directly produce machine code from the model and source code might not be needed in that case.
More Information