Slashdot Mirror


Programming .NET Components

Gianluca Insolvibile writes "I plead guilty: I have always admired Microsoft's COM architecture and the relative simplicity that allows you to reuse already installed components to create even complex programs. And I have always been fascinated by the distributed nature of DCOM, which seemed to me much more graspable than complex monsters like CORBA and J2EE. While looking for equally expressive Open Source component technologies among GNOME and KDE, I was never able to find something fitting my needs (I never got into Bonobo deeply enough, though)." Read on to see how this led Gianluca to Juval Loewy's O'Reilly-published Programming .NET Components, and what he thinks of the book. Programming .NET Components author Juval Loewy pages 460 publisher O'Reilly rating 7.5 reviewer Gianluca Insolvibile ISBN 0596003471 summary An introduction to components-oriented development with the tools and services provided by the .NET framework

One day, I stumbled upon the mono and Portable.NET projects, which are trying to bring all the .NET stuff to the penguin platform. This was the main reason that convinced me to learn more on .NET: open specs, a component-enabling technology, the cross-platform mirage, a completely new (well, sort of) set of concepts to be grasped, and something which I could use both on Linux and on Windows.

Armed with these expectations, I decided to look for a good introductory text on the .NET framework focused on components development. Among the plethora of publications on the subject, I decided to stick with a publisher having a long and respectable tradition in Open Source related books. Among the herd of funny beasts that populate O'Reilly's catalog, I picked out a "land hermit crab," aka Programming .NET Components, by Juval Loewy.

