Expert One-on-One™ C# Design and Development

Book description

John P. Mueller demonstrates how you can fine-tune your skill set to create an elegant design that will scale well and produce reliable, speedy, secure, and efficient code. You'll explore several applications and design strategies using C# and you'll learn the best approaches for various system configurations. Mueller shares expert advice on how to create better applications by using fine-tuned design strategies and new methods for writing applications using less code, which improves efficiency. Topics include understanding the application lifecycle, defining a design strategy, designing with speed and security in mind, scripting the IDE, working with controls and components, testing, debugging and quality assurance, serializing XML, working with LINQ, augmenting applications using F#, and much more.

Table of contents

  1. Copyright
  2. About the Author
  3. About the Technical Editors
  4. Credits
  5. Acknowledgments
  6. Introduction
    1. Whom This Book Is For
    2. What This Book Covers
    3. How This Book Is Structured
    4. What You Need to Use This Book
    5. Conventions
    6. Source Code
    7. Errata
    8. p2p.wrox.com
  7. I. Design Strategies
    1. 1. Defining the Language Environment
      1. 1.1. Defining the Design Strategy Elements
      2. 1.2. Considering the C# Language
        1. 1.2.1. Understanding the Benefits
          1. 1.2.1.1. C/C++-Like Syntax
          2. 1.2.1.2. Unsafe Code Capability
          3. 1.2.1.3. In-Depth Debugging
          4. 1.2.1.4. Additional IntelliSense Functionality
          5. 1.2.1.5. Coding Additions
          6. 1.2.1.6. Exploding Developer Mind Share
        2. 1.2.2. Understanding the Deficiencies
          1. 1.2.2.1. Code Reliability Concerns
          2. 1.2.2.2. Too Much Information
          3. 1.2.2.3. Coding Complexities
        3. 1.2.3. Developing with Multiple Languages
          1. 1.2.3.1. Using Visual Basic.NET
          2. 1.2.3.2. Using C++
          3. 1.2.3.3. Using F#
        4. 1.2.4. Multiple Platform Scenarios
      3. 1.3. Inventorying Your Tools
      4. 1.4. Gathering Your Resources
        1. 1.4.1. Inventorying Team Language Resources
        2. 1.4.2. Considering Team Skills
        3. 1.4.3. Understanding the Significance of Experience
        4. 1.4.4. Defining External Resource Requirements
      5. 1.5. Developing Your Design Strategy
    2. 2. Understanding the Application Lifecycle
      1. 2.1. Understanding the Lifecycle Stages
        1. 2.1.1. Developing an Application Concept
        2. 2.1.2. Building an Application Development Team
        3. 2.1.3. Defining a Specification
        4. 2.1.4. Determining Whether the Concept Will Work
        5. 2.1.5. Creating a Design
          1. 2.1.5.1. Understanding High-Level Design
          2. 2.1.5.2. Understanding Low-Level Design
        6. 2.1.6. Testing the Design
        7. 2.1.7. Implementing the Design
        8. 2.1.8. Writing the Application
        9. 2.1.9. Debugging and Testing the Application
        10. 2.1.10. Testing User Requirements
        11. 2.1.11. Enhancing Reliability and Security
        12. 2.1.12. Deploying the Application
        13. 2.1.13. Supporting and Maintaining the Application
        14. 2.1.14. Retiring the Application
      2. 2.2. Considering a Lifecycle Model
        1. 2.2.1. Using the Spiral Model
        2. 2.2.2. Using the Waterfall Model
        3. 2.2.3. Using the Throwaway Model
        4. 2.2.4. Using the Evolutionary Model
        5. 2.2.5. Using the Incremental/Iterative Model
        6. 2.2.6. Using the Rapid Application Development (RAD) Model
      3. 2.3. Using Agile Programming Techniques
        1. 2.3.1. Understanding Agile Programming
        2. 2.3.2. Benefits of Agile Programming
        3. 2.3.3. Deficiencies of Agile Programming
        4. 2.3.4. Common Agile Programming Strategies
          1. 2.3.4.1. Scrum
          2. 2.3.4.2. Crystal Clear
          3. 2.3.4.3. Extreme Programming (XP)
          4. 2.3.4.4. Adaptive Software Development
          5. 2.3.4.5. Feature Driven Development
          6. 2.3.4.6. Combined Methods or Create Your Own
      4. 2.4. Developing Your Design Strategy
    3. 3. Defining a Design Strategy
      1. 3.1. Creating an Object Model
        1. 3.1.1. Defining the Class Concepts
          1. 3.1.1.1. Understanding the Feature Set
          2. 3.1.1.2. Defining the Class Candidates
          3. 3.1.1.3. Choosing Classes from Candidates
        2. 3.1.2. Developing Internal Classes
        3. 3.1.3. Adding External Classes
        4. 3.1.4. Considering Class Trade-offs
        5. 3.1.5. Improving the Class Design
      2. 3.2. Building a Data Model
        1. 3.2.1. Defining the Data Requirements
        2. 3.2.2. Considering Access, Reliability, and Security Requirements
        3. 3.2.3. Creating the Data Classes
      3. 3.3. Considering User Requirements
        1. 3.3.1. Defining the User Requirements
        2. 3.3.2. Creating the User Classes
      4. 3.4. Turning Your Design into UML
        1. 3.4.1. Getting Started with Visio
        2. 3.4.2. An Overview of the Visio UML Functionality
          1. 3.4.2.1. Activity Diagrams
          2. 3.4.2.2. Collaboration Diagrams
          3. 3.4.2.3. Component Diagrams
          4. 3.4.2.4. Deployment Diagrams
          5. 3.4.2.5. Sequence Diagrams
          6. 3.4.2.6. Statechart Diagrams
          7. 3.4.2.7. Static Structure Diagrams
          8. 3.4.2.8. Use Case Diagrams
        3. 3.4.3. Generating Code from UML
      5. 3.5. Developing Your Design Strategy
    4. 4. Designing the User Interface
      1. 4.1. Understanding the Application Form Types
        1. 4.1.1. Creating a Dialog Utility
        2. 4.1.2. Interacting with the Single Document Interface (SDI)
        3. 4.1.3. Interacting with the Multiple Document Interface (MDI)
        4. 4.1.4. Relying on a Tabbed Interface
        5. 4.1.5. Developing Specialty Skinned and Free-Form Applications
        6. 4.1.6. Working with RibbonX Applications
        7. 4.1.7. Using the Notification Area
        8. 4.1.8. Investigating the Command Line
      2. 4.2. Understanding the Common User Interface Types
        1. 4.2.1. Menu Driven
        2. 4.2.2. Task Driven
        3. 4.2.3. Information Driven
        4. 4.2.4. Wizard Driven
        5. 4.2.5. Role Driven
      3. 4.3. Developing a User Interaction Strategy
        1. 4.3.1. Keeping the User in Control
        2. 4.3.2. Nudging the User in the Right Direction
        3. 4.3.3. Designing an Interface That Interacts
        4. 4.3.4. Defining a Reliable Interface
        5. 4.3.5. Considering Security Concerns
      4. 4.4. Considering Accessibility Requirements
        1. 4.4.1. Understanding Visual Element Considerations
        2. 4.4.2. Adding Tooltips and Accessibility Descriptions
        3. 4.4.3. Practicing Good Coloring Techniques
      5. 4.5. Developing Your Design Strategy
    5. 5. Designing with Speed in Mind
      1. 5.1. Considering Speed vs. Performance
      2. 5.2. Developing a High Speed Application
        1. 5.2.1. Using Multithreading
        2. 5.2.2. Understanding That Speed Doesn't Equal Code
        3. 5.2.3. Considering the Effects of Multiprocessing
      3. 5.3. Measuring Application Speed
        1. 5.3.1. Viewing Standard Counters
          1. 5.3.1.1. Using Counters
          2. 5.3.1.2. Setting Graph Properties
          3. 5.3.1.3. Selecting Another View
        2. 5.3.2. Defining an Application Counter
          1. 5.3.2.1. Creating the Counter Project
          2. 5.3.2.2. Adding the Counter Code
          3. 5.3.2.3. Testing the New Counter
      4. 5.4. Developing Your Design Strategy
    6. 6. Designing with Reliability in Mind
      1. 6.1. Verifying Resource Availability
      2. 6.2. Saving Data, Settings, and State
        1. 6.2.1. Implementing Data Saves
        2. 6.2.2. Considering Methods to Save Settings
        3. 6.2.3. Implementing State Saves
      3. 6.3. Expecting the Unexpected
      4. 6.4. Considering the Reliability Benefits of RibbonX
      5. 6.5. Developing Your Design Strategy
    7. 7. Designing with Security in Mind
      1. 7.1. Assuming the Worst-Case Scenario
      2. 7.2. Eliminating Errant Input
        1. 7.2.1. Using the Correct Control or Component
        2. 7.2.2. Checking All User Input
          1. 7.2.2.1. Checking the Data Range
          2. 7.2.2.2. Checking the Data Length
          3. 7.2.2.3. Keeping Unnecessary Characters Controlled
        3. 7.2.3. Verifying Data Sources
      3. 7.3. Hiding Data from View
        1. 7.3.1. Keeping Data Local
        2. 7.3.2. Encrypting Data
        3. 7.3.3. Placing Data in Protected Locations
      4. 7.4. Adding Application Monitoring
        1. 7.4.1. Defining the Monitoring Strategy
        2. 7.4.2. Implementing Logging
        3. 7.4.3. Using the Event Log
        4. 7.4.4. Sending Administrator Alerts
      5. 7.5. Using a Team Overview
      6. 7.6. Developing Your Design Strategy
  8. II. Coding Strategies
    1. 8. Customizing the IDE
      1. 8.1. Configuring the IDE
        1. 8.1.1. Using the Visual Studio Options
        2. 8.1.2. Customizing the Toolbars and Menus
          1. 8.1.2.1. Working with Toolbars
          2. 8.1.2.2. Working with Menus
        3. 8.1.3. Adding External Tools
      2. 8.2. Using Snippets, Macros, and Add-ins
        1. 8.2.1. Creating and Using Code Snippets
        2. 8.2.2. Using Macros to Automate Tasks
        3. 8.2.3. Relying on Add-ins for Extended Functionality
      3. 8.3. Using the Visual Studio Command Line
        1. 8.3.1. Accessing the Command Line
        2. 8.3.2. Understanding the Command Line Switches
        3. 8.3.3. Executing Visual Studio Commands
        4. 8.3.4. Running your Application
      4. 8.4. Coding Your Application
    2. 9. Scripting
      1. 9.1. Considering the Scripting Options
        1. 9.1.1. Working with SQL Server
        2. 9.1.2. Creating C# Scripts
        3. 9.1.3. Evaluating C# Expressions
        4. 9.1.4. Using Windows PowerShell
        5. 9.1.5. Using LINQ
      2. 9.2. Interacting with SQL Server
        1. 9.2.1. Working from Visual Studio
        2. 9.2.2. Using Built-in SQL Server Features
          1. 9.2.2.1. Using Sprocs
          2. 9.2.2.2. Using Views
          3. 9.2.2.3. Using .NET Assemblies
      3. 9.3. Scripting Your Application
      4. 9.4. Using C# Expressions
      5. 9.5. Developing Windows PowerShell Solutions
        1. 9.5.1. Understanding the PS Utility
        2. 9.5.2. Creating a Script
        3. 9.5.3. Executing the Script
        4. 9.5.4. Obtaining Debugger Support
      6. 9.6. Coding Your Application
    3. 10. Viewing Data in the IDE
      1. 10.1. Working with the IDE Elements
        1. 10.1.1. Using the Autos Window
        2. 10.1.2. Using the Locals Window
        3. 10.1.3. Using the Watch Window
        4. 10.1.4. Using the Command Window
      2. 10.2. Understanding the Use of Visualizers
        1. 10.2.1. Defining a Need for Visualizers
        2. 10.2.2. Using the Text Visualizer
        3. 10.2.3. Using the XML Visualizer
        4. 10.2.4. Using the HTML Visualizer
        5. 10.2.5. Using the DataSet Visualizer
      3. 10.3. Obtaining Third-Party Visualizers
      4. 10.4. Creating a Custom Visualizer
        1. 10.4.1. Configuring the Visualizer Project
        2. 10.4.2. Adding the Visualizer Code
          1. 10.4.2.1. Defining the Viewing Window
        3. 10.4.3. Adding the Visualizer Code
        4. 10.4.4. Testing the New Visualizer
          1. 10.4.4.1. Creating the Visualizer Test Project
          2. 10.4.4.2. Adding the Visualizer Test Code
      5. 10.5. Coding Your Application
    4. 11. Working with Controls and Components
      1. 11.1. Understanding the Differences between Controls and Components
      2. 11.2. Defining the Control Types
        1. 11.2.1. Building Derived Controls
          1. 11.2.1.1. Essential Considerations for Developing a Derived Control
          2. 11.2.1.2. Defining the Derived Control Project
          3. 11.2.1.3. Adding the Derived Control Code
          4. 11.2.1.4. Checking the Derived Control Functionality
          5. 11.2.1.5. Adding the Control to Another Application
        2. 11.2.2. Building UserControls
          1. 11.2.2.1. Essential Considerations for Developing a UserControl
          2. 11.2.2.2. Working with the UserControl Project
        3. 11.2.3. Building New Controls
          1. 11.2.3.1. Essential Considerations for Developing a New Control
          2. 11.2.3.2. Working with the New Control Project
      3. 11.3. Building Components
        1. 11.3.1. Essential Considerations for Developing a New Component
        2. 11.3.2. Defining the New Component Project
        3. 11.3.3. Adding the New Component Code
        4. 11.3.4. Testing the Component
      4. 11.4. Testing Classes Using the Object Test Bench
      5. 11.5. Coding Your Application
    5. 12. Coding the Application
      1. 12.1. Using an Appropriate Naming Convention
        1. 12.1.1. Using Hungarian Notation
        2. 12.1.2. Using Camel Case
        3. 12.1.3. Using Pascal Case
        4. 12.1.4. Adding Specialized Syntax
          1. 12.1.4.1. Applying I for Interface
          2. 12.1.4.2. Applying m_ for Local Memory
          3. 12.1.4.3. Working with Uppercase, Abbreviations, and Acronyms
          4. 12.1.4.4. Using Numbers
          5. 12.1.4.5. Considering Other Special Cases
      2. 12.2. Adding Command Line Functionality
        1. 12.2.1. When to Use Command Line Switches
        2. 12.2.2. Adding Command Line Switches
          1. 12.2.2.1. Defining the Help Screen
          2. 12.2.2.2. Handling Debugging
          3. 12.2.2.3. Creating the Main Code
        3. 12.2.3. Testing Command Line Functionality
      3. 12.3. Exiting the Application Properly
        1. 12.3.1. When Simply Closing the Form Isn't Enough
        2. 12.3.2. Setting an Exit Code with System.Environment
        3. 12.3.3. Relying on Application.Exit()
        4. 12.3.4. Using P/Invoke to Exit Applications
      4. 12.4. Relying on Custom Features
        1. 12.4.1. Considering When to Use Custom Features
        2. 12.4.2. Using Custom Attribute and Exception Classes
      5. 12.5. Coding Your Application
    6. 13. Considering the Documentation
      1. 13.1. Adding Documentation Support to Your Application
        1. 13.1.1. A View to a Document
        2. 13.1.2. Considering the Needs of the Developer
        3. 13.1.3. Considering the Needs of the User
        4. 13.1.4. Considering the Needs of the Administrator
      2. 13.2. Creating Documentation Comments
        1. 13.2.1. Considering the Kinds of Comments
        2. 13.2.2. Placing Comments in the Correct Place
      3. 13.3. Using the Resulting XML File
      4. 13.4. Alternative Uses for Documentation Output
        1. 13.4.1. Using LINQ to Query the Documentation File
        2. 13.4.2. Creating Automated Application Reports from Documentation
      5. 13.5. Coding Your Application
    7. 14. Implementing Error Handling
      1. 14.1. Discovering the Advantages of Assuming Nothing
      2. 14.2. Reviewing the Importance of Specific Error Handling
        1. 14.2.1. Using the Standard Exception Classes Correctly
        2. 14.2.2. Implementing Custom Error Handling
        3. 14.2.3. Considering the Importance of the Error Hierarchy
      3. 14.3. Providing Consistent Error Handling
        1. 14.3.1. Working with Single-Source Errors
        2. 14.3.2. Trapping Multiple-Source Errors
        3. 14.3.3. Finalizing Error Handling
      4. 14.4. Devising Self-Healing Applications
      5. 14.5. Coding Your Application
    8. 15. Testing, Debugging, and Quality Assurance
      1. 15.1. Testing Your Application
        1. 15.1.1. Creating a New Test
        2. 15.1.2. Running Tests
        3. 15.1.3. Setting the Test Properties Using Test View
        4. 15.1.4. Organizing Tests Using the Test List Editor
        5. 15.1.5. Understanding the Code Coverage Results Window
        6. 15.1.6. Viewing the Test Runs
        7. 15.1.7. Considering the Human View of Testing
      2. 15.2. Debugging Your Application
        1. 15.2.1. Working with the Debugging Windows
        2. 15.2.2. Asking the IDE a Question
        3. 15.2.3. Viewing Memory Content
        4. 15.2.4. Obtaining Bugs from Users
      3. 15.3. Performing Quality Assurance Checks
        1. 15.3.1. Interacting with Team B
        2. 15.3.2. Constructing Useful Feedback
        3. 15.3.3. Getting the User Involved
      4. 15.4. Coding Your Application
    9. 16. Deploying the Application
      1. 16.1. Determining the Deployment Type
        1. 16.1.1. Considering the Testing Release
        2. 16.1.2. Considering the Local Deployment
        3. 16.1.3. Considering the Enterprise Deployment
        4. 16.1.4. Considering the Shrink-Wrap Deployment
        5. 16.1.5. Comparing Major and Minor Releases
      2. 16.2. Selecting a Deployment Method
        1. 16.2.1. Using the XCopy Deployment
        2. 16.2.2. Creating a Basic Setup Project
          1. 16.2.2.1. Creating the Project
          2. 16.2.2.2. Adding Special Folders
          3. 16.2.2.3. Adding Setup Content
          4. 16.2.2.4. Setting Installation Properties
          5. 16.2.2.5. Building the Installation Application
        3. 16.2.3. Modifying the Details
        4. 16.2.4. Using the Setup Project Wizard
        5. 16.2.5. Using the CAB Approach
      3. 16.3. Choosing a Media Type
      4. 16.4. Performing the Deployment
      5. 16.5. Evaluating the Results
      6. 16.6. Coding Your Application
    10. 17. Supporting and Maintaining the Application
      1. 17.1. Creating Error Logs
        1. 17.1.1. Defining an Error
        2. 17.1.2. Handling Error Log Settings
        3. 17.1.3. Creating the Error Logging Class
        4. 17.1.4. Viewing the Error Log Output
      2. 17.2. Using Error Logs to Provide Support
        1. 17.2.1. Defining Errors, Sources, and Solutions
        2. 17.2.2. Determining the Need for Direct Developer Interaction
        3. 17.2.3. Creating Support Logs
      3. 17.3. Relying on Error Log and Support Logs for Maintenance
        1. 17.3.1. Prioritizing Maintenance Activities
        2. 17.3.2. Verifying Maintenance Requirements
        3. 17.3.3. Testing Maintenance Actions
        4. 17.3.4. Deploying Patches
      4. 17.4. Coding Your Application
  9. III. Speed, Reliability, and Security
    1. 18. Developing around the Performance Triangle
      1. 18.1. Acting after the Initial Development Phase
      2. 18.2. Defining the Performance Triangle
        1. 18.2.1. Characterizing the Speed Component
        2. 18.2.2. Characterizing the Reliability Component
        3. 18.2.3. Characterizing the Security Component
      3. 18.3. Creating the Perfect Triangle for Your Application
      4. 18.4. Making Your Application Reliable and Secure
    2. 19. Considering Application Speed Implications
      1. 19.1. Defining the Trade-offs of Speed
        1. 19.1.1. Cutting Code in the Wrong Places
        2. 19.1.2. Creating Wrong Answers Really Fast
      2. 19.2. Measuring Speed
        1. 19.2.1. A Quick View of the Sample Code
        2. 19.2.2. Launching the Performance Wizard
        3. 19.2.3. Profiling Performance
          1. 19.2.3.1. Starting a New Performance Session
          2. 19.2.3.2. Configuring the Targets
          3. 19.2.3.3. Running the Profile
          4. 19.2.3.4. Using the Data Collection Control
          5. 19.2.3.5. Attaching to an Existing Process
        4. 19.2.4. Viewing Performance Results
          1. 19.2.4.1. Adjusting the Filters
          2. 19.2.4.2. Working with Paths
          3. 19.2.4.3. Reducing Noise
        5. 19.2.5. Comparing Performance Reports
      3. 19.3. Making Your Application Reliable and Secure
    3. 20. Considering Application Reliability Implications
      1. 20.1. Defining the Trade-offs of Reliability
        1. 20.1.1. Avoiding the Overly Pessimistic Application
        2. 20.1.2. Creating Applications that Do Absolutely Nothing
        3. 20.1.3. Defining External Threats
        4. 20.1.4. Developing a Reliability Plan
      2. 20.2. Placing Users in Monkey Mode
        1. 20.2.1. Breaking Applications during Testing Is Good
        2. 20.2.2. Creating a Lessons-Learned Journal
      3. 20.3. Checking Your Code
        1. 20.3.1. Running Code Analysis
        2. 20.3.2. Calculating Code Metrics
      4. 20.4. Making Your Application Reliable and Secure
    4. 21. Considering Application Security Implications
      1. 21.1. Defining the Trade-offs of Security
        1. 21.1.1. Keeping Data out of the Hands of Users
        2. 21.1.2. Creating Performance Roadblocks
        3. 21.1.3. Considering Big Brother Syndrome
      2. 21.2. Breaking into Your Application
        1. 21.2.1. Relying on Internal Testers
        2. 21.2.2. Using a Third Party
        3. 21.2.3. Checking for the Impossible, Too
        4. 21.2.4. Understanding the Art of Interactions
      3. 21.3. Updating Your Security Profile
      4. 21.4. Managing the Monitoring Process
      5. 21.5. Encrypting and Decrypting Data
      6. 21.6. Making Your Application Reliable and Secure
  10. IV. Special Coding Methodologies
    1. 22. Serializing XML
      1. 22.1. Using XML as a Storage Methodology
        1. 22.1.1. Implementing an XCopy Application
        2. 22.1.2. Viewing the Sample XML Data
        3. 22.1.3. Using XML Data in Reports
      2. 22.2. Creating the XML Storage Class
        1. 22.2.1. Defining the XML Data Elements
        2. 22.2.2. Creating the Customized Data Description
        3. 22.2.3. Designing Bulletproof Properties
      3. 22.3. Saving Data in XML Format
        1. 22.3.1. Choosing a Data Location
        2. 22.3.2. Implementing a Save Routine
      4. 22.4. Loading Data in XML Format
        1. 22.4.1. Obtaining the XML Data from Disk
        2. 22.4.2. Using XML Data to Modify the Environment
      5. 22.5. Manipulating Serialized XML Data
        1. 22.5.1. Adding New Data
        2. 22.5.2. Editing Existing Entries
        3. 22.5.3. Deleting Data Entries
        4. 22.5.4. Sorting the Data Entries
        5. 22.5.5. Displaying Data Entries on Screen
      6. 22.6. Implementing Your Design
    2. 23. Working with LINQ
      1. 23.1. Understanding LINQ Support in Visual Studio 2008
        1. 23.1.1. Understanding LINQ and Providers
        2. 23.1.2. Contrasting LINQ with SQL
        3. 23.1.3. Using LINQ for Non-query Solutions
      2. 23.2. Defining the Basic Operators
        1. 23.2.1. Working with the From and Select Operators
        2. 23.2.2. Working with the Where Operator
        3. 23.2.3. Working with the orderBy Operator
      3. 23.3. Creating LINQ Queries
        1. 23.3.1. Defining Simple Queries
        2. 23.3.2. Performing Joins of Multiple Data Sources
        3. 23.3.3. Using the let Operator
      4. 23.4. Using LINQ to Interact with Any Data Source
        1. 23.4.1. Using the Built-In Providers
        2. 23.4.2. Using LINQ to Objects
        3. 23.4.3. Using LINQ to DataSet
          1. 23.4.3.1. Defining the Test Tables
          2. 23.4.3.2. Outputting the Results
          3. 23.4.3.3. Exploring the Connection
        4. 23.4.4. Using LINQ to SQL
          1. 23.4.4.1. Testing the Visual Studio Connection
          2. 23.4.4.2. Generating the Northwind Entity Classes and XML Mapping Files
          3. 23.4.4.3. Defining the Project
          4. 23.4.4.4. Adding the Code
        5. 23.4.5. Using LINQ to XML
          1. 23.4.5.1. Creating the Project
          2. 23.4.5.2. Building an XML Document
          3. 23.4.5.3. Saving an XML Document
          4. 23.4.5.4. Loading an XML Document
        6. 23.4.6. Using Third-Party Providers
      5. 23.5. Implementing Your Design
    3. 24. Augmenting Applications Using F#
      1. 24.1. Understanding F#
        1. 24.1.1. Considering the Functional Language
        2. 24.1.2. Defining the Need for Functional Languages
      2. 24.2. Obtaining F# Support for Visual Studio 2008
        1. 24.2.1. Downloading the Product
        2. 24.2.2. Installing F#
      3. 24.3. Experimenting at the Command Line
        1. 24.3.1. Modifying the Command Line Path to Accommodate F#
        2. 24.3.2. Defining a Basic Script
        3. 24.3.3. Running the Application
        4. 24.3.4. Interacting with F#
      4. 24.4. Creating an F# Application
      5. 24.5. Implementing Your Design
    4. 25. Creating Multithreaded Applications
      1. 25.1. Understanding Multithreading
        1. 25.1.1. Defining Multithreading
        2. 25.1.2. Considering the Benefits
        3. 25.1.3. Considering the Deficiencies
        4. 25.1.4. Looking at the Current State of Multithreading
      2. 25.2. Creating a Basic Multithreaded Application
        1. 25.2.1. Defining the Project
        2. 25.2.2. Adding the File Processing Thread Class
        3. 25.2.3. Adding the Monitor Thread Class
        4. 25.2.4. Developing the Application Code
        5. 25.2.5. Testing the Multithreaded Application
      3. 25.3. Implementing Your Design
    5. 26. Creating Reports and Other Output
      1. 26.1. Defining the Elements of a Good Report
        1. 26.1.1. Starting with the Acceptable Report
        2. 26.1.2. Improving the Acceptable Report to the Good Level
        3. 26.1.3. Testing the Report
      2. 26.2. Understanding User Report Requirements
        1. 26.2.1. Considering the Content Requirement
        2. 26.2.2. Defining Formatting Needs
        3. 26.2.3. Including Organizational Policies
        4. 26.2.4. Developing User Rapport for Reports
      3. 26.3. Creating the Self-Modifying Report
      4. 26.4. Devising Other Forms of Application Output
      5. 26.5. Implementing Your Design
    6. 27. Designing Low-Level Application Elements
      1. 27.1. Defining P/Invoke
      2. 27.2. Calling External Functions
        1. 27.2.1. Adding the Required Directives
        2. 27.2.2. Providing Structures, Enumerations, and Constants
        3. 27.2.3. Creating an External Function Reference
        4. 27.2.4. Working with Function Call Data
        5. 27.2.5. Using the External Function within Managed Code
          1. 27.2.5.1. Creating a Basic Dialog Box
          2. 27.2.5.2. Working with Return Values
        6. 27.2.6. Providing Error Handling
        7. 27.2.7. Obtaining and Displaying the Error Number
          1. 27.2.7.1. Interpreting the Error Number
        8. 27.2.8. Using FormatMessage() to Translate the Error Number
      3. 27.3. Designing Data Structures
        1. 27.3.1. Enumerating the Standard Console Handles
        2. 27.3.2. Creating the Basic Data Structures
        3. 27.3.3. Defining the Function Calls
        4. 27.3.4. Using Data Structures within Managed Code
      4. 27.4. Implementing Your Design
  11. V. Resources and Tools
    1. 28. Choosing Resources and Tools
      1. 28.1. Ending Time-Wasting Clutter
        1. 28.1.1. Creating the Archive
        2. 28.1.2. Updating Resources and Tools Effectively
        3. 28.1.3. Developing a Rapport with Vendors
      2. 28.2. Defining a Useful Resource
      3. 28.3. Defining a Useful Tool
      4. 28.4. Creating a Team Toolbox
        1. 28.4.1. Understanding the Team Needs
        2. 28.4.2. Defining Usage Requirements and Policies
      5. 28.5. Obtaining Resources and Tools
    2. 29. Microsoft Resources and Tools
      1. 29.1. Finding Microsoft Resources and Tools
        1. 29.1.1. Considering MSDN
        2. 29.1.2. Looking at TechNet
        3. 29.1.3. Interacting with Microsoft Download
        4. 29.1.4. Exploring Microsoft Research
        5. 29.1.5. Discovering Resources and Tools Online
      2. 29.2. Editing XML Files Using XML Notepad 2007
        1. 29.2.1. Obtaining XML Notepad 2007
        2. 29.2.2. Using XML Notepad 2007 the First Time
        3. 29.2.3. Making File Modifications
        4. 29.2.4. Using XSLT Files
        5. 29.2.5. Comparing XML Files
      3. 29.3. Enhancing Visual Studio 2008 Using Microsoft PowerCommands
      4. 29.4. Obtaining Resources and Tools
    3. 30. Third-Party Resources and Tools
      1. 30.1. Finding Third-Party Resources and Tools
      2. 30.2. Using Vischeck to Test Application Colors
      3. 30.3. Using FxCop to Improve Code Reliability and Consistency
        1. 30.3.1. Obtaining a Copy of FxCop
        2. 30.3.2. Using the FxCop GUI
        3. 30.3.3. Repairing the Errors
        4. 30.3.4. Considering the Rules
        5. 30.3.5. Employing FxCop during a Build
      4. 30.4. Using LINQPad to Create LINQ Queries
      5. 30.5. Obtaining Resources and Tools
  12. Glossary

Product information

  • Title: Expert One-on-One™ C# Design and Development
  • Author(s):
  • Release date: March 2009
  • Publisher(s): Wrox
  • ISBN: 9780470415962