11.07.2015 Views

y - Net Developer

y - Net Developer

y - Net Developer

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

amrameshreddy.blog.com324 CHAPTER 10 ■ INTEGRATING WITH COM+ramrameshreddy.blog.comIn the completed solution, Listing 10-10 shows the code that performs the same call thatthe Visual Basic 6 COM client performed. The only difference is the type name no longer isprefixed with an underscore (_). This is because when authoring components in .NET, youhave control over the interface names, where in Visual Basic 6 it’s left up to the Visual Basic 6framework, hidden from normal levels of control. Other than that, there’s no discernable differencefrom the consumer side, as shown in Listing 10-10.Listing 10-10. OldHorse2 Position Management Clientnamespace Dot<strong>Net</strong>ComClient{class Program{static void Main( string[] args ){}}}OldHorse2.PositionManagementClient();OldHorse2.PositionManagementClient proxy =new OldHorse2.PositionManagementClient();long q = proxy.GetQuantity("MSFT");Console.WriteLine( "We have " + q + " of MSFT" );q = proxy.UpdatePosition( "MSFT", 100 );Console.WriteLine( "We now have " + q + " of MSFT" );proxy.Close();proxy = null;Console.WriteLine( "Press return to end..." );Console.ReadLine();Consuming WCF Services from COM+Up to now, we’ve focused on solutions that need to leverage existing legacy application logic thatis hosted in COM+. We’ve focused primarily on Visual Basic 6 given its distinct ability to hide somethings that you need control over in order to fully leverage and reuse your application logic.This section approaches the problem scenario from the perspective that these legacysolutions are not stagnant. In fact, it has been estimated that nearly 90 percent 9 of IT budgetsare focused on maintaining and extending existing solutions—many of those built on VisualBasic 6 and other legacy technologies.ramrameshreddyramrameshreddy9. Erlikh, L. “Leveraging Legacy System Dollars for E-Business.” (IEEE) IT Pro, May/June 2000. See alsohttp://doi.ieeecomputersociety.org/10.1109/6294.846201 and http://www.cs.jyu.fi/~koskinen/smcosts.htm.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!