11.07.2015 Views

Beginning C# 2008-from Novice-to-professional - A2Z Dotnet

Beginning C# 2008-from Novice-to-professional - A2Z Dotnet

Beginning C# 2008-from Novice-to-professional - A2Z Dotnet

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

54CHAPTER 3 ■ LEARNING ABOUT STRING MANIPULATIONSAs in Chapter 2, we’ll create the solution as components, with three pieces: a Windowsapplication, a testing console application, and a class library. After you have created each ofthe projects, your workspace should look like Figure 3-1. Remember <strong>to</strong> add a reference <strong>to</strong> theLanguageTransla<strong>to</strong>r class library (right-click References and choose Add Reference ➤ Project➤ LanguageTransla<strong>to</strong>r). Also remember <strong>to</strong> set TestLanguageTransla<strong>to</strong>r as the startup project.Figure 3-1. Structure of projects for the translation application in Visual <strong>C#</strong> Express SolutionExplorerBuilding the Transla<strong>to</strong>r ApplicationThe translation application, like the calcula<strong>to</strong>r application example in the previous chapter, isbuilt in pieces: the class library that performs translations based on data delivered by the userinterface, the tests, and the user interface. The individual pieces are components that can befit <strong>to</strong>gether like a jigsaw puzzle <strong>to</strong> create an application.■Note Components are a core part of your development <strong>to</strong>olbox. As you will see throughout the book,components allow you <strong>to</strong> reuse and modularize functionality. Components result in applications that aremaintainable and extendable. Of course, there are limits, and the advantages are not au<strong>to</strong>matic. You willneed <strong>to</strong> properly design your application <strong>to</strong> benefit <strong>from</strong> using components.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!