I am amazed and disappointed in Commerce Server 2007. I explained my disappointment in my last post, so I won't repeat the details.
Instead of becoming more frustrated with CS 2007, my critiques became the source of a number of Visual Studio Code Snippets. Code Snippets are reusable, often customizable, blocks of code. You can access Code Snippets in Visual Studio simply by highlighting something, right-click it, and then select (for example) Refactor. There are other types of Code Snippets, and the tasks to Commerce Server lend themselves well to Snippets
I created Code Snippets for:
-
Adding properties to classes that extend the Order system (adds support for the SetDirty method)
-
Class/Type Constructor and the GetObjectData method
-
Adding code to the serialization constructor and GetObjectData method
-
Working with OrderObjectMapping.xml
Of course, all of this would not be complete with a script to execute OrderMapping.exe and then deploy the changes to SQL Server. 
All of this has made it easier for me to work with Commerce Server. I can now easily extend the Order data model since I don't have to think about keeping data types and names synchronized across source, XML, and Web.config files.
I am using the Snippets on a project now and plan to publish them once I have a better workflow. There is still some copy/paste work, but it is easier and much faster than handling the details manually.
One interesting thing I was reminded of is to use sgen.exe - it is an invaluable tool for troubleshooting serialization issues. I was having problems with getting the Orders Web Service working and after much troubleshooting, I finally found the cause of the problem using sgen.exe. I'll give you more details later; however, for now I offer advice about being careful with the names you use in your types that you use to extend Commerce Server: avoid using common (as in repetitive) property names - you'll avoid a lot of frustration and save a great deal of time.
** Don't Let someone learn on you Enterprise Proect. Expert BizTalk Server Consulting. Proof of Concepts. Architectural Assessments. ESB and SOA Strategy, Guidance, and implementation. Erik Westermann has 15 years industry experience and is a recognized expert in SOA, ESB, and a range of other areas. Contact Erik by clicking the Contact link or call +1-416-809-1453 (Canada / Eastern Time Zone).