Preserving Use Case Flows in Source Code: Approach, Context, and Challenges


Michal Bystrický, Valentino Vranić




Being able to see use case steps directly in code would make the intent expressed by the code more comprehensible and easier to maintain. In this paper, an approach to preserving use case flows (of events) in source code called InFlow is presented within a broader context of its application in the software development process along with the issues that remain as challenges. The approach preserves individual steps of use case flows in the form of their counterpart statements, as well as their ordering. This is achieved by mimicking each use case flow by a sequence of method implementations with each step of the use case flow corresponding to one statement in one of these methods, enabled by the annotation named InFlow. A study of implementing an audio streaming service using InFlow, DCI, and aspect-oriented software development with use cases has been performed and assessed using several metrics in order to determine the level of preserving use case flows in source code. Although InFlow introduces a lot of indirect references to code, the overall results speak in favor of InFlow. DCI adds more complexity to following a use case flow in code than other two approaches. Complexity of making a change to a use case flow ended up with closely matching results. But InFlow guarantees traceability of use case implementation from the domain model implementation.