Friday, October 19, 2007

Southwest Fox - Day 2, Session 2

Rick Strahl - ASP.NET COM Interop with Visual Foxpro

Rick started by giving a general overview of the issues related to developing concurrently in VFP and ASP.NET and an illustration of how applications interact with each other when using ASP.NET and VFP COM components. He pointed out that this is "gateway" technology, not a strategic technology. He thinks that this approach is a way of bridging the gap until such time as an application is completely rewritten. He said that it wasn't his purpose to recommend one or the other, but to recommend that you use only one - VFP or .NET

Rick created a simple Hello World demo just to show us how to create a basic COM object. He then showed us how to create a VS project that will consume our little com object. He pointed out that we want to create an ASP.NET web application.

One of the little tidbits I really appreciated was the OS command "IISRESET" which can be used to - what else? - reset IIS? Rick mentioned this because you need to reset IIS to release you COM component as you're developing it and creating new iterations.

Rick talked about how the Session object creates a good environment for COM components -except that it causes trouble sometimes when dealing with data. So instead he creates an ASPBASE class based on CUSTOM and then marks as protected most of the VFP members that have no meaning in this context.

He then showed how to use COMATTRIB to create a property and give it strong typing for the type library. Oh, yeah, he also pointed out this this only works with VFP 9, SP2.

Rick pointed out something that might not be obvious, but when you're developing applications in this fashion, you have to realize that it is a multiuser application and you have to be aware of that as you're writing code. His simple example was just a little incrementer, but he explicitly made sure he could lock the record before he changed the data.

Rick went into a good level of detail showing us different ways to interact with VFP COM from ASP.NET and showed us a couple different ways to get data into ASP.NET web pages.

I frequently got so wrapped up in paying attention to Rick that I forgot to take notes to share here. As always, Rick gave a great session.

Labels: , ,

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home