Skip to main content

On the Efficiency of Design Patterns Implemented in C# 3.0

  • Conference paper
Objects, Components, Models and Patterns (TOOLS EUROPE 2008)

Part of the book series: Lecture Notes in Business Information Processing ((LNBIP,volume 11))

Included in the following conference series:

Abstract

From the very inception of design patterns, there was the anticipation that some of them would be superceded by new language features. Yet published implementations of classic patterns do not generally live up to this promise. The occurrence of generics, delegates, nested classes, reflection and built-in iteration is confined to a few patterns in a few published compendiums in a few languages. In this paper we trace the interplay between languages and patterns over the past decade and investigate how relevant language features really are for pattern implementation. We back our conclusions with a detailed look at the visitor pattern, examining the impact of C# developed in the past few years. We conclude that efficiency should play a large role in the choice of design pattern implementation, since some new features still bring with them runtime overheads.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Agerbo, E., Cornils, A.: How to Preserve the Benefits of Design Patterns. In: Proc. OOPLSA, pp. 134–143 (1998)

    Google Scholar 

  2. Arnout, K., Meyer, B.: Pattern Componentization: the Factory Example. Innovations in Systems and Software Technology: A NASA Journal 2(2), 65–79 (2006)

    Article  Google Scholar 

  3. Baumgartner, G., Läufer, K., Russo, V.F.: On the interaction of object-oriented design patterns and programming languages. Technical Report CSR-TR-96-020, Purdue University (1996)

    Google Scholar 

  4. Bishop, J.: Language features meet design patterns: raising the abstraction bar. In: Workshop on the Role of Abstraction in Software Engineering (ROA 2008), co-located with ICSE (to appear, 2008)

    Google Scholar 

  5. Bishop, J.: C# 3.0 Design Patterns. O’Reilly Media, Sebastapol (2008)

    Google Scholar 

  6. Bosch, J.: Design Patterns as Language Constructs. Journal of Object-Oriented Programming 11(2), 18–32 (1998)

    Google Scholar 

  7. Chambers, C., Harrison, W., Vlissides, J.: A Debate on Language and Tool Support for Design Patterns. In: Proc. 27th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 277–289 (2000)

    Google Scholar 

  8. Data and Object Factory, Design Pattern Framework: C# Edition (2006), http://www.dofactory.com/Default.aspx

  9. Frick, A., Zimmer, W., Zimmermann, W.: On the Design of Reliable Libraries. In: Proc. of TOOLS 17, pp. 13–23 (1995)

    Google Scholar 

  10. Friedrich, M., Papajewski, H., Schröder-Preikschat, W., Spinczyk, O., Spinczyk, U.: Efficient Object-Oriented Software with Design Patterns. In: Czarnecki, K., Eisenecker, U.W. (eds.) GCSE 1999. LNCS, vol. 1799, pp. 79–90. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  11. Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Boston (1995)

    Google Scholar 

  12. Gil, J., Lorenz, D.: Design Patterns vs Language Design. In: Proc. of Workshop on Language Support for Design Patterns and Object-Oriented Frameworks (LSDF), pp. 108–111 (1997)

    Google Scholar 

  13. Grothoff, A.: The Runabout. Software: Practice and Experience (to appear, 2008)

    Google Scholar 

  14. Hannemann, J., Kiczales, G.: Design Pattern Implementation in Java and AspectJ. In: Proc. of OOPSLA, pp. 161–173 (2002)

    Google Scholar 

  15. Meyer, B., Arnout, K.: Componentization: the Visitor Example. Computer 39(7), 23–30 (2006)

    Article  Google Scholar 

  16. Microsoft Corporation: C# 3.0 Reference Documentation, http://msdn2.microsoft.com/vcsharp

  17. Nordberg III, M.E.: Variations on the Visitor Pattern. In: Proc. of Workshop on Pattern Languages of Programming (PLoP) (1996)

    Google Scholar 

  18. Palsberg, J., Jay, C.B.: The essence of the Visitor Pattern. In: Proc. 22nd IEEE Int. Computer Software and Applications Conf (COMPSAC), pp. 9–15 (1998)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Richard F. Paige Bertrand Meyer

Rights and permissions

Reprints and permissions

Copyright information

© 2008 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Bishop, J., Horspool, R.N. (2008). On the Efficiency of Design Patterns Implemented in C# 3.0. In: Paige, R.F., Meyer, B. (eds) Objects, Components, Models and Patterns. TOOLS EUROPE 2008. Lecture Notes in Business Information Processing, vol 11. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-69824-1_20

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-69824-1_20

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-69823-4

  • Online ISBN: 978-3-540-69824-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics