Programming 版 (精华区)
发信人: lofe (〖感激生活〗), 信区: Programming
标 题: The COM BootCamp Mission Statement
发信站: 哈工大紫丁香 (2001年06月06日18:01:13 星期三), 站内信件
The COM BootCamp Mission Statement
"COM is a technology that lets you integrate a wide variety of components
and software, using a multitude of tools and languages -- while keeping
their individual implementations private -- for the purpose of building large,
complex, scalable, flexible and maintainable applications. Today, this
technology is at the heart of the Windows operating system and is one of the
main reasons that Microsoft has been able repeatedly to launch frequent
releases of large scale applications such as Office and Visual Studio. And,
COM is being used heavily not only by Microsoft but by tools vendors and
applications developers deploying on Windows platforms.
"The COM BootCamp originated from a simple need: the need for COM to be taught
effectively. It was clear to me that lots of developers were attending COM
training classes, learning lots of theory -- and leaving without any idea of
how to begin implementing COM components for use in the real world. COM
BootCamp is designed to beyond the theoretical underpinnings, and focus on how
to write COM-based software! Our mission is to teach COM the way it ought
to have been taught from the beginning, by having you program with it, and
by teaching you the concepts and principles only after you've learned the
concretes! After all, you didn't learn your native language by studying
rules of grammar; you learn by listening and applying -- and afterwards the
rules are easy to understand.
"The mission of COM BootCamp is to make COM understandable and
comprehensible to software developers, to focus on its real-world
application -- and avoid mystifying you with theory. A great technology is one
that lets you adopt it with minimal effort; COM is just such a technology.
It's not that COM is hard to understand -- it's that it hasn't been taught
in a coherent manner that will let those new to COM comprehend its proper
application. And while well-meaning early adopters and theorists of COM
technology have an expert understanding of COM in and of itself, they aren't
always successful at transferring that understanding to those who are trying
to learn it.
"In COM BootCamp, you'll find that COM is a technology that you can learn
and adapt to quickly, and adopt as a mechanism for building component-based
software that will scale and maintain. COM BootCamp is only the first step
to learning COM: it is the base for other areas of expertise that we address
in our other BootCamp courses."
-- Richard Hale Shaw
Return to top
------------------------------------------------------------------------------
--
Why COM?
The Component Object Model (COM) is a system technology infrastructure that
originated with Windows, but has begun to propagate to other platforms (the
Macintosh, Compaq/Digital VMS, Compaq Digital Unix, Solaris, other Unix
flavors, mainframes, etc.). Its purposes for software developers are
multi-fold, and among them are the ability to:
Segregate application internals via binary firewalls or interfaces, that can
reduce or eliminate dependencies between programming elements
"Componentize" application binaries into easily upgradeable, replaceable
units
Expose features, commands and functionality for use by other applications
and components
Create distributed applications that can connect and communicate across
disparate machines and platforms
By attending the course is that you'll obtain a complete and comprehensive
grounding in the "Philosophy and Zen of COM", as well as its application and
implementation in C++ using Visual C++ 6.0, the Active Template Library (ATL),
Interface Definition Language (IDL) and the Microsoft Foundation Classes
(MFC).
Return to top
------------------------------------------------------------------------------
--
Why VC++, ATL, MFC & IDL?
It's simple: while COM is a language-independent (and to a lesser degree,
platform-independent) technology, the fact is that real data processing
components require a real programming language. COM programming languages like
VB are great for UI development, but simply don't have the processing power
or flexibility that you get with C++; Java is more powerful than Visual Basic,
and does a better job at letting you use Object-Oriented programming
techniques -- but Microsoft's Java (Visual J++) still hides more detail than
you may like in order to have complete and effective control over a
component's COM-based behavior. So while you may end up using some COM-based
implementation language other than C++, you'll learn the most about COM
programming if you start with C++ to learn the essential concepts and
techniques.
Visual C++ 6.0 is, of course, the most powerful C++ implementation for COM
programming (although you'll learn -- and we'll point out -- the limits of
VC++ for COM programming during the course of the class). And Visual C++ comes
with two excellent -- but largely different -- C++ programming frameworks:
the Active Template Library (ATL) and the Microsoft Foundation Classes (MFC).
MFC was designed for general purpose Windows programming with C++, and COM
was retrofitted onto it in 1993; it's my belief that you should only use MFC
on the server side when you're trying to build on an existing investment in
MFC code, and want to take advantage of specific MFC features (such as
document-view or MDI). Otherwise, I don't believe that MFC is a viable
framework for COM programming on the server side (it works great on the
client-side, except when it comes to implementing callback interfaces, but
we have a remedy for that as well.) ATL, on the other hand, really doesn't
do much for you outside of COM programming, but this gives it two great
advantages: it's an excellent choice for building specific types of COM
components (which you'll learn about in the class), and it's an excellent tool
for learning and understanding COM programming in C++. In this class,
you'll have the opportunity to create both client-side and server-side
components in ATL, and client-side components in MFC. If you need to implement
server-side components with MFC, we have lab exercises for you to learn
this -- but only after you've learned the fundamentals of COM and how these
are implemented in ATL. At that point, you'll be able to implement server-side
components in MFC with little difficulty.
There are, of course, the usual talking heads that'll tell you "just write
it in ______" and they fill in the blank with whatever's hot (over the years,
this has been everything from VB to MFC to Java to ATL to C# to you-name-it).
The fact is: there's no silver bullet, no single solution that'll solve all
of your problems. And saying that you should "write everything in ___" be it
ATL or MFC or VB, makes about as much sense as telling carpenters to only
use hammers and forget about saws ('cause they're passe', etc.). I suppose
they'll tell you to abandon your investment in thousands of lines of C++
(often written with MFC) for the sole reason that ATL does a better job of
providing COM support?
My advice: use the tool that best solves the problem, and the reality is
that you'll probably use a combination of such tools. In the class, you'll
learn that when creating new components, you should start by re-considering
traditional approaches to OOA/OOD, and focusing on defining services from your
specifications/analysis step. Then proceed to defining groups of functions
based on the services, grouping those into interfaces and defining them in
IDL, using IDL as an interface notational language. After grouping
interfaces into classes, then use ATL for the first layer of interface
implementation, and only if you have an existing investment in MFC do you
use it to complete non-trivial interface method implementations if you need
its support. (I should add that, because it's such an excellent client-side
development tool, you'll have the opportunity to use Visual Basic -- as well
as MFC and ATL -- to create client-side components in this class.)
A brief word about COM programming with MFC: anyone who's attempted anything
beyond dispinterfaces (if you don't know what this is, you will after
attending the class) in an MFC project knows that Microsoft's suggestion for
building COM interfaces with MFC is to use some complicated macros that
created nested classes (1 per interface). It doesn't help that MFC has not
been updated in any significant way since 1996, and seems to be dying a slow
death. Nonetheless, many of our students ask: "We have 1 million-line MFC
programs; can't we just add COM to those MFC-derived classes?" The answer is
yes, and in our class you'll learn a new technique that uses ATL-like
templates to make the implementation of IDispatch- and IUnknown-derived
interfaces a piece of cake in MFC projects.
Finally, why IDL? Well, Interface Definition Language is truly the starting
point: once you've learned why COM is important, and after you've completed
specification and analysis, IDL is the best notational tool currently
available to define a component's interfaces, methods, parameters, and the
network traffic implications of passing parameters in either direction when
making a method call. Plus, IDL is essential for creating type libraries (to
marshal IDispatch-derived interfaces, or for supplying type information to
client-side developers), and is crucial for creating proxy-stub components for
marshaling all other interfaces (or interfaces that can pass entire structs
or other custom data types). In this class, we'll include hands-on exercises
for writing IDL, creating type libraries and proxy-stubs, using custom data
types, and marshaling entire arrays of custom types between components .
Return to top
------------------------------------------------------------------------------
--
What About .NET?
Like COM, .NET is a component framework. It starts with the same core concepts
of COM -- interfaces as binary firewalls, unique component identity,
language-independence, location-independence and implementation-independence
-- but goes beyond that to address issues about programmer productivity that
COM -- and Microsoft's COM toolset -- failed to adequately address. In many
respects, .NET is COM but re-written from the ground up, eliminating many of
the plumbing-focused steps required in routine COM programming.
The hype about .NET has considerably obscured its purpose and its intent,
and pronouncements from gurus ("COM is dead") as well as implications by
others -- that .NET is going to be a major mental shift that will be as
difficult as COM, requiring you to throw away everything you've invested in
COM and Windows -- have led to a number of questions.
So what is .NET and how does it affect your investment in COM?
Again, .NET is a component framework. You'll use it in the future to build
software components, but you'll use approaches that in many respects will be
simpler and more powerful than the approaches you're using today with COM. And
.NET-supportive languages and tools (such as C# and VB.NET) offer simpler,
easier syntactic approaches to solving problems than C++ and VB do for COM.
For example, declaring a component class is largely a matter of using
attributes (like those found in IDL) on a C# or VB.NET class, and
enabling/disabling event support can be as simple as using syntax like the
following:
myClass.myEvent += mySink;
...
myClass.myEvent -= mySink;
Note that the concepts and terms are ones that easily translate from COM:
COM .NET
class class
object object
connection point / event event
advise advise
unadvise unadvise
so your conceptual understanding of COM will translate easily to .NET. The
differences, in many respects, have to do with syntax and expressiveness:
that's because .NET is an evolution of the thinking that produced COM:
\ Today, using COM
Tomorrow, using .NET
Components on multiple machines Components on the Internet
TCP/IP
HTML
RPC
SOAP
Components
Systems
Binary compatibility
Systems interoperability
Components to build applications Applications over multiple systems
.NET will let you build binary components that take advantage of the Web.
It will integrate various architectural solutions (e.g., SOAP to make remote
method calls via HTTP), services (e.g., COM and Windows interoperability)
and infrastructure (e.g., Biztalk). .NET will offer compatibility via a
shared, managed runtime environment. Components won’t call other components:
one component will ask .NET to call the other one (remember COM
proxy-stubs?), and .NET will take care of any marshaling incompatibilities.
With .NET, COM concepts – such as separation of interface from
implementation – and COM+ benefits – such as declarative attributes – are
still applicable and quite valid. As with COM, .NET classes are binary
components. The difference is that .NET will abstract away a great deal of the
plumbing details (such as IUnknown, apartments and reference counting) and
exposed underpinnings that are required today for components to interoperate.
.NET plumbing will be better hidden (or not exposed at all). But rather
than exposing new component services, .NET will take full advantage of COM+
services such as transactions, Just-In-Time-Activation (JITA), events, and
queued components, to name a few (see below).
.NET was announced in July, 2000, went into its first toolset Beta in January,
2001, and is scheduled to go into another beta in May, 2001. The tools will
probably ship late in 2001 and the first .NET platforms (i.e., Windows.NET, or
something like that) will appear after that point. Don't expect acceptance of
.NET until sometime in late 2002, at the earliest. (Windows 2000 shipped in
February, 2000, and is still in the acceptance mode in Spring, 2001.)
At some point in the future, you'll begin to create your software components
via .NET using C#, VB.NET, C++ or Java (as well as other languages). Whether
.NET will be supported on platforms prior to the mid-2001 release of Windows
XP (Windows 2000 v.1.5) remains to be seen: don't count on it. It's likely
that you'll build .NET components for deployment on .NET-compatible platforms,
and COM components for all platforms: COM components appear as other .NET
components to a .NET component, and .NET components appear as other COM
components to a COM component.
One question many of our students and clients ask: should I be moving to .
NET today (Spring, '01)?
The answer hasn't changed in any significant way since we first added this
section to the course description (Fall, '00):
.NET isn't available today in any production form and probably won't be
until late in 2001. (We don't believe in using betas for production
development; shame on those who do.)
.NET will change considerably in the next beta (May, 2001), but probably won't
change much after that.
.NET tools will probably start to get usable after that beta (Richard's
usual mantra: "wait until the 2nd major beta").
Prior to that time, just learning .NET with those tools will be
counter-productive; after that time, learning .NET will be useful to those who
have the bandwidth.
Learning .NET will be most productive once the first release of Visual
Studio .NET ships (probably late 2001).
.NET acceptance probably won't begin until sometime in mid-2002 or later.
The bottom line here: be prepared to start learning .NET sometime after
mid-2001, probably late in the year. We'll begin offering a set of 1-day .
NET courses in mid-2001 and we'll offer 5-day .NET BootCamps starting later in
the year.
What about my existing investment in COM?
COM components will be available to .NET components: you won't lose any
investment.
New components should only be written using .NET once the .NET tools are
released and .NET is stable (sometime in 2002 at the earliest).
Should I go ahead and learn COM now?
Yes: until we reach the point where there's no reason to create COM components
any longer (when we're no longer supporting systems that only support COM and
not .NET), you'll need to learn COM.
Your COM components will be usable from .NET, so you won't lose any
investment.
Will I be wasting time learning COM now?
No: COM is still the best way to build software components until .NET is
released and has become ubiquitous. COM is actually used to build .NET itself.
COM provides a migration path for creating future .NET components that utilize
COM+ (see below).
Only those who haven't learned COM by late 2002 / early 2003 should go
directly to .NET -- and that means either those who aren't yet in the business
or who aren't planning to build components on Microsoft platforms until
late 2002. (How boring!)
What's the proper migration path for COM components and what's the proper
educational path for COM developers?
COM to COM+ to .NET
After COM BootCamp, COM+ BootCamp will let you take advantage of and create
COM+ components that can become .NET components. Our COM+ BootCamp premiered
in January, 2001, and our .NET classes will begin soon after Microsoft
officially releases its .NET technologies and tools -- approximately
mid-2001.
Return to top
------------------------------------------------------------------------------
--
What About COM+?
COM+ is a set of component services which are available to components built
using COM or .NET.
Built on top of what once were DCOM and MTS, COM+ is a set of services that
are exclusively available on Windows 2000 (or later) systems. It replaces
and obsoletes raw DCOM and MTS, and its purpose is to provide a rich set of
component services for component distribution, administration and systems
scalability. When COM and .NET components are to be used across networks, as
part of distributed architecture, with enterprise-wide data sharing and
high-volume instantiation and stresses placed on them, COM+ comes to the
rescue. It provides a runtime environment that makes COM/.NET components
distributable, scalable and flexible beyond that provided by either
component framework. COM+ services are usually required in every system, and
are very hard to develop on your own. COM+ services allow you to focus on
the domain problem at hand, adding value, not plumbing.
But to take advantage of COM+, you should already know COM or .NET, and
present-day (Spring, '01) COM+ assumes that you already have experience
building COM components, that you’re ready to extend their capabilities in
a distributed, multi-machine environment. You cannot jump into COM+ without
first learning COM. But with COM experience under your belt, you can take
COM components written to run in single-machine scenarios and make them
scalable to handle the stresses of 1000+ machine environments and high
volume (1,000,000+) instantiations capable of handling 100+ transactions per
second.
This means that everything you learn in COM BootCamp is directly applicable to
COM+, and that once you graduate from COM BootCamp and gain some experience
with the techniques you'll learn there, you can then consider taking our
COM+ BootCamp which we've been offering since early 2001.
Return to top
------------------------------------------------------------------------------
--
Why you should attend
You should attend COM BootCamp if you:
Want to master COM programming in C++ using ATL
Have limited or minimal previous exposure to COM
Want to learn the requisite skills needed before you can address COM+ (which
supercedes DCOM & MTS)
Are convinced that COM programming will be at the center of software
development for the next several years
Are looking for a way to get immersed into COM in a relatively short period of
time
Think that programming should be fun
Think that software development is a joy, can't believe someone is paying
you to do it, and want to get even better at it
Want to be the most proficient COM developer you know
On leaving COM BootCamp, you'll have learned:
How to build COM Clients using MFC & ATL
How to build COM Servers using ATL
How to implement multiple interfaces in ATL-based COM objects
How to implement dual interfaces
Why [dual] has nothing to do with dual interfaces
How to create proxy-stub marshalers to marshal custom data types
Why you should avoid custom marshaling
How to implement connection points
How to work around the 4-round-trip initialization required with connection
points (which a famous COM book failed to show you)
How to utilize threads in COM servers and clients
Why you must always use interface pointer marshaling when sharing interfaces
between threads
How to re-use COM objects
How this course differs from other ones!
Unlike Certified Training Centers, we write my own course materials , based on
my own research, programming, etc.
Unlike Certified Training Center instructors, we teach my own materials
Unlike Certified Training Center courses, the material is based on what you
need to know to implement COM components, not what's needed to pass a test
(however, I've found that, after taking this course, you'll probably be able
to take the test cold and pass)
Unlike other COM specialists, I show you how to actually write and implement
COM components (you learn infrastructure and implementation -- not just
theory)
Unlike other COM specialists, you'll write every exercise in class (there
are no pre-canned exercises)
Unlike other COM specialists, you'll actually implement components merely
discussed in their classes
Unlike other COM specialists, you won't just tweak code generated by a
wizard : you'll write a great deal from scratch, and you'll know what wizard
code to modify (and why) and what code to leave untouched (and why)
Return to top
------------------------------------------------------------------------------
--
What you'll learn, Agenda & the BootCamp Experience
In this course, you'll learn:
Why COM is it important
How COM facilitates component-based development through interface-based design
and programming
How to use Interface Definition Language (IDL) to define interfaces and
objects
How to use IDL to create custom data types and generate proxy-stub
marshalers and type libraries
How to marshal entire arrays of custom data types across interface and machine
boundaries
How to implement COM classes, interfaces and clients in C++ using Visual C++,
ATL and MFC
How -- and when -- to support scripting clients as well as ordinary COM
clients from the same server
How to implement custom and dual interfaces in ATL
How to implement custom and dual interfaces in MFC using templates (and
without using those ugly macros)!
When to use ATL vs. MFC -- and vice-versa!
How to implement multi-threaded COM servers and clients
How to marshal interface pointers across thread/apartment boundaries
How to implement callbacks using Connection Points
How to implement callbacks without using Connection Points
How, when and when not to implement singleton servers
How to implement tear-off interfaces
How to re-use existing COM object implementations through binary containment
and aggregation
How to re-use COM objects in MFC and ATL through source re-use or
inheritance
How this course is different
The fact is, there are very few COM training courses out there with the
following attributes:
The instructor writes his own materials
The instructor has a world-class reputation
You actually are taught by the person advertised as teaching the course
The instructor programs COM for a living
The instructor will take the time to sit down, answer questions and help out
off-line
The instructor is not bound to spouting a party line, and will show you both
the strengths -- and the weaknesses -- of COM and the tools used to
implement it.
In this course, you'll be taught by Richard Hale Shaw, using Richard's own
materials. Richard provides consulting services and writes COM software for
a living, in addition to giving training classes and writing about COM. You'll
find that he will take extra time offline to answer questions and explain
ideas, and will give you a balanced view of how to best utilized these tools
and technologies -- not a sanitized, politically correct approach.
Agenda & Daily Schedule
We'll teach you and you'll work for 10 hours a day for 5 days (8am morning lab
time, 9am-6pm sessions of combined lecture, labs and debug discussions).
We'll include continental breakfast, lunch, morning and afternoon snacks, a
regular flood of caffeinated, high-sugar drinks and snacks all day (decaf,
non-sugar snacks and fruit for those who prefer them), and even an evening
break! Plus, you'll be laden down with over 200 pages of hand-out materials
and a 300+ page workbook with step-by-step instructions for re-creating the
exercises taught in class.
Daily schedule
8am - Continental Breakfast: Registration on opening day, AM labs the
remainder of the week
9am - Session start (informal breaks included)
1:00pm - Working lunch (we'll serve lunch, you'll eat and work exercises)
2:00pm - Session start (includes informal breaks -- featuring a high-sugar
snack: brownies, cookies, etc.)
6:00pm - Sessions end
Day1
Day2
Day3
Day4
Day5
8am - 9am
Continental Breakfast (registration at 830am)
AM Labs, Continental Breakfast
9am - 1pm
BootCamp sessions: lecture, workshop, lab exercises, Q&A, Debug Discussions
1pm - 2pm
Working Lunch
2pm - 6pm
BootCamp sessions: lecture, workshop, lab exercises, Q&A, Debug Discussions
6pm - 8pm
PM Labs, Free time
COM Brew Gathering Goodbyes, informal gathering for those still in town
8pm - Until
Free time in Ann Arbor
The COM BootCamp Experience
COM BootCamp is about two things: intensive learning and having fun doing
it!
To make this possible, we've created an environment where you can learn a
LOT in a relatively short period of time. First, we picked a desirable,
easy-to-reach location (Ann Arbor). Second, we picked a venue that will
offer us a space for ourselves, an ingestion of high-performance goodies
(snacks, coffee, sodas, juices, food), and a comfortable working environment
(a comfortable meeting area, room to work). (We'll even have an exercise
room available to us just a few steps from our BootCamp sessions -- a great
way to relieve those bug-inducing tension blocks.)
We've also designed a curriculum -- and a way of presenting it -- that
delivers intensive, high-speed learning. Part of our approach is to present
the theory you'll need to understand COM and how it should be utilized. But
another part is to keep the focus on the practical applications of COM --
deliberately avoiding approaches that have little practical application or
value, or that are strictly intellectual exercises but which will have no
bearing on software development in the real world.
To this end, COM BootCamp sessions are dynamic, resulting from a combination
of:
Lecture (to present in-depth information)
Workshop (to show how material presented in the lecture is to be utilized
and applied)
Exercises (to let you obtain HANDS-ON experience in the actual
implementation of the ideas being presented)
Q&A (where we'll review the ideas and exercises, and show new approaches and
techniques that were not part of the exercises)
Debug Discussions: these were the rage during last year's BootCamps. We'll
go beyond ordinary discussion, take apart each exercise, review it with the
debugger, and see how everything is working underneath.The result: you get a
complete grounding in "what happens under-the-hood" without losing sight of
the practical realities of how to design, organize and construct COM
components and applications.
The Exercises are part of a 300+ page workbook that shows you -- through
screen-shots, code and step-by-step explanations -- exactly HOW you should
complete each one successfully. To encourage you to work the Exercises,
we'll provide a working lunch (with great food from our Chef at the Campus
Inn) each day as well as workshop time for each of two evenings so that you
can make steady progress and get questions answered as you go.
We'll also focus on having fun: while most of the exercises are ones that
you'll work individually on your own machines, there are others that we'll
work as a group or in smaller, sub-groups.
In all, we're certain that you'll:
Learn a lot
Write a lot of code
Have a good -- if not great -- time doing it
Return to top
------------------------------------------------------------------------------
--
Pre-requisites
You must be familiar with the fundamentals of Windows programming and C++ in
order to attend. Sorry, no hand-holding here. You do NOT need to have previous
COM programming experience or experience with ATL or MFC, but programming
Windows with a C++ framework like MFC will certainly help, as will familiarity
with navigating through and using the VC++ environment (you don't have to
know the latter, but it definitely helps). On the C++ front, familiarity
with C++ templates, and RTTI constructs like static_cast will help as well
(although they're not absolutely essential).
Return to top
------------------------------------------------------------------------------
--
Course outline*
Introduction to COM, Part I
What is COM?
COM as the basis of ActiveX, OLE and DCOM
How COM has evolved: obsoletion of DCOM/MTS by COM+
Limitations of C++: reusability, versioning, dependency issues
The COM philosophy: why COM works like it does
Key COM concepts: interfaces, objects, identity, registration, type
information
COM Principles
Classes vs. Interfaces
Interface rules
Object identity and registration
Location independence, implementation transparency
How COM Works
Class Instantiation and Class Factories
Interface access, Proxy-Stubs
IUnknown, QI and Reference counting
Reference Counting rules
C++ Clients
C++ Clients using Smart Pointers
VB Clients
VJ++ Clients
Exercises: writing COM servers in straight C++, implementing class factories
by hand, adding IDL to an existing C++ component, generating typelibs,
creating clients that use server typelibs.
Introduction to COM, Part II
Scripting client support: IDispatch
Dual Interfaces: why they're no big deal and don't really matter to clients
Versioning scenarios
COM's Binary Re-use mechanisms: Containment vs. Aggregation
Introduction to COM Threading
Publishing Threading Needs and Preferences
Threads and Apartments
Single Threaded Apartments (STAs)
Multi-threaded Apartments (MTAs)
COM+: Neutral-threaded Apartments
COM+: what the future holds
Exercises: implementing your first ATL server, implementing an MFC client,
implementing an ATL client, passing data through interface methods, COM
properties, testing via MFC/ATL clients.
Understanding Interface Definition Language (IDL)
What is IDL and how is it used?
IDL & Marshaling: Typelib vs. Proxy-Stub vs. Custom Marshaling
Compiling IDL: MIDL and MIDL Options
IDL vs. ODL
IDL Structure
Including and Importing Other Files
IDL Constructs: type, interface, library, coclass
Interface Design & HRESULTs
IDL Data Types
Custom Data Types
Attribute-Based Programming
Applying Attributes to: typedefs, structs, interfaces, methods, method
arguments, properties, libraries, coclasses, coclass members
DispInterfaces and dispinterface Attributes
Arrays In IDL: Fixed, Varying, Open Arrays
Strings
Pointers: full, ptr, ref
Using COM's Common Allocator
Marshaling Interface Pointers between threads (and why you must always do
it)
Exercises: writing interface methods to marshal string parameters; Adding
custom data types; Generating, Building & Registering Proxy-Stubs,
Marshaling Arrays of Custom Data
COM Client Programming
#import: learn it, love it, use it
Creating clients in both MFC and ATL
Creating clients in Visual Basic
The client side of typelibs
Smart pointers: why they're not evil, why some people say so, how to use
them safely and effectively
Accessing your servers using smart pointers and typelibs
Accessing XML documents from COM clients: hijacking the XML parser in Internet
Explorer 5.0
Exercises: #import as a better typelib viewer, writing clients that use
typelibs.
COM Support for Scripting Clients: Building Automation-Based Servers
What is Automation?
Why Automation?
IDispatch vs. other Interfaces
Inside IDispatch
IDispatch Data Types
Dynamic Query of IDispatch (Late-Binding)
Static Query of IDispatch (Early-Binding)
IDispatch Performance Issues
Exercises: Scripting clients and servers using both late- and early-binding;
using properties
Using ATL as a COM Development Tool & Advanced Issues
Why ATL?
When to use ATL for COM
ATL vs. MFC
ATL & C++ Templates
Key features of ATL
The Architecture of ATL
COM Support in ATL: CComObject, CComObjectRoot
QI Support: COM Maps
Building ATL-based Projects
What ATL COM AppWizard generates -- and why
Components of ATL COM Objects: CComModule & Object Maps, CComObjectRoot &
COM Maps, CComObject, CComCoClass
ATL Object registration: Registrar Objects
Windowing in ATL: windowing and dialog classes, message maps
COM Clients in ATL: CComPtr
Exercises: Variations in ATL components, Modifying ATL components, re-using
ATL-based interface and object implementations, windowing and messaging, COM
clients in ATL
Advanced Issues
Singletons: when to use them, when to avoid them
COM Support for Callbacks
CallBack Scenarios
Utilizing Connection Points
Implementing Connection Point Servers
Threading and Apartments Re-visited
Designating Client Threading Needs
Creating Multithread Inproc Servers
Creating Multithread EXE Servers
Invoking STA Servers from Multithread Clients
Marshaling Interface Pointers between Threads
Aggregating the Free-Threaded Marshaler
Tear-Off Interfaces: what they are, how they work
COM Aggregation vs. COM Containment: Creating Polymorphic COM Objects
Mixing MFC & ATL: when and how to do so
Exercises: Implementing Connection Point Clients and Servers in ATL,
Creating Multithreaded Clients and Servers, Marshaling Interface Pointers
between Threads, Implementing Singletons, Creating tear-off interfaces,
Creating new COM objects from old ones, Utilizing COM Aggregation vs.
Containment, which one to use and when
Preparing for COM+
COM+ as a better DCOM and MTS
How objects are distributed
How COM -- and COM+ -- find distributed objects
Registering a distributed object
Invoking distributed objects
Why -- and when -- to use COM+
What the future holds: COM+ as the component services for both COM and .NET
Using MFC as a COM Development Tool (covered in Lab materials)
Why MFC?
When to use MFC for COM
What's missing from MFC?
Getting MFC Projects into shape: adding auto re-registration, MIDL Output,
TypeLib Embedding, TypeLib Registration, Proxy-Stub generation
MFC's COM Support: CCmdTarget
CCmdTarget, IUnknown & IDispatch
Class Factories in MFC
MFC's QI Mechanism, Interface Maps
The Custom Interface Macros and how they work
Using the Macros
Dual Interfaces via the Macros
A Better Approach: Implementing Dual Interfaces using ATL-style Templates
Exercises: Creating MFC Servers, Getting them on par with ATL projects, Adding
Custom Interface Support, Implementing Custom and Dual Interfaces
*Course outline subject to change without notice.
Return to top
------------------------------------------------------------------------------
--
Why Ann Arbor?
Ann Arbor, Michigan is centrally located in the United States, and an easy
25-minute highway ride west of Detroit Metropolitan airport (no, you don't
have to go anywhere near the city of Detroit in the process). The home of
the University of Michigan, Ann Arbor (A2) is the consummate college town,
with:
An interesting, eclectic population
Loads of interesting bookstores, cafes, CD stores, restaurants and other shops
Cool spring weather and comfortable, balmy summers (let's don't talk about the
winters!)
Ann Arbor BootCamps will be held at the Campus Inn: 2 short blocks from the
corner of Liberty and State, in the heart of Ann Arbor's downtown shopping
area, and you'll have a plethora of choices for spending what little spare
time you'll have (we intend to work you pretty hard!). Close by, you'll find:
The original flagship store for Border's Books (which Tom and Louis Borders
founded in Ann Arbor)
Great alternative and used bookstores (Dave's, Shaman Drum)
The UofM campus
SchoolKid's Records
Restaurants such as Ashley's (an English pub), Red Hawk (Ann Arbor eclectic),
and Zanzibar (tropical eclectic) to name a few.
A few blocks further at Liberty and Main, you'll find the heart of Ann Arbor's
restaurant alley featuring:
Gratzi's (Southern Italian)
Palio (Northern Italian and Tuscan)
Grizzly Peak (an excellent brew pub)
The Chop House / La Dolce Vita (top of the line steaks, world-class desserts,
cigars/martinis)
Scattered in-between are Ann Arbor's dozen or so espresso cafes -- so many
that Starbuck's has only recently opened a store in downtown A2 (and it's only
perhaps 2 blocks from the Campus Inn).And about 7 blocks northwest of the
Campus Inn is Zingerman's : a world-reknowned deli-cafe with humongoid,
over-stuffed sandwiches.
You'll also find that Ann Arbor is home to a number of software companies,
many of which are located in the downtown area. And best of all, Ann Arbor
is a walkable city: you don't need to rent a car while attending our
BootCamps. We strongly recommend that you avoid renting a car: you won't
need one during your stay.
An eclectic collection of Ann Arbor-related web sites of interest:
Michigan Live - Ann Arbor Edition ArborWeb Weather in Ann Arbor UofM Music
Library
Student Guide Zingerman's Deli GeoCities's Ann Arbor site
Return to top
------------------------------------------------------------------------------
--
Why Sunday-Thursday?
The fact is, you'll find it easier to convince your boss to send you to COM
BootCamp when they find out that they can cut the airfare in half because
you'll need to arrive on Saturday to start on our first morning, Sunday AM.
And, we've found that many folks like having the option of having at least one
weekday that's not part of the 5-day class (for either business or personal
reasons).
Lodging -- and how to get there
Ann Arbor BootCamp will be held at the Campus Inn, located at 615 E. Huron St.
in the heart of downtown Ann Arbor. While there are a number of hotels and
motels in the Ann Arbor area, there are only 2 downtown, and a room block is
being held for BootCamp attendees. Rooms at the Campus Inn are being held
for a limited time only. To reserve your room at the Campus Inn, call
1-800-666-8693 (or 1-734-769-2200 or fax them at 1-734-769-9265); be sure to
tell them that you're attending COM BootCamp. For more information about the
Campus Inn, please see www.CampusInn.com, or email the Campus Inn:
info@CampusInn.com.
Ann Arbor is easy to travel to: from any airport in the country, make your
reservations to fly to Detroit-Wayne County Metropolitan airport (DTW).
On arrival at DTW, you can proceed to Ann Arbor via:
Airport van: this is the least expensive, but least convenient. The vans leave
DTW approximately every half hour, and you can pick up tickets at counters
directly across from baggage claim (you may have to wait until the next one
becomes available once you pick up your baggage). The cost is $22 one-way, $42
round-trip (ask for the AAA discount $20 one-way, $38 round-trip, when making
reservations). The vans run from 700am to 1130pm, 365 days a year; the Campus
Inn is one of their stops in Ann Arbor (just let the driver know you're going
there) but you may have to sit through a number of intermediate stops
before you arrive. To make your reservations, call Commuter Transportation
at 1-888-854-6700 or 1-800-488-7433.
Airport taxi: this is more expensive (approximately $ 45 metered each way; but
ask the for flat rate, usually $39 from Detroit Metro), but more convenient.
Taxis are available 24hrs a day, and can be found immediately outside of
the baggage claim areas at DTW. Just tell them that you're going to the Campus
Inn in Ann Arbor: they go there all the time.
Rental car: virtually unnecessary in downtown Ann Arbor itself, but some folks
prefer them. All of the major rental car agencies are available at DTW. After
picking up your car, follow the signs to I-94 West (direction Chicago),
proceed approximately 25 miles, past US-23 to the State Street exit (Exit
#177) and turn right (North). Proceed 2.5 miles: the last 1/2 mile will take
you past the University of Michigan Central campus and into the heart of
downtown Ann Arbor. Turn left at E. Huron St. (2nd light after the State
theater which will be on your right), and the Campus Inn is almost immediately
on your right after the turn. (Other directions are available via the
Campus Inn's web site.)
Yahoo has maps of Ann Arbor online (using the Campus Inn as a locus).
Note: the economic and practical realities of Ann Arbor are such that we
strongly advise against renting a car during your stay. Practically everything
worth doing and seeing in downtown Ann Arbor is within walking distance of
the Campus Inn, and the cost of renting a car for 5 days is far more than even
a round-trip taxi ride from/to the airport for 1 person.
Return to top
------------------------------------------------------------------------------
--
What you should bring
COM BootCamp is a HANDS-ON class.The cost of the course NOW INCLUDES use of
a Pentium 3, 600mhz machine running Windows 2000 for each COM BootCamp
attendee. Our labs are fully networked with Internet access available to you
as well. Visual Studio 6.0 will be installed on each machine so you can hit
the ground running as soon as you arrive!! We'll also provide a plentiful
assortment of sugared (and diet), caffeinated (and decaf) beverages, juices
and snacks -- plus lunch and tons of materials, loads of instruction and
attention, and lots of fun.
You should bring a healthy appetite to learn COM, a desire to move past the
mysticism left surrounding it by some COM gurus, and the expectations of a
rewarding experience.
Return to top
------------------------------------------------------------------------------
--
Registration, Fees & Discounts
At COM BootCamp, you'll get:
Over 40 hours of HANDS-ON instruction for across 9 hours each day for 5 days
Over 400 pages of hand-out materials, including a 300+ page workbook with
step-by-step instructions for creating the exercises worked in class
Over 23 fundamental lab exercises plus 5 extra credit labs
Access to a Pentium 3, 600mhz machine running Windows 2000 with Visual
Studio 6.0 installed, and Internet access available.
Continental breakfast, delicious lunch, morning and afternoon snacks, and a
regular flood of caffeinated, high-sugar drinks
Evening events in a pleasant, interesting and highly livable community
A comfortable, pleasant working environment
The best COM instruction around (comments from previous BootCamp attendees)
All this for $2950.
But if you register by Friday, May 25th, you can register via our Early Bird
discount for $ 2600.
If you are part of a team, or wish to suggest COM BootCamp to colleagues,
you'll want to take advantage of our "Buddy System Discount" for groups of 2
or more developers.
Click here to Register via our Secure Site with Credit Card, Check or Fax
------------------------------------------------------------------------------
--
COM BootCamp On-sites
BootCamp On-sites
While our $2950 registration fee is quite competitive for 5-days of training,
the associated travel costs can be prohibitive for those who have groups
approaching 10 or more. If you'd like to have us teach COM BootCamp -- or a
subset of it -- at your site, please email us. Fees are seasonal, ranging from
$350-$400 per student per day for groups of 10 or more, plus our travel
expenses (by eliminating the overhead of having to rent a hotel room, etc., at
our end, this is equivalent to attending BootCamp for as little as $1750
per student -- less with larger groups -- with no associated travel costs).
Additional discounts are available with larger groups. We can discuss costs,
timeframes, content, setup and other details by email or phone (for example,
you may prefer that we customize the BootCamp content to be all ATL or all
MFC) . Please leave us a phone number and suggested times where we can reach
you. We'll usually email a reply within 24hrs and will call within a day or
so.
Due Diligence
Microsoft Windows, Windows NT, Windows 95, Windows 98, Windows 2000, Visual
C++, Active Template Library, Microsoft Foundation Classes, and Visual Basic
are trademarks of Microsoft Corporation.
Java is a trademark of Sun Microsystems.
--
耶稣说:人不能只靠面包过活,你的心灵需要比面包
更有营养的东西,你有多久没有唱歌,没有到大自然中走
一走,没有读诗?
※ 来源:·哈工大紫丁香 bbs.hit.edu.cn·[FROM: DnC.hit.edu.cn]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:412.583毫秒