Advertisement

Software Quality Journal

, Volume 23, Issue 4, pp 661–694 | Cite as

Spoiled patterns: how to extend the GoF

  • Cédric BouhoursEmail author
  • Hervé Leblanc
  • Christian Percebois
Article

Abstract

Design patterns were popularized by the GoF catalog in 1995. This catalog contains 23 design patterns which concern 23 design problems. Each pattern is detailed with its structure, its intent, and some information including applicability conditions and some possible variations which enable it to be re-used. In 1995, they were the cutting edge thought processes. We consider that design patterns have two major features. First, they are the result of emergent conceptions validated by a community through a well-defined acceptance process. They are a field of expert knowledge. Secondly, they must be as abstract as needed to be able to maximize their reusability. They constitute a compilation of best practices concerning object codes and designs. We propose to extend the GoF with a new concept that we have named “spoiled patterns”. They are midway between bad smells in design necessary to go ahead with a refactoring and a necessary learned lesson in order to explain anti-patterns. Each design pattern corresponds to some spoiled patterns. In this paper, we present how we have compiled the first spoiled patterns catalog, by carrying out several experiments with a lot of young inexperienced designers.

Keywords

Design patterns Spoiled patterns Best practices  Bad smells Anti-patterns Pattern teaching 

References

  1. Albin-Amiot, H., & Guéhéneuc, Y. G. (2001a). Meta-modeling design patterns: Application to pattern detection and code synthesis. In B. Tekinerdogan, P. V. D. Broek, M. Saeki, P. Hruby, & G. Suny (Eds.), Proceedings of the 1st European conference on object-oriented programming (ECOOP) workshop on automating object-oriented software development methods. Centre for Telematics and Information Technology, University of Twente. TR-CTIT-01-35.Google Scholar
  2. Albin-Amiot, H., Cointe, P., Guéhéneuc, Y. G., & Jussien, N. (2001). Instantiating and detecting design patterns: Putting bits and pieces together. In D. Richardson, M. Feather, & M. Goedicke (Eds.), Proceedings of the 16th conference on automated software engineering (ASE) (pp. 166–173). IEEE Computer Society Press.Google Scholar
  3. Baroni, A. L., Guéhéneuc, Y. G., & Albin-Amiot, H. (2003). Design patterns formalization. Research report 03/03/INFO, Computer sciences department, École des Mines de Nantes.Google Scholar
  4. Bouhours, C., Leblanc, H., & Percebois, C. (2011). Sharing bad practices in design to improve the use of patterns (regular paper). In International conference on pattern languages of programs 2010 (PLoP). Reno, Nevada, USA: ACM DLGoogle Scholar
  5. Bouhours, C., Leblanc, H., Percebois, C., & Millan, T. (2010). Detection of generic micro-architectures on models. In Proceedings of PATTERNS 2010, the second international conferences on pervasive patterns and applications (pp. 34–41). Lisbon, Portugal.Google Scholar
  6. Bouhours, C., Leblanc, H., & Percebois, C. (2009). Bad smells in design and design patterns. Journal of Object Technology, 8(3), 43–63.CrossRefGoogle Scholar
  7. Brown, W. J., Malveau, R. C., & Mowbray, T. J. (1998). AntiPatterns: Refactoring software, architectures, and projects in crisis. London: Wiley.Google Scholar
  8. Dewan, P. (2005). Teaching inter-object design patterns to freshmen. In Technical symposium on computer science education (Vol. 37, pp. 482–486).Google Scholar
  9. Dietrich, J., & Elgar, C. (2005). A formal description of design patterns using owl. In Proceedings of the 16th Australian software engineering conference (pp. 243–250). Los Alamitos, CA, USA: IEEE Computer Society.Google Scholar
  10. Dodani, M. (2006). Patterns of anti-patterns? Journal of Object Technology, 5(5), 29–33.CrossRefGoogle Scholar
  11. Dong, J., & Zhao, Y. (2007). Classification of design pattern traits. In Proceedings of the 19th international conference on software engineering and knowledge engineering (SEKE) (pp. 473–477).Google Scholar
  12. Duell, M., Goodsen, J., & Rising, L. (1997). Non-software examples of software design patterns. In OOPSLA ’97: Addendum to the 1997 ACM SIGPLAN conference on object-oriented programming, systems, languages, and applications (Addendum) (pp. 120–124). New York, NY: ACM.Google Scholar
  13. Eden, A. H., Yehudai, A., & Gil, J. (1997). Precise specification and automatic application of design patterns. In Proceedings of the 12th international conference on automated software engineering (ASE) (pp. 143–152). Washington, DC, USA: IEEE Computer Society.Google Scholar
  14. El-Boussaidi, G., & Mili, H. (2008). Detecting patterns of poor design solutions using constraint propagation. In Proceedings of the 11th international conference on model driven engineering languages and systems (MoDELS) (Vol. 5301/2009, pp. 189–203). Berlin: Springer.Google Scholar
  15. Fagan, M. (2002). Design and code inspections to reduce errors in program development. In M. Broy & E. Denert (Eds.), Software pioneers (pp. 575–607). New York, NY: Springer.CrossRefGoogle Scholar
  16. Fowler, M., Beck, K., Brant, J., Opdyke, W., & Roberts, D. (1999). Refactoring: Improving the design of existing code. Boston, MA: Addison-Wesley.Google Scholar
  17. France, R., Ghosh, S., Song, E., & Kim, D. K. (2003). A metamodeling approach to pattern-based model refactoring. IEEE Software, 20(5), 52–58.CrossRefGoogle Scholar
  18. Gamma, E., Helm, R., Johnson, R., & Vlissides, J. (1995). Design patterns. Boston, MA: Addison-Wesley.Google Scholar
  19. Gibbon, C. A., & Higgins, C. A. (1996). Towards a learner-centred approach to teaching object-oriented design. In Proceedings of the third Asia-Pacific software engineering conference, APSEC ’96 (pp. 110–117). Washington, DC: IEEE Computer Society.Google Scholar
  20. Gibbon, C., & Higgins, C. (1996). Teaching object-oriented design with heuristics. SIGPLAN Notices, 31, 12–16.CrossRefGoogle Scholar
  21. Guennec, A. L., Sunyé, G., & Jézéquel, J. M. (2000). Precise modeling of design patterns. In Proceedings of 3rd international conference on the unified modeling language (UML) (pp. 482–496). Berlin: Springer.Google Scholar
  22. Harb, D., Bouhours, C., & Leblanc, H. (2009). Using an ontology to suggest design patterns integration. In M. Chaudron (Ed.), Workshops and symposia at models 2008, 5421 (pp. 318–331). Toulouse: Springer (Best paper).Google Scholar
  23. Jiménez-Díaz, G., Gómez-Albarrán, M., & González-Calero, P. A. (2008). Teaching GoF design patterns through refactoring and role-play. International Journal of Engineering Education, 24, 717–728.Google Scholar
  24. Kampffmeyer, H., & Zschaler, S. (2007). Finding the pattern you need: The design pattern intent ontology. In Proceedings of the 10th international conference on model driven engineering languages and systems (MoDELS), lecture notes in computer science (Vol. 4735/2007, pp. 211–225). Springer.Google Scholar
  25. Kerievsky, J. (2005). Refactoring to patterns. Addison-Wesley signature series. Boston, MA: Addison-Wesley.Google Scholar
  26. Khomh, F., Penta, M. D., Guéhéneuc, Y. G., & Antoniol, G. (2012). An exploratory study of the impact of antipatterns on class change- and fault-proneness. Empirical Software Engineering, 17(3), 243–275.CrossRefGoogle Scholar
  27. Larman, C. (2002). Applying UML and patterns: An introduction to object-oriented analysis and design and the unified process (2nd edn). Prentice Hall PTR, Upper Saddle River, NJ, USA. Chapter 16—GRASP: Designing Objects with Responsibilities.Google Scholar
  28. Mak, J. K. H., Choy, C. S. T., & Lun, D. P. K. (2004). Precise modeling of design patterns in UML. In Proceedings of the 26th international conference on software engineering (ICSE) (pp. 252–261). Los Alamitos, CA, USA: IEEE Computer Society.Google Scholar
  29. Mili, H., & El-Boussaidi, G. (2005). Representing and applying design patterns: What is the problem? In Proceedings of the 8th international conference on model driven engineering languages and systems (MoDELS) (pp. 186–200).Google Scholar
  30. O’Cinnéide, M., & Nixon, P. (1999). A methodology for the automated introduction of design patterns. In Proceedings of the 15th IEEE international conference on software maintenance (ICSM) (pp. 463–473). Washington, DC, USA: IEEE Computer Society.Google Scholar
  31. Pecinovský, R., Pavlíčková, J., & Pavlíček, L. (2006). Let’s modify the objects-first approach into design-patterns-first. ACM Sigcse Bulletin, 38, 188–192.CrossRefGoogle Scholar
  32. Riehle, D. (1997). Composite design patterns. In Proceedings of the 1997 ACM SIGPLAN conference on object-oriented programming systems, languages and applications (pp. 218–228). ACM Press.Google Scholar
  33. Riehle, D. (2011). Lessons learned from using design patterns in industry projects. In J. Noble, R. Johnson, P. Avgeriou, N. Harrison, & U. Zdun (Eds.), Transactions on pattern languages of programming II, lecture notes in computer science (Vol. 6510, pp. 1–15). Berlin, Heidelberg: Springer. doi: 10.1007/978-3-642-19432-0_1.
  34. Sendall, S. (2002). Gauging the quality of examples for teaching design patterns. In Workshop on “Killer Examples” for design patterns and objects first, at the conference on object-oriented programming systems, languages and applications (OOPSLA’2002), Seattle, USA, November 4 (2002). Also available as Technical Report IC/2002/83, Ecole Polytechnique Fédérale de Lausanne (EPFL), School of Computer and Communication Sciences.Google Scholar
  35. Siddle, J. (2011). Choose your own architecture—interactive pattern storytelling. In J. Noble, R. Johnson, P. Avgeriou, N. Harrison, & U. Zdun (Eds.), Transactions on pattern languages of programming II, Lecture notes in computer science (Vol. 6510, pp. 16–33). Berlin: Springer. doi: 10.1007/978-3-642-19432-0_2.
  36. Yacoub, S., & Ammar, H. (2003). Pattern-oriented analysis and design: Composing patterns to design software systems. Boston, MA: Addison-Wesley Longman.Google Scholar

Copyright information

© Springer Science+Business Media New York 2014

Authors and Affiliations

  • Cédric Bouhours
    • 1
    Email author
  • Hervé Leblanc
    • 2
  • Christian Percebois
    • 2
  1. 1.LIMOSUniversité d’AuvergneClermont-FerrandFrance
  2. 2.IRITUniversité de ToulouseToulouseFrance

Personalised recommendations