Capsules are modeling language elements which are sometimes used to develop real-time software. One way to test such capsule elements without relying on dependencies to other units is to use mock objects. The aim of the study was to look at existing object-oriented design patterns and investigate how they could be used for capsules, in order to perform mock testing. The focus was to find solutions that were usable from the programmers’ point of view, meaning that they should promote high user effectiveness, efficiency and satisfaction when implementing them. It was also important that program efficiency wasn’t affected negatively. 5 design- or refactoring patterns were adapted for capsules: Constructor Injection, Setter Injection, Parameterize Method, Factory Method and Abstract Factory. Those patterns were evaluated by 5 programmers in a usability test, where Incarnate Injection (an adaptation of Constructor Injection) and Abstract Factory were considered most usable. Incarnate Injection seemed to be easier to implement and promoted high user efficiency, while Abstract Factory was considered more flexible. The performance tests indicated that Abstract Factory compromises program efficiency when the factory product is resource-heavy and is required frequently by dependent capsules. The study showed that it is possible to adapt design patterns to capsules by looking at conceptual similarities between capsules and classes. However, there are cases when this adaptation is impossible. Furthermore, even when adaptation is possible, it was apparent that different patterns adapt differently well to capsules.
Identifer | oai:union.ndltd.org:UPSALLA1/oai:DiVA.org:liu-133412 |
Date | January 2016 |
Creators | Wiberg, Fabian |
Publisher | Linköpings universitet, Programvara och system |
Source Sets | DiVA Archive at Upsalla University |
Language | English |
Detected Language | English |
Type | Student thesis, info:eu-repo/semantics/bachelorThesis, text |
Format | application/pdf |
Rights | info:eu-repo/semantics/openAccess |
Page generated in 0.1009 seconds