Copyrighted Material

Copyrighted Material

Contents Introduction xxix Part I: Design Strategies 1 Chapter 1: Defi ning the Language Environment 3 Defi ning the Design Strategy Elements 4 Considering the C# Language 5 Understanding the Benefi ts 5 Understanding the Defi ciencies 8 Developing with Multiple Languages 10 Multiple Platform Scenarios 11 Inventorying Your Tools 12 Gathering Your Resources 12 Inventorying Team Language Resources 13 Considering Team Skills 13 Understanding the Signifi cance of Experience 14 Defi ning External Resource Requirements 14 Developing Your Design Strategy 15 Chapter 2: Understanding the Application Lifecycle 17 Understanding the Lifecycle Stages 18 Developing an Application Concept 18 Building an Application Development Team 19 Defi ning a Specifi cation 21 Determining Whether the Concept Will Work 22 Creating a DesignCOPYRIGHTED MATERIAL 24 Testing the Design 26 Implementing the Design 27 Writing the Application 28 Testing User Requirements 31 Enhancing Reliability and Security 32 Deploying the Application 33 Supporting and Maintaining the Application 34 Retiring the Application 35 115962ftoc.indd5962ftoc.indd xxvv 11/22/09/22/09 110:42:090:42:09 AAMM Contents Considering a Lifecycle Model 35 Using the Spiral Model 36 Using the Waterfall Model 38 Using the Throwaway Model 40 Using the Evolutionary Model 41 Using the Incremental/Iterative Model 42 Using the Rapid Application Development (RAD) Model 43 Using Agile Programming Techniques 46 Understanding Agile Programming 46 Benefi ts of Agile Programming 47 Defi ciencies of Agile Programming 48 Common Agile Programming Strategies 48 Developing Your Design Strategy 54 Chapter 3: Defi ning a Design Strategy 55 Creating an Object Model 56 Defi ning the Class Concepts 56 Developing Internal Classes 60 Adding External Classes 61 Considering Class Trade-offs 62 Improving the Class Design 63 Building a Data Model 64 Defi ning the Data Requirements 64 Considering Access, Reliability, and Security Requirements 66 Creating the Data Classes 67 Considering User Requirements 67 Defi ning the User Requirements 68 Creating the User Classes 70 Turning Your Design into UML 70 Getting Started with Visio 71 An Overview of the Visio UML Functionality 72 Generating Code from UML 75 Developing Your Design Strategy 77 Chapter 4: Designing the User Interface 79 Understanding the Application Form Types 80 Creating a Dialog Utility 80 Interacting with the Single Document Interface (SDI) 82 Interacting with the Multiple Document Interface (MDI) 84 Relying on a Tabbed Interface 85 Developing Specialty Skinned and Free-Form Applications 86 xvi 115962ftoc.indd5962ftoc.indd xxvivi 11/22/09/22/09 110:42:090:42:09 AAMM Contents Working with RibbonX Applications 87 Using the Notifi cation Area 89 Investigating the Command Line 90 Understanding the Common User Interface Types 91 Menu Driven 91 Task Driven 92 Information Driven 92 Wizard Driven 93 Role Driven 94 Developing a User Interaction Strategy 95 Keeping the User in Control 96 Nudging the User in the Right Direction 97 Designing an Interface That Interacts 97 Defi ning a Reliable Interface 98 Considering Security Concerns 98 Considering Accessibility Requirements 99 Understanding Visual Element Considerations 100 Adding Tooltips and Accessibility Descriptions 101 Practicing Good Coloring Techniques 102 Developing Your Design Strategy 103 Chapter 5: Designing with Speed in Mind 105 Considering Speed vs. Performance 106 Developing a High Speed Application 107 Using Multithreading 107 Understanding That Speed Doesn’t Equal Code 108 Considering the Effects of Multiprocessing 109 Measuring Application Speed 109 Viewing Standard Counters 109 Defi ning an Application Counter 115 Developing Your Design Strategy 119 Chapter 6: Designing with Reliability in Mind 121 Verifying Resource Availability 122 Saving Data, Settings, and State 124 Implementing Data Saves 124 Considering Methods to Save Settings 125 Implementing State Saves 127 Expecting the Unexpected 128 Considering the Reliability Benefi ts of RibbonX 129 Developing Your Design Strategy 130 xvii 115962ftoc.indd5962ftoc.indd xxviivii 11/22/09/22/09 110:42:090:42:09 AAMM Contents Chapter 7: Designing with Security in Mind 131 Assuming the Worst-Case Scenario 132 Eliminating Errant Input 133 Using the Correct Control or Component 134 Checking All User Input 135 Verifying Data Sources 142 Hiding Data from View 142 Keeping Data Local 143 Encrypting Data 143 Placing Data in Protected Locations 144 Adding Application Monitoring 145 Defi ning the Monitoring Strategy 145 Implementing Logging 146 Using the Event Log 147 Sending Administrator Alerts 148 Using a Team Overview 149 Developing Your Design Strategy 150 Part II: Coding Strategies 153 Chapter 8: Customizing the IDE 155 Confi guring the IDE 156 Using the Visual Studio Options 156 Customizing the Toolbars and Menus 159 Adding External Tools 164 Using Snippets, Macros, and Add-ins 165 Creating and Using Code Snippets 166 Using Macros to Automate Tasks 168 Relying on Add-ins for Extended Functionality 168 Using the Visual Studio Command Line 169 Accessing the Command Line 169 Understanding the Command Line Switches 170 Executing Visual Studio Commands 174 Running your Application 175 Coding Your Application 175 Chapter 9: Scripting 177 Considering the Scripting Options 177 Working with SQL Server 178 Creating C# Scripts 178 xviii 115962ftoc.indd5962ftoc.indd xxviiiviii 11/22/09/22/09 110:42:090:42:09 AAMM Contents Evaluating C# Expressions 179 Using Windows PowerShell 179 Using LINQ 180 Interacting with SQL Server 181 Working from Visual Studio 181 Using Built-in SQL Server Features 183 Scripting Your Application 184 Using C# Expressions 185 Developing Windows PowerShell Solutions 185 Understanding the PS Utility 186 Creating a Script 187 Executing the Script 190 Obtaining Debugger Support 191 Coding Your Application 191 Chapter 10: Viewing Data in the IDE 193 Working with the IDE Elements 194 Using the Autos Window 194 Using the Locals Window 195 Using the Watch Window 196 Using the Command Window 197 Understanding the Use of Visualizers 197 Defi ning a Need for Visualizers 198 Using the Text Visualizer 198 Using the XML Visualizer 199 Using the HTML Visualizer 200 Using the DataSet Visualizer 201 Obtaining Third-Party Visualizers 202 Creating a Custom Visualizer 202 Confi guring the Visualizer Project 202 Adding the Visualizer Code 204 Testing the New Visualizer 207 Coding Your Application 209 Chapter 11: Working with Controls and Components 211 Understanding the Differences between Controls and Components 213 Defi ning the Control Types 215 Building Derived Controls 216 Building UserControls 223 Building New Controls 225 xix 115962ftoc.indd5962ftoc.indd xxixix 11/22/09/22/09 110:42:090:42:09 AAMM Contents Building Components 227 Essential Considerations for Developing a New Component 228 Defi ning the New Component Project 229 Adding the New Component Code 230 Testing the Component 233 Testing Classes Using the Object Test Bench 235 Coding Your Application 239 Chapter 12: Coding the Application 241 Using an Appropriate Naming Convention 241 Using Hungarian Notation 242 Using Camel Case 242 Using Pascal Case 243 Adding Specialized Syntax 244 Adding Command Line Functionality 246 When to Use Command Line Switches 246 Adding Command Line Switches 248 Testing Command Line Functionality 253 Exiting the Application Properly 254 When Simply Closing the Form Isn’t Enough 254 Setting an Exit Code with System.Environment 255 Relying on Application.Exit() 258 Using P/Invoke to Exit Applications 259 Relying on Custom Features 261 Considering When to Use Custom Features 261 Using Custom Attribute and Exception Classes 262 Coding Your Application 262 Chapter 13: Considering the Documentation 265 Adding Documentation Support to Your Application 266 A View to a Document 266 Considering the Needs of the Developer 267 Considering the Needs of the User 268 Considering the Needs of the Administrator 269 Creating Documentation Comments 270 Considering the Kinds of Comments 270 Placing Comments in the Correct Place 273 Using the Resulting XML File 276 xx 115962ftoc.indd5962ftoc.indd xxxx 11/22/09/22/09 110:42:090:42:09 AAMM Contents Alternative Uses for Documentation Output 279 Using LINQ to Query the Documentation File 280 Creating Automated Application Reports from Documentation 280 Coding Your Application 280 Chapter 14: Implementing Error Handling 283 Discovering the Advantages of Assuming Nothing 284 Reviewing the Importance of Specifi c Error Handling 285 Using the Standard Exception Classes Correctly 286 Implementing Custom Error Handling 294 Considering the Importance of the Error Hierarchy 295 Providing Consistent Error Handling 296 Working with Single-Source Errors 297 Trapping Multiple-Source Errors 297 Finalizing Error Handling 297 Devising Self-Healing Applications 298 Coding Your Application 300 Chapter 15: Testing, Debugging, and Quality Assurance 303 Testing Your Application 304 Creating a New Test 304 Running Tests 308 Setting the Test Properties Using Test View 309 Organizing Tests Using the Test List Editor 311 Understanding the Code Coverage Results Window 312 Viewing the Test Runs 314 Considering the Human View of Testing 315 Debugging Your Application 316 Working with the Debugging Windows 316 Asking the IDE a Question 317 Viewing Memory Content 318 Obtaining Bugs from Users 319 Performing Quality Assurance Checks 319 Interacting with Team B 319 Constructing Useful Feedback 320 Getting the User Involved 321 Coding Your Application 322 xxi 115962ftoc.indd5962ftoc.indd xxxixi 11/22/09/22/09

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    14 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us