Chapter 4 -- Building and Designing Servers

[Previous] [Next]

Chapter 4

This chapter begins by explaining how to package components for distribution and describing the options you have when compiling a server. One of the first issues you must address is whether to distribute your components in an in-process DLL or an out-of-process EXE. In-process objects are faster, while out-of-process objects provide higher levels of fault tolerance and better security. You'll also see why COM+ requires you to package your components in ActiveX DLLs as opposed to ActiveX EXEs.

This chapter also delves into a variety of issues relating to server design, such as exposing components and interfaces, using enumerations and user-defined types (UDTs), and modifying procedure attributes. It also covers designing components that support scripting clients.

The chapter concludes with an explanation of error handling in COM. You'll learn how Microsoft Visual Basic maps its own internal error-handling model onto COM exceptions in a manner that is very transparent. You'll see, however, that errors are propagated from objects to clients in a language-neutral fashion. This will give you an appreciation for all the work Visual Basic does for you behind the scenes and will lead to a discussion of the best techniques for raising errors from the components in your servers.



Programming Distributed Applications with COM+ and Microsoft Visual Basic 6.0
Programming Distributed Applications with Com and Microsoft Visual Basic 6.0 (Programming/Visual Basic)
ISBN: 1572319615
EAN: 2147483647
Year: 2000
Pages: 70
Authors: Ted Pattison

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net