OrderContext from a non Web application.-Collection of common programming errors
Kevin,
Vinayak’s blog was the first place this was covered: http://blogs.msdn.com/vinayakt/archive/2006/08/30/Programming-the-Commerce-Server-2007-catalog-system_3A00_-Creating-the-CatalogContext-.aspx
The In-Process paradigm will basically load up the CatalogContext properties by looking at settings in the Commerce Server Configuration database. As such, this pattern requires that you have Commerce Server installed and correctly configured on the machine you are running this application on. The security pattern for the in-process context is a little bit simpler (it can usually get away with having the same identity as RunTimeUser).
The Service Agent paradigm will populate the context object by proxy over your web service. You don’t need to install Commerce Server on the same box where you run your code from, but you’ll need access to some of the libraries packaged with Commerce Server. The security pattern is a little more complex, as you’ll need to add your application identity into the appropriate AzMan roles. I believe there is also a performance penalty to be paid here, as you’re going to be communicating with Commerce Server over a web service layer, while the In-Process operates directly.
I don’t think either of these patterns is more beneficial than the other in relation to your SQL server location. SQL Server should *always* be on a seperate box from Commerce Server in any production deployment. Performance-wise, I think In-Process is probably going to work better, but it might be hard to sell a customer on another CS2007 license so they can run some of these applications.