Overview The book begins with a chapter giving a rationale behind component-oriented programming versus object-oriented programming, that is, interfaces versus inheritance. The second chapter shows how those concepts are reflected in the .NET Framework, briefly introducing the Common Language Runtime (CLR), the Intermediate Language (IL) and .NET Assemblies. The following three chapters deal with interface-based programming, objects lifecycle management and versioning, gradually introducing the underlying concepts and showing how they become concrete in the .NET framework (more specifically, by using the C# language). No formal introduction to C# language constructs is given, but if you are familiar with C++ or Java you will be able to follow the code snippets fairly easily.

Events and asynchronous code execution are the subjects of Chapters 6 and 7, respectively. While the former is just a quick introduction to the C# approach to delegates and events (yet useful if you are new to the matter), the chapter on asynchronous calls is much more substantial. The mechanics behind async calls are explained, together with pros and cons of using callbacks, BeginInvoke() and EndInvoke() calls, one-way methods, and so on.

Chapter 8 is devoted to Multithreading and Concurrency. Commonplace concepts like threads application and usage are explained, as always dressed with a bit of C# syntax. While such concepts are easily found in any multithreaded programming tutorial on the Internet, explaining them from the basics never hurts -- and prepares the reader to the most insidious traps of multithreaded programming. Synchronization appropriately takes a fair part of Chapter 8: automatic and manual synchronization provided by the .NET runtime environment are explained, together with the concepts of contexts and synchronization domains. This part is quite interesting, since it delves into .NET specific concepts which are quite new to programmers who had a happy Microsoft-less childhood (though they might not be so new to people who speak COM fluently). Other .NET threading related services (such as timers) are presented at the end of the chapter.

Chapter 9, devoted to object serialization and persistence, describes how live objects can be transformed (formatted) into a stream of bytes to be sent over a network channel, or stored on a persistent storage medium. This chapter lays the grounds for the exacting chapter on remoting, which follows immediately. Chapter 10 is the longest and most content-rich chapter of the book: first, the entire story of native processes, .NET app domains and assemblies is told. After reading it here, it won't look so confusing as before. Then, objects marshaling, remote callbacks, synchronization and activation modes are described, including client and server activated, single-call and singleton modes. Afterwards, the author gets to a global overview of the .NET remoting architecture, its basic building blocks (like proxies, transport channels and call dispatchers) and working mechanisms (like type registration and environment configuration). A reprise on objects sponsorship and leasing closes the chapter and completes the discussion on objects' lifecycle left pending in Chapter 4. Chapter 10 offers a lot of interesting cues, but unfortunately cannot dig deeply enough in the subject (after all, this is not a book on remoting). Many people (including Juval himself) recommend Ingo Rammer's Advanced .NET Remoting (APress) to learn more on the topic, but I have yet to get my hands on it.

Chapter 11 reprises the description of contexts in .NET, this time focusing on calls interception. The whole interception architecture is described with a fair level of detail and, as always, in a clear and understandable way. Context-agile and context-bound objects are described, as well as .NET and custom component services. While reading this chapter, you start understanding that contexts, app domains, call interception and remoting are tightly interwoven and that their full understanding is the real key to the exploitation of the .NET platform potential. Unfortunately, this is where the book leaves you alone -- but I strongly suspect that a full coverage of these topics would have required an entire book on its own.

The last chapter of the book deals with the .NET Security architecture, introducing the concepts of permissions, code groups and policies. Security administration is explained, both from a system configuration and a programmatic point of view.

What's to like What I liked most is the straightforward approach of the author in introducing the rationale behind components, components-based programming and their support in the .NET Framework: each concept is walked through step-by-step, instead of being presented in a complete working example with little or no explanation. Hence, you won't get working code on page 3 of the book -- instead, you will gradually learn how to write some.

Indeed, I found the description of awkward concepts like asynchronous calls, multithreading and remoting very clear, even for someone with no previous experience with .NET and C#.

I also consider a plus the broad experience the author has in the field, which shines through the many programming hints given, and in lots of references to concepts in COM which have an homologous in .NET.

I finally found the book to have the right balance between printed code and text (that is: do not fill hundreds of pages with code, I'll look at it online).

What's to consider Programming .NET Components is just an introductory book: it points you in the right direction toward components programming with .NET, but does not bring you very far. If you are really serious about learning .NET advanced topics, you will need a more specific tome to complement (or substitute for) this one.

More specifically, the 70 pages which cover remoting are just an introduction to the matter. The same applies to some of the most important concepts revolving around .NET (app domains, contexts, and the like).

Finally, despite the subtitle ("Design and Build Maintainable Systems using Components-Oriented Programming"), be warned that this is not at all a book on software design (components oriented programming is covered in just 15 pages).

The summary Reading the book goes without a glitch, thanks to a smooth writing style and a very structured approach to explaining concepts. Still, when I turned the last page of the book I felt that my understanding of components within the .NET platform was far from complete.

.NET Components Programming is quite fair to its title: it will teach you how to program components by using .NET constructs, but (apart from some quick notes here and there) it will not provide extensive coverage of components oriented design and development. If you are already familiar with .NET concepts and are looking for something shedding light on components programming, this book will not help you significantly. On the contrary, if you know something about components and want to start developing them into the .NET Framework, this will surely be an interesting read.

Table of Contents
Preface
Chapter 1. Introducing Component-oriented programming
Chapter 2. .NET Component-oriented Programming Essentials
Chapter 3. Interface-based Programming
Chapter 4. Lifecycle Management
Chapter 5. Version Control
Chapter 6. Events
Chapter 7. Asynchronous Calls
Chapter 8. Multithreading and Concurrency Management
Chapter 9. Serialization and Persistence
Chapter 10. Remoting
Chapter 11. Context and Interception
Chapter 12. Security
Appendix A. Interface-based Web-services
Appendix B. Custom Security Principal
Appendix C. Reflection and Attributes

You can purchase Programming .NET Components from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

51 of 327 comments (clear)

  1. This is what this article is about. by Anonymous Coward · · Score: 5, Insightful

    This article from earlier today explained it all
    The lack of starndardized libraries. KParts, Bonbobo, XParts, DCOP, XUL, OpenOffice are all competing technologies. No one component model for linux. Wan't the KHTML part to display a webpage in your gnumeric spreadshit? No, you can't do it yet.

    I just hope the proposed Xembed standard gets implemented soon, or Linux will be screwed on the desktop for a while

    1. Re:This is what this article is about. by CyberKnet · · Score: 2, Insightful

      Wow. based solely on this logic, I am convinced we should stop using search engines and remove plugin capability from our web browsers (no more flash, ra, java, acrobot or others, please). While while we're at it, we should probably stop reusing and refactoring code, remove pipe and redirect capability from our shells, and stop using those damn ATMS and credit cards. Use cash people, cash!

      Depending on other things is a REALLY stupid idea.

      Thanks for enlightening me.

      --
      Video meliora proboque deteriora sequor - Ovidius
    2. Re:This is what this article is about. by Dalroth · · Score: 2, Informative

      XUL is not a component framework, it's a javascript/xml based interface language that just happens to use XPCOM, which IS a component framework. XPCOM is very similar to COM+, with some of the more obscure cruft taken out and some things missing (like a global standard transaction manager and remoting support).

      You make a good point, however, I just wanted to clarify what exactly XUL is, becuase it is definitely NOT a component framework.

      Bryan

  2. What? by JohnwheeleR · · Score: 5, Funny
    And I have always been fascinated by the distributed nature of DCOM, which seemed to me much more graspable than complex monsters like CORBA and J2EE


    Why anyone would say DCOM is more graspable than J2EE is IUnknown

    1. Re:What? by dnoyeb · · Score: 2, Funny

      Of course DCOM is simpler than CORBA or J2EE.

      CORBA is cross-language.

      J2EE is cross-platform.

      DCOM is cross-yourfingers.

      (j/k, I actually like DCOM, but it has a much simpler task)

  3. Re:Yes! by RobertB-DC · · Score: 2, Funny

    Thanks to the Binary Decoder:

    I've been waiting for a good review on .NET!

    It could have been a *lot* worse. Never click on anything that references 01100111 01101111 01100001 01110100 01110011 01100101 00101110 01100011 01111000 !

    --
    Stressed? Me? Of course not. Stress is what a rubber band feels before it breaks, silly.
  4. Microsoft by Nuttles · · Score: 4, Insightful

    Finally, someone that at least indirectly acknowledges that Microsoft oriented programming is at least worth reading about. I am like many people who read slashdot in that I think Microsoft doesn't play nice in the industry, but they are, like it or not, the de facto standard out there.

    Nuttles
    Christian and proud of it

    1. Re:Microsoft by Winterblink · · Score: 4, Insightful

      Well, whether the greater /. crowd realizes it or not, there's a lot of us who regularly contribute around here that develop on the Microsoft platform and do so willingly. Lets face it, there's lots of work out there for this stuff, and if I can make money doing it then great. While at times Slashdot can be rather hostile towards Microsoft anything, it's still a pretty good resource for interesting IT information and wacky links.

      --
      "I'm a leaf on the wind. Watch how I soar."
      -Hoban Washburn
    2. Re:Microsoft by rutledjw · · Score: 3, Insightful
      "de facto standard" how? On server-side stuff? They are not. On Web Servers? Nope. App Servers? No. DB? Programming Language(s)?

      They control the desktop and have a majority of the browser market. How that makes them a "de facto standard" for server-side and/or OO programming languages I'm not certian.

      Especially considering that .NET is an attempt to implement Java / JVM concepts within an MS-only environment

      --

      Computer Science is Applied Philosophy
    3. Re:Microsoft by twocents · · Score: 3, Insightful

      but they are, like it or not, the de facto standard out there.

      Unless you count databases, web, mail, and print servers.

      Sorry if I missed some.

  5. Simplicity??? by Stiletto · · Score: 4, Interesting

    I have always admired Microsoft's COM architecture and the relative simplicity that allows you to reuse already installed components

    "Simplicity" is probably the one word you can't use to describe that nightmare called COM. COM makes programmers jump through hoops to achieve what plain vanilla C++ (mostly) already provides. Anyone who has ever tried to do a large project using COM (no, that little DirectX Tetris game doesn't count) can attest to the pain and suffering the architecture inflicts on those unlucky enough to have to use it.

    1. Re:Simplicity??? by AKAImBatman · · Score: 2, Insightful

      Thank you! And please, while you're at it, remind the Slashdot crowd of the stupid "one install per system" idiocy that M$ forces on you. Want to test multiple versions of something some COM component? Buy more windows boxes!!!

    2. Re:Simplicity??? by msheppard · · Score: 4, Interesting

      COM was a pain in C++. COM was easy as pie in VB. .NET components work equally easy in C# or VB.NET

      M@

      --
      Krispy Cream is people
    3. Re:Simplicity??? by anonymous+loser · · Score: 5, Interesting
      COM makes programmers jump through hoops to achieve what plain vanilla C++ (mostly) already provides. Anyone who has ever tried to do a large project using COM (no, that little DirectX Tetris game doesn't count) can attest to the pain and suffering the architecture inflicts on those unlucky enough to have to use it.

      COM can definitely be challenging sometimes when things don't work properly, but in my experience it makes my life easier much more often than it makes my life more difficult.

      For example, I'd say it's MUCH easier to use the COM-reliant WSH (Windows Scripting Host) to add scripting capabilities to my application than it is to write my own interpreters for all those languages, or make my own scripting language. I've done both, and using WSH takes almost no time or effort, whereas writing my own backend and/or language compiler/interpreter can take days.

      If I want to integrate my application with other windows apps, COM is pretty much the only way to go. Some programs MIGHT offer a native C++ or Java API, but 99% of the time the applications I have to integrate with expose a COM API exclusively. So, writing my app using vanilla C++ doesn't do much since I have to do all that COM programming anyway.

      Similarly, if I want other programs to be able to talk to mine, exposing a COM API is usually my best bet, since it allows people to choose from a variety of languages, perform rapid prototyping quickly and easily, and be able to quickly integrate my application into other applications I hadn't even considered. Anyone can pick up a bit of VBScript or VBA and figure out how to use my application through its COM API. I've had managers muddle through simple excel macros to control my software and do some great customization that way, but a C/C++/Java API means only other programmers will be able to take advantage of that feature. IMHO There's no point in developing features only a select few users will be able to take advantage of.

      And getting back to WSH, this also means that users don't have to be programmers to use other windows programs from my application, either. Want to make my app export data directly to Excel and plot it? No problem! Record a macro in Excel and you're halfway there!

      When all bets are in, I'd much rather have COM than not have it. All of the hoops you refer to are what make COM so easy to use from a higher level of abstraction, which was the goal in the first place. The places where it runs into problems are generally where the spec (IMHO) is ill-defined (or undefined) such as how to effectively handle multi-threaded apps talking to single-threaded apps and vice-versa, determining how and when to display a user interface for a program that is being controlled via COM, determining how and when a program should clean-up and exit that is being controlled by its API (e.g. some programs require you explicitly to call a "quit" function, even though releasing the object should be sufficient), and the semantics for getting/using/releasing COM objects for programs that users are already running. Despite those flaws, I still get a lot of mileage out of COM, and I spend a lot more time making useful things happen than being mired in the tedious bits.

    4. Re:Simplicity??? by RelliK · · Score: 4, Interesting
      For example, I'd say it's MUCH easier to use the COM-reliant WSH (Windows Scripting Host) to add scripting capabilities to my application than it is to write my own interpreters for all those languages, or make my own scripting language. I've done both, and using WSH takes almost no time or effort, whereas writing my own backend and/or language compiler/interpreter can take days.

      This example is stupid. You are saying that it is much easier to use a third-party library than to write your own implementation. Well, duh! And it makes no difference whether you access the library via COM or plain C++ / Java / whatever interface.

      If I want to integrate my application with other windows apps, COM is pretty much the only way to go. Some programs MIGHT offer a native C++ or Java API, but 99% of the time the applications I have to integrate with expose a COM API exclusively. So, writing my app using vanilla C++ doesn't do much since I have to do all that COM programming anyway.

      There! Now we get to the real reason windows programmers use COM: they are forced to!

      I've had managers muddle through simple excel macros to control my software and do some great customization that way, but a C/C++/Java API means only other programmers will be able to take advantage of that feature.

      There are other ways to do it. There is no reason why excel couldn't have a scripting library to link with your application. It's no different from linking with WSH. But Microsoft chose COM...

      --
      ___
      If you think big enough, you'll never have to do it.
    5. Re:Simplicity??? by mattgreen · · Score: 2, Interesting

      COM was designed to erode the differences between programming languages on the Win32 platform. Obviously this isn't easy or elegant. Most painful is probably querying for interfaces using the awful ID strings, and marshaling all your parameters. In addition, I don't see how equalizing the languages is a good thing. If I develop an extensible application, I would *not* want users writing plugins using VB. With that in mind .NET can be seen as COM 2.0, because all the languages compile to a common format, and are really just a choice of your favorite grammar.

    6. Re:Simplicity??? by Jugalator · · Score: 2, Insightful

      COM was a pain in C++.

      COM is pretty easy in C++ with the #import key word. Actually, it's very easy with that one as VC++ will generate wrapper classes for you to communicate with the component. The only difference from VB should be the syntax; you wouldn't write much more code to accomplish the same thing. Sure, #import is probably a VC++ specific key word, but as COM is an MS-specific technology and VC++ is the dominating IDE on Windows, I don't really see a problem with that.

      --
      Beware: In C++, your friends can see your privates!
    7. Re:Simplicity??? by Gaijin42 · · Score: 3, Informative

      for VB = 6 I agree 100%

      For vb.net, it is fully featured, and just as powerfull as c#

      I personally prefer c# syntax, because it is more terse, and more strict. Its also closer to Java and C (obviously) so I dont have to do as much mind shifting about case sensitivity, semicolons, etc.

    8. Re:Simplicity??? by Digital11 · · Score: 2, Informative

      *ring ring* Hello? Is this AKAImBatman? Yes, I'd like to inform you that the article you're posting on is about the very technology that you're stating doesn't exist in MS-land....

      No, but seriously, dotnet is all about versioning.. You could have as many different builds of the same software in the GAC as you wanted. Dotnet allows XCopy deployment without registering components, etc and a pretty darn decent versioning management system. Heck, with ASP.NET you can deploy a new version of your dll's for your web app while the app is still running and any new requests will use the new dlls while any still-running requests at the time of deployment will continue to use the old dll's until the request is finished processing.

      --
      I am a leaf on the wind. Watch how I soar.
    9. Re:Simplicity??? by anonymous+loser · · Score: 2, Interesting
      This example is stupid. You are saying that it is much easier to use a third-party library than to write your own implementation. Well, duh! And it makes no difference whether you access the library via COM or plain C++ / Java / whatever interface.


      No, you are both oversimplifying what I said, and putting words in my mouth. What I'm saying is that thanks to the COM interface architecture, there are ubiquitous components that can all talk to each other with relative ease, making stuff like adding a scripting language relatively painless. Conversely, I have used C and C++ libraries for doing that stuff as well, and it is anything but painless. It's better than coding everything by hand, but not as easy as COM and WSH make it.

      There! Now we get to the real reason windows programmers use COM: they are forced to!


      Huh? Most programs expose a COM API exclusively because it gives you the most functionality for the effort required. It isn't costly to implement, you can access it from any language with relative ease, and it's strongly supported by the OS. Nobody is forced to use COM, and frankly I would love it if I could use COM on UNIX, too. It would make UNIX component programming much easier than it is. CORBA is a clusterfuck that really takes a lot of work to implement even if you are using the latest whiz-bang commercial libraries. I spent a lot of time doing CORBA and other component integration before I finally learned COM. COM is downright simple by comparison.

      There are other ways to do it. There is no reason why excel couldn't have a scripting library to link with your application. It's no different from linking with WSH. But Microsoft chose COM...


      And there's no reason UNIX apps couldn't support COM, either. It's an open standard, and IMHO it's better than what you suggest since it allows my to dynamically declare and use interfaces. Meaning, I don't have to link to the programs I wish to integrate with. Instead I can just say "create an instance of this object" when I want to use it, and the OS takes care of the rest-it figures out if it needs to link to a library, start an executable, or whatever.

    10. Re:Simplicity??? by nixer · · Score: 2, Insightful
      Actually you can put two copies of the same COM component on the same system - it's called side-by-side running. It aint pretty, but it works.

      There was nothing particularly wrong with the approach M$ took with only allowing one instance of a single version of a component to be installed. The problem was all the hackers out there who didn't understand the versioning schema - and hence failed to provide backwards compatibility for their components under the same GUID.

      COM is complicated - but then again so is J2EE (which is what I'm now developing with).

      Under .NET everything gets much nicer with the fine grained versioning and scoping on assemblies. Oh yes, and let's see how Java approaches the issue - ah yes - we ignore it entirely. OK we don't have system wide issues, but if you've ever played the game called "which version of Xerces works with all my third party utilities" you'll know what I mean.

      Microsoft has its problems - but they think through their stuff well.

    11. Re:Simplicity??? by ncc74656 · · Score: 2, Interesting
      And please, while you're at it, remind the Slashdot crowd of the stupid "one install per system" idiocy that M$ forces on you.

      MSDN includes access to all of the desktop and server versions of Windows, and you can have up to 10 machines running desktop Windows. They figured that a coder would have multiple machines and accomodated that.

      Nice attempt at a troll, though. Not.

      --
      20 January 2017: the End of an Error.
  6. Re:DCOM vs .NET? by Pfhreakaz0id · · Score: 3, Interesting

    umm, his comment was And I have always been fascinated by the distributed nature of DCOM, which seemed to me much more graspable than complex monsters like CORBA and J2EE.

    DCOM, can, indeed be a mess when things go wrong. Show me a dcom programmer who doesn't know how to use dcomcnfg fluently and you're probably looking at someone padding their resume. But so can EJB's (want to see our organizations Oracle TAR's on EJB context lookups? There are many... and you have no clear idea to track down the problems).

    I think .NET remoting is an attempt at a compromise between those two (caveat: I haven't done a lot with it), we'll see how it works out.

  7. Re:.NET is crap by the_rev_matt · · Score: 3, Interesting

    No technology is trying to become Cold Fusion. .Net is trying to become Java, and so is Java, but no one in their right mind wants to aspire to be an evolutionary dead end like CF. Macromedia (who now one CF) are slowly migrating all CF to J2EE and will kill of CF.

    --
    this is getting old and so are you

    blog

  8. Re:Did I miss a memo or something? by cpct0 · · Score: 3, Insightful

    Heheheh As a computer programmer myself, I tend to like to see everything that exist in the world. I don't care if it's made by the evil monopolistic giant or not.

    Like the reviews author says, I find COM concepts very easy to grasp and quite interesting. Compared to CORBA, it is indeed very easy to use.

    As a hacker (someone who likes to know how it works), I find that very interesting. As someone who code for Mac and Palm, I find I can apply many concepts of COM to my code and make it object-portable.

    As far as .NET goes (while we're on the subject), I think it's ... mmm ... nice ... Too big, too bulky, I prefer J2EE to .NET 10 folds. I choke and puke every time I see some small nibblets of C#, that aberration of a language. But it's intersting to know how it works and how to code anyways.

    By the way, LMAO yes hell is all frozen I think. What the heck, M$ coding book ? EEEK!

    Mike

  9. April Fools? by Glock27 · · Score: 2, Insightful
    Upon finding the following statement, I realized I was either the victim of a hoax, or reading a review by a fairly unqualified reviewer. ;-)

    And I have always been fascinated by the distributed nature of DCOM, which seemed to me much more graspable than complex monsters like CORBA and J2EE.

    First of all, J2EE is not the relevant technology. Java RMI is. RMI is massively simpler than DCOM, which, contrary to this author's take, is a nasty mess of C-inspired foolishness. ;-)

    In fact, .Net is largely the latest kludge slapped on top of COM/DCOM to try and hide it's hideous complexity. The programming community should wake up and see the obvious fact that Java provides everything that .Net provides, but in a platform neutral and sane manner. It even works great on Windows. (And for those of you that would bring up Mono - we'll discuss that again the day that Microsoft sues for patent infringement under the DMCA.)

    Microsoft - Just Say No.

    --
    Galileo: "The Earth revolves around the Sun!"
    Score: -1 100% Flamebait
    1. Re:April Fools? by leerpm · · Score: 4, Insightful

      And upon reading your comment, I realized I was reading a statement by an unqualified critic.

      In fact, .Net is largely the latest kludge slapped on top of COM/DCOM to try and hide it's hideous complexity. The programming community should wake up and see the obvious fact that Java provides everything that .Net provides, but in a platform neutral and sane manner. It even works great on Windows. (And for those of you that would bring up Mono - we'll discuss that again the day that Microsoft sues for patent infringement under the DMCA.)

      No, .Net is not a kludge slapped on top of of COM. It is a platform created from the ground up to replace COM, among many other things. Many of the .Net APIs do call upon various services implemented in COM. But that is only because Micrsoft has not had the time to port that code to managed .Net code. I will agree that Java and .Net provide many similar services, they have more things in common than differences. However there are some things Java does better, and there are some things that .Net does better.

      And your statement about Mono? How on earth does the DMCA relate to patent law? It is called the Digital Millenium Copyright Act.

    2. Re:April Fools? by Glock27 · · Score: 2, Interesting
      [uninformed attack snipped]

      Read some of my other responses, I think I covered almost everything there. The one bit I need to respond to is your comment regarding Java:

      Almost as great as everything else that happens to be an afterthought port of some wacky technology from another OS.

      First off, .Net is clearly the sincerest form of flattery: a blatant ripoff of Java in almost every respect.

      Secondly, the Windows port of Java is arguably the most robust port of any, so calling it an "afterthought" simply labels you as ignorant.

      Finally, comparable Java code often outperforms C# on Windows...so any imaginary advantage you think .Net might have on it's "native platform" is exactly that. Imaginary.

      Very courageous posting as an AC, BTW. ;-)

      Have a nice day.

      --
      Galileo: "The Earth revolves around the Sun!"
      Score: -1 100% Flamebait
  10. Pearls of Wisdom from Morpheus by GillBates0 · · Score: 4, Funny
    Gianluca Insolvibile writes "I plead guilty: I have always admired Microsoft's COM architecture and the relative simplicity that allows you to reuse already installed components to create even complex programs. And I have always been fascinated by the distributed nature of DCOM.

    Before making any knee-jerk comments regarding the post, take a moment to ponder over these pearls of wisdom from none other than the great Morpheus, which are very relevant in this context. Take heed and realize that the poster is but part of the system. Forgive him.

    "Microsoft Windows is a system, Neo. That system is our enemy. But when you're inside, you look around and what do you see? Businessmen, Teachers, Lawyers, Carpenters...the very minds of the people we're trying to save. But until we do, these people are still a part of that system, and that makes them our enemy. You have to understand, most of these people are not ready to be unplugged from Windows. And many of them are so innerred, so hopelessly dependent on the system that they will that they will fight to protect it. Are you listening to me, Neo? Or were you laughing at the stupid MSN fairy again?"

    --
    An Indian-American Hindu committed to non-violent thought/speech/action alarmed by the global explosion of radical Islam
  11. Re:Why I love Microsoft by too_bad · · Score: 3, Funny

    > I haven't see a single computer that runs Linux or any other alternative
    > at any of my friends house.

    I havent seen a single black man at any of my friends house. So they simply do not
    exist.

    --
    DO NOT PANIC
  12. Standard for what? by Dr.+Bent · · Score: 4, Interesting

    Microsoft doesn't play nice in the industry, but they are, like it or not, the de facto standard out there.

    Microsoft may be the defacto standard for client side apps. But on the server side it holds no such title, and enterprise development is supposed to be what DCOM is all about. Things like J2EE and CORBA have way more of a hold on enterprise development than anything that Microsoft has ever put out. There's a big difference between a single-user desktop operating system and a multi-user scalable enterprise platform. From what I've seen, Microsoft has only been sucessful with the former.

  13. portability by u19925 · · Score: 2, Interesting

    it was more than 5 years ago, microsoft mentioned that they will port DCOM to unix. This killed of many CORBA projects on windows at many organizations. COM specs are binary specs. I am not sure about DCOM and ActiveX. But microsoft hasn't been able to port to unix even after 5 years. Either they lied or it is extremely difficult. CORBA is the only architecture which is alternative to DCOM. Not sure, how much of its complexity is due to portability.

  14. CORBA vs .NET by Anonymous Coward · · Score: 2, Informative

    Ok lets see we can choose something which works, is industry proven, IS a real standard set forth by a commitee (OMG) or we can have .NET a fake standard certified by ECMA (who got lots of $$$ for calling .NET a standard). .NET lacks a lot of cross platform availablity that CORBA has. Just about anything can use CORBA: C, PHP, PERL, C++, OBJC, JAVA, SMALLTALK, PASCAL, DELPHI, the list goes on. .NET has yet to prove itself, as well most java/.net interaction is done through CORBA.

    1. Re:CORBA vs .NET by mrlpz · · Score: 2, Informative

      Both of the previous replies respond to your point as well. But I don't see any language you've got listed up there who doesn't have some adapability to being able to utilize COM objects in one form or another ( When implemented on Windows, of course. ).

      I remember when CORBA was really "gathering steam" ( at least from the number of contracting projects out there calling for it ), and remember seeing some of my OOD/OOP bretheren head off to Corba-based projects. I can think of only two of them who ever said that their project achieved their goals. SPECIFICALLY, in one case, because of what one of the other respondents to your post state....SPOTTY implementations.

  15. COM and CORBA by u19925 · · Score: 2, Interesting

    If you were to program in C using COM and CORBA based purely on their specification, which one would be easy to program? COM spec is from MS and using their tools in C# and C++, you can simplify things, but that doesn't make COM or DCOM simpler.

  16. Technology is not the hard part by Dr.+Bent · · Score: 3, Insightful

    Understanding the ins and outs of J2EE is not the hard part of enterprise development. Understanding things like async messaging, transactions, and multithreaded logic are what makes enterprise development difficult. Switching to .NET because you don't 'get' J2EE will not magically make you understand these complex ideas.

    If this book does a better job of explaining those concepts using .NET examples, then fine. But it's not learning the particular technology that's the hard part...it's learning the theory that drives it.

  17. Sigh. Do we really need this? by heironymouscoward · · Score: 2, Insightful

    An irrelevant review about an irrelevant book about an irrelevant technology.

    Just how is this long informercial supposed to interest us? Go ahead, mod me down, flame me for my lack of understanding, but I have worked extensively with COM+ over the last years and I regret ever starting with the stuff.

    Am I the only one detecting a current of counter-revolution in Slashdot? Negative moderations of eminently reasonable comments by pro-MS and pro-RIAA voices we can't identify?

    A small voice says: stick to the point, people, or the point will stick it to you.

    --
    Ceci n'est pas une signature
  18. Defacto where??? by big-giant-head · · Score: 2, Insightful

    Maybe thats why corporate application I've worked on the last 4 years has deployed on Solaris or Linux using Java or C++ and Corba....

    It maybe the defacto standard for mail servers (exchange) but thats all I've seen it used for.

    It's defacto if you want to write video games.

    --

    So Long and Thanks for all the Fish.
  19. Re:Sigh. Do we really need this? by heironymouscoward · · Score: 3, Insightful

    I don't really understand your comment.

    Look: my company designs transactional web processing applications.

    In 1996 we built a portable transaction monitor that is used today in several very large web applications that run on Linux. The entire TP monitor is only several thousand lines of C, the applications are extremely simple, and it all works beautifully.

    In 1998 we were asked to make something very similar, but using MTS and COM+. The animal works, but it is incredibly complex, slow, unstable, and frankly impossible to control totally. When we approach the limits of the system in any sense, it collapses, and we cannot do anything to discover why.

    It's not about Windows vs. Linux, this is a stupid misdirection on your part. COM is not simple, it is a mass of layers which can be simplified with the appropriate packaging (as can any technology), but which remains complex, slow, and unreliable at the core.

    Now explain once again why I personally am part of the reason for what exactly? Or HIBT?

    --
    Ceci n'est pas une signature
  20. /.s been hacked. by 514x0r · · Score: 3, Funny

    first there's an article touting the benefits of COM+--i disagree, but it's your opinion--then, when i go to read it, there's a windows server 2003 ad at the top of the screen

    --

    !(^((ri)|(mp))aa$)
  21. The open source world is behind here by Animats · · Score: 2, Insightful
    One of the big problems in the Open Source world is that methods for program to program communication haven't really kept up.

    In the beginning, UNIX was ahead. It had multiple processes, pipes, and signals. This looked like reasonable interprogram communication back in the late 1970s, but it's too low-level; trying to do anything that way is painful.

    The problem is that what you want is a subroutine call, but what the OS usually gives you is an I/O operation. Some OSs do have good interprocess message passing as standard - QNX, Mach, L4/Hurd, and AmigaOS have it. The others need some kind of middleware to build message passing on top of I/O operations.

    In the Microsoft world, that middleware is always there, and you can assume its presence. In the Unix/Linux world, you can't. That's why few open source programs are built that way.

    Worse, the message-passing middleware for Unix and Linux carries excess baggage. CORBA for Linux is big, heavy, and available from at least five different sources in incompatible forms. The GNOME people finally had to implement their own CORBA, but it's still at the beta level. GNOME wants it mostly as an internal interface for GNOME components, so they're not too concerned with external compatibility.

    OpenOffice uses an incompatible system called UNO. There's an effort to build a CORBA-UNO translating gateway, but the systems have conceptual differences and don't play well together. And, of course, all this translation drives overhead up.

    Related to this problem is inadequate language support for inter-object communication. Newer languages like Java and C# have some built-in support for serialization, marshalling, and introspection, but C and C++ do not. So the operation that really has to be efficient - turning a local object into a string of bytes - tends to be slow.

    Because this is more of a standards problem than a technology problem, it's tough to fix in the open source environment.

    1. Re:The open source world is behind here by nixer · · Score: 2, Insightful
      This is right on the nail. One of the many reasons why desktop apps outside of Microsoft suck is the lack of common component architecture to allow them to interoperate. Even something as basic as getting consistent clipboard operation is extremely difficult.

      If you know your history, OLE (the previous name for COM) was critical in allows applications to plug together seamlessly.

      The interesting thing is that there still isn't a standard for this outside of Microsoft. CORBA just doesn't cut it for the inter-ORB compatibility reasons documented elsewhere.

      Microsoft will continue to rule the desktop - and because C# is a "ripped-off" (or perhaps evolved/better) Java the middle tier that J2EE currently owns may change. I currently develop Java/J2EE - and it sucks for all the same reasons CORBA sucks - i.e. compatibility across versions, difficult to use etc. etc. Microsoft have had transacted distributed objects sorted for some time - but they were horrible to use from C++ in DCOM. The implementation of .NET with MTS and C# is compelling - all those issues disappear, you get the nice M$ tools and the neat C# programming language.

      Sun - please don't blow it. Bring the J2EE vendors together and think about a better client side strategy that integrates the component object models.

  22. Re:Sigh. Do we really need this? by M.C.+Hampster · · Score: 2, Insightful

    Thank you for that clarification. I stupidly assumed that .NET was simply one more layer around the old COM code, thus actually adding more to the problem than it took away. Silly, silly me!

    I'm going to guess you were being sarcastic. For your information, .NET is not "simply one more layer" around the old COM code. It is internally, completely and totally different and unrelated to COM. It is a complete departure from it. Period. If you don't understand that, you don't know enough about COM or .NET to be speaking on the subject.

    --
    Forget the whales - save the babies.
  23. Re:Did I miss a memo or something? by IamTheRealMike · · Score: 2, Insightful
    Like the reviews author says, I find COM concepts very easy to grasp and quite interesting. Compared to CORBA, it is indeed very easy to use.

    Eeek! Maybe actually trying to understand Wines implementation of DCOM has fried my mind, but COM/DCOM cannot possibly ever be called conceptually easy. Oh sure, the IUnknown/ClassFactory stuff, while a pain in the ass, is easy enough to understand.

    Now start trying to implement late binding on your object so it's usable from JavaScript. You do that by implementing IDispatch right? Wrong. IDispatch is such a horribly complex interface that MSDN recommends you don't try and implement it, because you'll get it wrong - and they're right, you will. Instead, you should use the provided typelib invokers. Now you have to describe your object using a typelib. There are two different typelib file formats, and they can be standalone or embedded in DLLs.

    Of course, IDispatch binds on an interface, but you have to be careful - due to obscure implementation details, you can't have more than one of them. Therefore, you have to choose a primary interface to be your dispinterface.

    Careful! You initialized OLE Automation (a part of DCOM) but forgot to process the message loop, didn't you? Now everything is locking up, right? You just have to know that inter-thread RPC in DCOM takes place via window messages, so bash that loop boy. Just be aware that the DCOM runtime runs its own message loop for re-entrancy reasons, so you could find your WndProc running while another part of the code is supposedly blocking on a remote interface call.

    Confused yet?

  24. Microsoft IP? by Max+Threshold · · Score: 2, Insightful

    If you're an Open Source developer who's the least bit suspicious that Microsoft has anything to do with the latest IP attacks against Linux, I can't imagine why you would touch .NET with a ten foot pole. You're just begging to have all your hard work stolen in court.

  25. Back in the day. . . by kfg · · Score: 2, Insightful

    I came to computers as a physicist. They filled rooms and were tended to by swarms of real scientists and engineers, not "technicians".

    They were built by scientists and engineers for scientists and engineers.

    The languages developed to program them, and the logical grammer developed within these languages, were those in common use by scientists and engineers, which is to say mathmatical syntax, grammer and logic. That's why they're called computers and not emailers or blogers.

    This lead to the rise of "functional" programing through the natural course of things as computers became advanced enough to ignore the physical architecture when programing them. The Function is the natural "object" of the mathmatical language. You can do anything on a computer with the purely functional approach and, what may be hard for the modern trained mind to grasp, the mathmatically trained mind can often do so faster and easier this way than with any of the more recent "developments" in programing.

    This is not to say that other ways of looking at things doesn't have its, ummm, functionality. The Object Oriented approach was developed by engineers ( who didn't have very mathmatical minds and didn't particularly understand computers or programing) to conceptualize and solve certain engineering problems dealing with real objects. Beams, pistons and the like. It made a lot of sense to model these objects as objects. What may not be obvious the Object Oriented programer is that these objects are still mathmatical models, in fact just a class (sorry) of function whose variables are handled in a predefined sort of way making the function into a kind of virtual Mechano set.

    The way these varibles are handled from and programer point of view ( once the object itself is written) constitutes a user interface to the object.

    What Microsoft is doing at the logical and matmatical scale isn't really any different, they're just using a slightly different terminolgy and logic to accomplish largely the same end, but one they are able to "brand" and control, not to mention leverage for their own dominence.

    The main difference is that their interface is more ridigly controled by them, being sold by an "ease of use" argument of many small componants which are really just objects with a restricted interface, replacing understanding of what you are doing mathmatically and logically with a kind of tinkertoy set of objects. Just plug 'em together and watch 'em work.

    I don't wish to ruffle any feathers, but I'm not particularly afraid of doing so.

    This is an approach that may be valid for the modern crop of "programer", but if you wish to honestly be considered a computer engineer, let alone a computer "scientist", it is a largely unworkable solution, just as a person adept at using tinkertoys and mechano sets isn't qualfied to be called an engineer.

    This isn't to belittle tinkertoys and mechano sets either. They have their valid place and uses.

    Personally I've been "Object Oriented" programing since before there was any such thing. It's an obvious format for modeling real objects in a compact, understandable, easily modified and reusable way, although I didn't call my "beam object" a beam object. I called it my beam function, because that's what it is, even though it may well contain subfuntions while at the same time being a subfunction of the "building function."

    I've always tended to think of my programing models in terms of ICs. Note that there are two basic kinds of ICs. Those that are hard wired to perform a single task, such as the venerable 555 chip, and those that are designed with a changable internal logic (you're using at least one of these right now to read this post) such as the Z80.

    Both of these kinds of ICs have their valid uses. The programable chip hasn't replaced the hard wired chip, it has augmented the toolset available. Both kinds of mathmatical logic these chips represent are valuable to the programer in t

  26. Re:Struts equiv in .Net? by mrlpz · · Score: 2, Insightful

    There is...in this months ( Sept 2003 ) .Net magazine, there's an article about what they call "Rich Clients" ( though they throw in Macromedia Flash ). Which essentially are ASP.NET driven pages which can be manipulated by back-end assemblies. The example shown at: http://www-106.ibm.com/developerworks/java/library /j-struts/ ( almost half-way down the page ) is a model which can be implemented by server-side ASP and C#/VB components. You'd be using the MTS/MSMQ "parts" of .NET.

  27. Re:Godwins Law hereby INVOKED! by murdocj · · Score: 3, Insightful

    You know, every once in a while someone makes a really stupid comparison between the people who were responsible for the murder of millions of human beings, and something incredibly trivial like using the "wrong" type of software. And it really pisses me off.

    Yes, I have a sense of humor. No, this isn't funny.

  28. Re:Struts equiv in .Net? by CausticPuppy · · Score: 2, Insightful

    Struts is a framework for development in the model-view-controller paradigm.

    Then again, ASP.NET is supposed to be more MVC-centric as well.
    From a high-level perspective, struts by itself focuses primarily on the "controller" part. I believe jakarta-tiles is now integrated with the latest version, and tiles focuses on the view part.

    You could actually build a framework in .net that closely resembles struts. But asp.net itself solves (or rather, makes it easier for the developer to solve) many of the same problems that struts solves, just in a different way.

    --
    -CausticPuppy "Of all the people I know, you're certainly one of them." -Somebody I don't know
  29. DCOM easy? by iPaul · · Score: 2, Insightful
    After doing a sizeable amount of CORBA work (including writing a trader service) in graduate school I did about a year and a half of COM/DCOM programming in VC++ (5.0 and 6.0). I also did an amount of Java RMI and Java CORBA programming after the Microsoft stuff. In no sense of the word "easy" was DCOM easier than even C++ CORBA. And in no way was it easier than Java RMI or Java CORBA!

    In fact COM/DCOM always seemed to be the poor man's version of CORBA (COM can be seen as equivalent to in-process activations of CORBA servers). Writing CORBA services using emacs on an out-dated Sun box in the graduate computer lab seemed a great deal easier than the gymnastics we had to go through with DCOM. (Including setting up our own development PDC, much to the chagrin of the network admins).

    --
    Leave the gun, take the cannoli -- Clemenza, The Godfather
  30. Re:Sigh. Do we really need this? by plierhead · · Score: 2, Interesting
    In 1996 we built a portable transaction monitor that is used today in several very large web applications that run on Linux. The entire TP monitor is only several thousand lines of C, the applications are extremely simple, and it all works beautifully.

    In 1998 we were asked to make something very similar, but using MTS and COM+. The animal works, but it is incredibly complex, slow, unstable, and frankly impossible to control totally. When we approach the limits of the system in any sense, it collapses, and we cannot do anything to discover why.

    I know jack shit about .NET and would never consider using it, but I have seen exactly the same experience with J2EE. Relatively simple applications, which solely produce web pages from the data in a single underlying RDBMS, and could be easily (and appropriately) built just using servlets, are turned into stinking, creaking and groaning and sluggish monsters by introducing EJB servers in the middle.

    Anything that introduces more threads and more machines is going to have a wicked effect on your performance and productivity. Its not unique to .NET.

    That said, if there has to be a big crusty layer in the middle, I'd rather it was built by someone else than the Borg - in the scale of their commercial interests, your application's scalability and reliability come very low indeed.

    --

    [x] auto-moderate all posts by this user as insightful