Performance Guideline: Use ExcludeSchema Serialization Mode while Exchanging Typed DataSet Over Network

Here’s the next .NET Framework 2.0 performance guideline for review from Prashant Bansode, Bhavin Raichura, Girisha Gadikere and Claudio Caldato.  Use ExcludeSchema Serialization Mode while Exchanging Typed DataSet Over NetworkApplies to .NET 2.0 What to DoSet the Typed DataSet property SchemaSerializationMode to ExcludeSchema while transferring the typed DataSet over network for better performance. WhyThe serialization…

1

Using MadLibs to Create Actionable Principles/Practices

MadLibs can be an interesting approach to capturing or identifying principles, practices, values … etc. Here’s an example attempting to encapsulate principles of agile development: Write code to pass tests over __________ Measure progress by working software over __________ Improve internal consistency and clarity of code through re-factoring over __________ Leverage real-time communication over written…

2

Performance Guideline: Use HandleCollector API when Managing Expensive Unmanaged Resource Handles

Here’s the next .NET Framework 2.0 performance guideline for review from Prashant Bansode, Bhavin Raichura, Girisha Gadikere and Claudio Caldato. Use HandleCollector API when Managing Expensive Unmanaged Resource Handles Applies to .NET 2.0 What to DoUse HandleCollector API when managing expensive Unmanaged Resource Handles from Managed Code using COM Interop. WhyThe HandleCollector API helps to…

2

Performance Guideline: Use Promotable Transactions when Working with SQL Server 2005

Here’s the next .NET Framework 2.0 performance guideline for review from Prashant Bansode, Bhavin Raichura, Girisha Gadikere and Claudio Caldato.  Use Promotable Transactions when Working with SQL Server 2005 Applies to .NET 2.0 What to DoUse new .Net 2.0 System.Transactions API for controlling transactions in managed code when working with SQL Server 2005 WhySystem.Transactions API gives flexibility…

1

Performance Guideline: Use AddMemoryPressure while consuming Unmanaged Objects through COM Interop

Here’s the next .NET Framework 2.0 performance guideline for review from Prashant Bansode, Bhavin Raichura, Girisha Gadikere and Claudio Caldato.  Use AddMemoryPressure while consuming Unmanaged Objects through COM InteropApplies to .NET 2.0 What to DoUse .NET 2.0 CLR API AddMemoryPressure and RemoveMemoryPressure while consuming the Unmanaged Objects from Managed Code through COM Interop. WhyThe garbage collector cannot…

2

How To Write Prescriptive Guidance Modules

Here’s a quick reference for writing guidance modules.  Guidance modules are simply what I call the prescriptive guidance documents we write when creating guides such as Improving Web Application Security, Improving .NET Application Performance and .NET 2.0 Security Guidance.  How To Write Prescriptive Guidance Modules Summary of Steps Step 1. Identify and prioritize the tasks…

3

Writing Prescriptive Guidelines

These are some practices we learned in the guidance business to write more effective guidelines: Follow the What To Do, Why and How Pattern Keep it brief and to the point Start with Principle Based Recommendations Provide Context For Recommendations Make the Guidelines Actionable Consider Cold vs. Warm Handoffs Create Thread Killers Follow the What to…

2

Performance Guideline: Use Generics To Eliminate the Cost Of Boxing, Casting and Virtual calls

Here’s the next .NET Framework 2.0 performance guideline for review from Prashant Bansode, Bhavin Raichura, Girisha Gadikere and Claudio Caldato. Use Generics To Eliminate the Cost Of Boxing, Casting and Virtual calls Applies to .NET 2.0 What to Do Use Generics to eliminate cost of boxing, casting and virtual calls WhyGenerics can be used to improve the…

2

Performance Guideline: Use Token Handle Resolution API to get the Metadata for Reflection

Here’s the next .NET Framework 2.0 performance guideline in the series from Prashant Bansode, Bhavin Raichura, Girisha Gadikere and Claudio Caldato.  … Use Token Handle Resolution API to get the Metadata for Reflection Applies to .NET 2.0 What to DoUse the new .NET 2.0 token handle resolution API RuntimeMethodHandle to get the Metadata of members…

0

Performance Guideline: Use TryParse Method to Avoid Unnecessary Exceptions

Prashant Bansode, Bhavin Raichura, and Girisha Gadikere teamed up with Claudio Caldato (CLR team) to create some new performance guidelines for .NET Framework 2.0.  The guidelines use our new guideline template.  … Use TryParse Method to Avoid Unnecessary Exceptions Applies to NET 2.0 What to DoUse TryParse Method instead of Parse Method for converting string…

2