Chapter 2. Class Design and Prototyping

In art the hand can never execute anything higher than the heart can inspire.

Ralph Waldo Emerson

Programming is a creative process. The heart of that process is the requirements analysis and design phase of the software development life cycle. There are several different versions or renditions of the software development life cycle. 2-1 is one depiction. The result of this creativity, your program, cannot exceed the quality of the design. For many, comparing a developer to van Gogh might be considered heresy, but parallels do exist. Programming is as much creative as it is analytical. An artist does not start with a paintbrush and a canvas. There is considerable preparation before painting can begin. For example, Michelangelo devoted many years in preparation, including drawing several sketches that are now famous, before painting the Sistine Chapel. Similarly, developers do not simply start writing code. The requirements analysis must be undertaken, a design drafted, the prototyping of class operations, and only then, finally, the implementation.

The software development life cycle.

Figure 2-1. The software development life cycle.

This chapter presents techniques and best practices for software modeling, which is integral to the software development life cycle. Software modeling documents various phases of the software development life cycle. This is particularly relevant to the design phase. Most important, software modeling provides a tangible representation of the various phases of the software development life cycle. This provides an ability to validate the correctness of the analysis, design, specification, and so on. This validation is essential to developing and deploying high-quality software. A modeling language can be used to paint various perspectives of a software system. Together, this combined perspective provides a complete picture of the software system. As mentioned, software modeling has the greatest relevance to the design phase, which is the emphasis of this chapter. However, while this chapter provides some best practices for designing the application, subsequent chapters will continue the focus on overall application design and address other key aspects of application design, such as metaprogramming, performance, and security.

Later in the chapter, prototyping is discussed with recommended best practices and policies. Prototyping should occur before the code phase of the software development cycle or when implementation of the application begins. Prototyping is a natural extension of software modeling that allows you to validate many of the assumptions made in modeling the software development life cycle.

Visual Studio is the primary tool in this chapter for both software modeling and prototyping. Visual Studio is a collaborative tool, where software architects can build class diagrams and developers can implement solutions.

Collaboration in Visual Studio

Microsoft has expanded the role of Visual Studio. It is no longer a developer-centric tool. Visual Studio has features that benefit everyone who participates in the software development life cycle. Microsoft, some time ago, realized that developers are not islands unto themselves. They work together with other professionals, such as program managers and testers, in a collaborative environment to create stable and robust products. Previously these various roles in the software life cycle, such as software architect or designer, were segregated by technology. No single tool encompassed most of the features needed by everyone. Learning and maintaining separate tools hurt productivity and inherently resulted in brittle solutions. Microsoft realized this and started moving Visual Studio in a more collaborative direction—particularly with the advent of Visual Studio Team System (VSTS). With successive iterations of the product, Visual Studio has expanded upon the repertoire of collaborative features. For example, the class diagram capability is a relatively new feature that is beneficial for developers but also software architects. Unit testing and code analysis were recently introduced and they further integrate testers and quality assurance professionals into Visual Studio. Here are some of the benefits of this integration:

  • Visual Studio is the apex of all things related to the software development life cycle, which is convenient and efficient.

  • As such, Visual Studio becomes a permanent record of each aspect of the software development life cycle.

  • It provides a single location to maintain and version design documents, class diagrams, unit tests, code, and other documents pertaining to the project.

Integration of various roles into Visual Studio is demonstrated and highlighted in this chapter. The benefits are clearly shown.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.22.216.254