Chapter 8: Code Organization and Metadata


Overview

This is the last chapter in the book, and it gives us a good opportunity to consider the larger issues that affect the logical and physical organization of our C# applications. In the first part of this chapter, we'll look at how applications may be logically structured during coding; then in the second part we'll see how this translates to a physical partitioning of files in preparation for deployment.

We'll discuss how to use namespaces to partition an application into groups of related types. Namespaces emphasize the logical structure of the application, and avoid clashes between type names. The .NET Framework class library highlights the importance of namespaces; the class library has been designed in a modular fashion, and namespaces reinforce the organization of the class library. We'll see how to define namespaces in C#, we'll see where this information is held in Visual Studio .NET, and we'll provide design guidelines that will help you use namespaces effectively. As an overview, in this chapter we:

  • Discuss the definition of namespaces and how to create nested namespaces

  • Investigate assemblies and metadata, which contain, among other things, versioning information, the files needed to run an application, and the various types defined

  • Discover how to deploy applications in multi-assembly format

  • Learn how to create shared assemblies and place them in the Global Assembly Cache (GAC) for easy discovery by the runtime

  • See how to document code and how to furnish an assembly with information such as our company name, a copyright notice, and a description of the assembly

Parts of this chapter make use of Visual Studio .NET, rather than just the Framework SDK. We'll start with a discussion of namespaces.




C# Class Design Handbook(c) Coding Effective Classes
C# Class Design Handbook: Coding Effective Classes
ISBN: 1590592573
EAN: 2147483647
Year: N/A
Pages: 90

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net