Fog Creek Software
Discussion Board




com and .NET

Folks,

I keep hearing that .NET replaces COM. I found this statement on this board and elsewhere. However, is it still beneficial to learn COM? May be my analogy is too far stretched, but knowing assembly (at least at the read-only level) is very beneficial in the embedded world I'm working in.

My current project is based on WinCE, and certain things are only possible with COM. (And no, .NET CF is not an option.)

In a nutshell, I will get somewhat familiar with COM for the purposes of the project, but is it still worthwhile to learn COM inside out even if the assumption is that .NET will take over the world of Windows computing?

Azazello
Thursday, August 14, 2003

Depends on what you're doing. (ha doesn't it always)
My experience with COM is that it's relatively easy to write Controls in C++. For business objects use VB for your prototypes and decompile an IDL from that, then recompile and use that as your reference objects (Even if you're working in C++ most clients will be written in VB or VBScript).
.NET is the way forward, but COM will be with us for many years to come (In the same way that 16 bit windows programs still are)
My recommendation would probably be "Essential COM" by Don Box. However it really does depend on what level you need to understand COM too. Since you're coming from a read only assembler background you'll probably find it useful. See if you can get hold of an older MSDN disk (circa 2001) where they still have the technical articles for COM. Remember also that it's been called OLE,OLE2 and ActiveX at various points in it's life.

Peter Ibbotson
Thursday, August 14, 2003

.NET is kind of an evolution of COM.  It applies many of the COM principles behind the scenes, so you don't have to deal with them.

COM takes a while to learn, but is interesting knowledge.  I read the Box book when I was learning COM, which is part of my job.  It is excellent.

The funny thing is, that all the stuff you had to learn for COM is the stuff that gets abstracted away in .NET.

Walt
Thursday, August 14, 2003

Ignore any technology, and in a few years, it will most likely go away.

That's what I did with COM.

:-)

Jester
Thursday, August 14, 2003

I suspect this is like anything else - those who have learned COM (like I did) will feel that there's a certain level of understanding that may only come with learning the nuts and bolts first.

Others, who skipped the blood and pain of iunknown may say they can work with .Net assemblies just fine without understanding COM, thank you very much.

And of course there is no objective way to compare the two. [grin]

I would have to say - if you don't have to know COM, don't learn it. You really need 1-2 years of work to "know" COM, and I'm not sure that knowledge is essential. If you're in a .Net world, spend the time learning remoting, assemblies, etc.

Philo

Philo
Thursday, August 14, 2003

Thanks for the replies! OK, since .NET adds an abstraction layer over COM, it seems to be useful to learn it because of Joel's law of leaky abstractions! :)

So let me put it another way: If a developer writes .NET code, would the knowledge of COM help him develop better, more efficient software?

Don't get me wrong; I subscribe to the motto that no knowledge is useless, but when one has to prioritize one's time...

Azazello
Thursday, August 14, 2003

COM and .NET ideas are related in places. .NET is not a layer over COM. You can however get wrapper classes which make using COM objects possible in a .NET world.

Simply put read the Don Box book, if you're a C++/embedded programmer it should make sense, but don't get too hung up about it. Since we work in a dual system world for the next few years it will be useful to know both. However in 5 years time I suspect the knowledge will be about as useful as how memory management worked in windows 3.0

Peter Ibbotson
Thursday, August 14, 2003

COM and .NET have some philosophically similar goals. Both attempt to give a language agnostic component compatibility system. Both have levels of metadata about classes and interfaces available.

You don't need to understand the mechanics of how COM works to use .NET (although it will help, if you do any COM interop). The actual details of the implementations are very, very different.

Brad Wilson (dotnetguy.techieswithcats.com)
Thursday, August 14, 2003

Thanks again to everybody!

Azazello
Thursday, August 14, 2003

Don Box seems like a smart guy, but he's a terrible, terrible writer. Almost unbelievably bad.

Really, I can't stress enough what a poor writer he is.

Clutch Cargo
Thursday, August 14, 2003

*  Recent Topics

*  Fog Creek Home