.Net versus COM+ components

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Robert

    #1

    .Net versus COM+ components

    What is the general difference between .Net and COM+ components? When is one
    better than the other? Where can I find information about the similarities
    and differences? I have browsed msdn but so far I have not found much useful
    information.
  • Angelos Karantzalis

    #2
    Re: .Net versus COM+ components

    ..NET classes are regular objects. They live in the same process with their
    caller, and that's that.

    COM+ Components offer some more advanced functionality, for instance:

    1) Transactions. Imagine a process that needs to get some data through say 5
    objects for processing. If one of them fails, you don't want to "save" the
    changes the ones before it have made, and you don't want to process the data
    any further. COM+ will allow you to do that ( in simple terms )

    2) Clustering/Load Balancing: In cases of high loads, the container can pool
    instances of your object, even in different machines, and re-use them. That
    saves you a lot of instantiation overhead.

    3) Synchronization : You can define how your object is accessed from
    different caller threads.

    COM+ will give you all that, with an added overhead in coding & complexity.
    It takes a while to get acquainted with all it's little idiosyncracies &
    tricks. In addition, you can create COM+ components using .NET relatively
    easily.

    In any case that you absolutely need all the above, COM+ will do the trick
    for you. If you want to develop something simple that will not have to
    process thousands of requests in 3 milliseconds ( I wish !), go for
    plain-old-.NET-objects.

    Angel
    O:]

    "Robert" <Robert@discuss ions.microsoft. com> wrote in message
    news:BFBE4D69-FE91-4F4E-8417-8341336B5A21@mi crosoft.com...[color=blue]
    > What is the general difference between .Net and COM+ components? When is[/color]
    one[color=blue]
    > better than the other? Where can I find information about the similarities
    > and differences? I have browsed msdn but so far I have not found much[/color]
    useful[color=blue]
    > information.[/color]


    Comment

    • Sujith S. Varier

      #3
      Re: .Net versus COM+ components

      Hi Angelos,

      I read your reply on COM+ .NET comparison. One of the points actually
      conflicts with my idea on this..
      like..
      - you ahve written that .net classes are instantiated in the same
      process as that of the caller.
      But actually we can have both in process and out of process componets as
      we have in COM (some keywords client activated, singleton,singl ecall etc),
      but here the things are lil bit differnet becasue there is some thing like
      application domain ...which is not actually equivalent to a process. ANyway
      the objects need not always be in the same process as that of the
      caller.(Details i think we can get from MSDN)

      Angelos, if i am wrong, correct me.

      regards
      Sujith S.Varier

      "Angelos Karantzalis" <akarantzalis@a giltech.gr> wrote in message
      news:O5Ep#ACvEH A.2196@TK2MSFTN GP14.phx.gbl...[color=blue]
      > .NET classes are regular objects. They live in the same process with their
      > caller, and that's that.
      >
      > COM+ Components offer some more advanced functionality, for instance:
      >
      > 1) Transactions. Imagine a process that needs to get some data through say[/color]
      5[color=blue]
      > objects for processing. If one of them fails, you don't want to "save" the
      > changes the ones before it have made, and you don't want to process the[/color]
      data[color=blue]
      > any further. COM+ will allow you to do that ( in simple terms )
      >
      > 2) Clustering/Load Balancing: In cases of high loads, the container can[/color]
      pool[color=blue]
      > instances of your object, even in different machines, and re-use them.[/color]
      That[color=blue]
      > saves you a lot of instantiation overhead.
      >
      > 3) Synchronization : You can define how your object is accessed from
      > different caller threads.
      >
      > COM+ will give you all that, with an added overhead in coding &[/color]
      complexity.[color=blue]
      > It takes a while to get acquainted with all it's little idiosyncracies &
      > tricks. In addition, you can create COM+ components using .NET relatively
      > easily.
      >
      > In any case that you absolutely need all the above, COM+ will do the trick
      > for you. If you want to develop something simple that will not have to
      > process thousands of requests in 3 milliseconds ( I wish !), go for
      > plain-old-.NET-objects.
      >
      > Angel
      > O:]
      >
      > "Robert" <Robert@discuss ions.microsoft. com> wrote in message
      > news:BFBE4D69-FE91-4F4E-8417-8341336B5A21@mi crosoft.com...[color=green]
      > > What is the general difference between .Net and COM+ components? When is[/color]
      > one[color=green]
      > > better than the other? Where can I find information about the[/color][/color]
      similarities[color=blue][color=green]
      > > and differences? I have browsed msdn but so far I have not found much[/color]
      > useful[color=green]
      > > information.[/color]
      >
      >[/color]


      Comment

      • Angelos Karantzalis

        #4
        Re: .Net versus COM+ components

        You mean that if i create a class MyClass, put it in a class library
        (assembly DLL) and have the assembly referenced from another project, where
        the code is like:

        MyClass obj = new MyClass();

        ... I can specify in advance what process this class instance will run in ?

        That sounds a bit weird to me. This is functionality provided by COM & COM+,
        no ? Perhaps you mean .NET COM+ components ? Your suggestion is something
        new to me :?

        Angel
        O:]


        "Sujith S. Varier" <sujithsv@gmail .com> wrote in message
        news:ukcbCbDvEH A.1260@TK2MSFTN GP12.phx.gbl...[color=blue]
        > Hi Angelos,
        >
        > I read your reply on COM+ .NET comparison. One of the points actually
        > conflicts with my idea on this..
        > like..
        > - you ahve written that .net classes are instantiated in the same
        > process as that of the caller.
        > But actually we can have both in process and out of process componets[/color]
        as[color=blue]
        > we have in COM (some keywords client activated, singleton,singl ecall etc),
        > but here the things are lil bit differnet becasue there is some thing like
        > application domain ...which is not actually equivalent to a process.[/color]
        ANyway[color=blue]
        > the objects need not always be in the same process as that of the
        > caller.(Details i think we can get from MSDN)
        >
        > Angelos, if i am wrong, correct me.
        >
        > regards
        > Sujith S.Varier
        >
        > "Angelos Karantzalis" <akarantzalis@a giltech.gr> wrote in message
        > news:O5Ep#ACvEH A.2196@TK2MSFTN GP14.phx.gbl...[color=green]
        > > .NET classes are regular objects. They live in the same process with[/color][/color]
        their[color=blue][color=green]
        > > caller, and that's that.
        > >
        > > COM+ Components offer some more advanced functionality, for instance:
        > >
        > > 1) Transactions. Imagine a process that needs to get some data through[/color][/color]
        say[color=blue]
        > 5[color=green]
        > > objects for processing. If one of them fails, you don't want to "save"[/color][/color]
        the[color=blue][color=green]
        > > changes the ones before it have made, and you don't want to process the[/color]
        > data[color=green]
        > > any further. COM+ will allow you to do that ( in simple terms )
        > >
        > > 2) Clustering/Load Balancing: In cases of high loads, the container can[/color]
        > pool[color=green]
        > > instances of your object, even in different machines, and re-use them.[/color]
        > That[color=green]
        > > saves you a lot of instantiation overhead.
        > >
        > > 3) Synchronization : You can define how your object is accessed from
        > > different caller threads.
        > >
        > > COM+ will give you all that, with an added overhead in coding &[/color]
        > complexity.[color=green]
        > > It takes a while to get acquainted with all it's little idiosyncracies &
        > > tricks. In addition, you can create COM+ components using .NET[/color][/color]
        relatively[color=blue][color=green]
        > > easily.
        > >
        > > In any case that you absolutely need all the above, COM+ will do the[/color][/color]
        trick[color=blue][color=green]
        > > for you. If you want to develop something simple that will not have to
        > > process thousands of requests in 3 milliseconds ( I wish !), go for
        > > plain-old-.NET-objects.
        > >
        > > Angel
        > > O:]
        > >
        > > "Robert" <Robert@discuss ions.microsoft. com> wrote in message
        > > news:BFBE4D69-FE91-4F4E-8417-8341336B5A21@mi crosoft.com...[color=darkred]
        > > > What is the general difference between .Net and COM+ components? When[/color][/color][/color]
        is[color=blue][color=green]
        > > one[color=darkred]
        > > > better than the other? Where can I find information about the[/color][/color]
        > similarities[color=green][color=darkred]
        > > > and differences? I have browsed msdn but so far I have not found much[/color]
        > > useful[color=darkred]
        > > > information.[/color]
        > >
        > >[/color]
        >
        >[/color]


        Comment

        • Sujith S. Varier

          #5
          Re: .Net versus COM+ components

          I mean we have the provision to get a reference to an instance of a class
          which is being instantiated in another process.
          i ahve a class, I want to invoke a method in a class in another assembly,
          let it be in a diffeerent machine, i want to get it executed there and only
          the return value is of my interest, then, the only way here would be to
          instantiate the class in a process running there. We should get a reference
          to the instance, actually a proxy would be present at the client..I think u
          got the point, i am talking abt Remoting. Exaclty the way DCOM was being
          used.

          regards
          Sujith S. Varier

          "Angelos Karantzalis" <akarantzalis@a giltech.gr> wrote in message
          news:#v3gHnDvEH A.1400@TK2MSFTN GP11.phx.gbl...[color=blue]
          > You mean that if i create a class MyClass, put it in a class library
          > (assembly DLL) and have the assembly referenced from another project,[/color]
          where[color=blue]
          > the code is like:
          >
          > MyClass obj = new MyClass();
          >
          > .. I can specify in advance what process this class instance will run in ?
          >
          > That sounds a bit weird to me. This is functionality provided by COM &[/color]
          COM+,[color=blue]
          > no ? Perhaps you mean .NET COM+ components ? Your suggestion is something
          > new to me :?
          >
          > Angel
          > O:]
          >
          >
          > "Sujith S. Varier" <sujithsv@gmail .com> wrote in message
          > news:ukcbCbDvEH A.1260@TK2MSFTN GP12.phx.gbl...[color=green]
          > > Hi Angelos,
          > >
          > > I read your reply on COM+ .NET comparison. One of the points[/color][/color]
          actually[color=blue][color=green]
          > > conflicts with my idea on this..
          > > like..
          > > - you ahve written that .net classes are instantiated in the same
          > > process as that of the caller.
          > > But actually we can have both in process and out of process[/color][/color]
          componets[color=blue]
          > as[color=green]
          > > we have in COM (some keywords client activated, singleton,singl ecall[/color][/color]
          etc),[color=blue][color=green]
          > > but here the things are lil bit differnet becasue there is some thing[/color][/color]
          like[color=blue][color=green]
          > > application domain ...which is not actually equivalent to a process.[/color]
          > ANyway[color=green]
          > > the objects need not always be in the same process as that of the
          > > caller.(Details i think we can get from MSDN)
          > >
          > > Angelos, if i am wrong, correct me.
          > >
          > > regards
          > > Sujith S.Varier
          > >
          > > "Angelos Karantzalis" <akarantzalis@a giltech.gr> wrote in message
          > > news:O5Ep#ACvEH A.2196@TK2MSFTN GP14.phx.gbl...[color=darkred]
          > > > .NET classes are regular objects. They live in the same process with[/color][/color]
          > their[color=green][color=darkred]
          > > > caller, and that's that.
          > > >
          > > > COM+ Components offer some more advanced functionality, for instance:
          > > >
          > > > 1) Transactions. Imagine a process that needs to get some data through[/color][/color]
          > say[color=green]
          > > 5[color=darkred]
          > > > objects for processing. If one of them fails, you don't want to "save"[/color][/color]
          > the[color=green][color=darkred]
          > > > changes the ones before it have made, and you don't want to process[/color][/color][/color]
          the[color=blue][color=green]
          > > data[color=darkred]
          > > > any further. COM+ will allow you to do that ( in simple terms )
          > > >
          > > > 2) Clustering/Load Balancing: In cases of high loads, the container[/color][/color][/color]
          can[color=blue][color=green]
          > > pool[color=darkred]
          > > > instances of your object, even in different machines, and re-use them.[/color]
          > > That[color=darkred]
          > > > saves you a lot of instantiation overhead.
          > > >
          > > > 3) Synchronization : You can define how your object is accessed from
          > > > different caller threads.
          > > >
          > > > COM+ will give you all that, with an added overhead in coding &[/color]
          > > complexity.[color=darkred]
          > > > It takes a while to get acquainted with all it's little idiosyncracies[/color][/color][/color]
          &[color=blue][color=green][color=darkred]
          > > > tricks. In addition, you can create COM+ components using .NET[/color][/color]
          > relatively[color=green][color=darkred]
          > > > easily.
          > > >
          > > > In any case that you absolutely need all the above, COM+ will do the[/color][/color]
          > trick[color=green][color=darkred]
          > > > for you. If you want to develop something simple that will not have to
          > > > process thousands of requests in 3 milliseconds ( I wish !), go for
          > > > plain-old-.NET-objects.
          > > >
          > > > Angel
          > > > O:]
          > > >
          > > > "Robert" <Robert@discuss ions.microsoft. com> wrote in message
          > > > news:BFBE4D69-FE91-4F4E-8417-8341336B5A21@mi crosoft.com...
          > > > > What is the general difference between .Net and COM+ components?[/color][/color][/color]
          When[color=blue]
          > is[color=green][color=darkred]
          > > > one
          > > > > better than the other? Where can I find information about the[/color]
          > > similarities[color=darkred]
          > > > > and differences? I have browsed msdn but so far I have not found[/color][/color][/color]
          much[color=blue][color=green][color=darkred]
          > > > useful
          > > > > information.
          > > >
          > > >[/color]
          > >
          > >[/color]
          >
          >[/color]


          Comment

          • Nishith Pathak

            #6
            RE: .Net versus COM+ components

            It is common misconception that .NET and COM+ are contrary to each other
            infact .NET and COM+ are two different things. As .NET components runs on CLR
            and gets thr runtime featurs of CLR but COM+ is just an enhancement of
            MTS,DCOM and MSMQ with some new feature. Just it gives you neccessary
            infrastructure to the component so the developer can concentrate on the
            application logic rather than infrastructure. This infrastructure including
            automatic transaction, object pooling, Just-in-time activation etc This
            infrastructure can be used by COM or .NET dlls. In .NET , if you want to use
            it , you have to inherit your class from
            System.Enterpri seService.Servi cedComponent class and register your assembly
            through Regasm tool.

            "Robert" wrote:
            [color=blue]
            > What is the general difference between .Net and COM+ components? When is one
            > better than the other? Where can I find information about the similarities
            > and differences? I have browsed msdn but so far I have not found much useful
            > information.[/color]

            Comment

            • Angelos Karantzalis

              #7
              Re: .Net versus COM+ components

              ooohhhh .. I see. Well, Remoting is another ballgame altogether ( I kinda
              like it though, since I started out as a Java/CORBA & Java/RMI boy in my
              Distributed computing adventures, but I certainly wouldn't use it unless I
              definitely had to ... )

              Angel
              O:]


              "Sujith S. Varier" <sujithsv@gmail .com> wrote in message
              news:#UmFvIKvEH A.2200@TK2MSFTN GP11.phx.gbl...[color=blue]
              > I mean we have the provision to get a reference to an instance of a class
              > which is being instantiated in another process.
              > i ahve a class, I want to invoke a method in a class in another assembly,
              > let it be in a diffeerent machine, i want to get it executed there and[/color]
              only[color=blue]
              > the return value is of my interest, then, the only way here would be to
              > instantiate the class in a process running there. We should get a[/color]
              reference[color=blue]
              > to the instance, actually a proxy would be present at the client..I think[/color]
              u[color=blue]
              > got the point, i am talking abt Remoting. Exaclty the way DCOM was being
              > used.
              >
              > regards
              > Sujith S. Varier
              >
              > "Angelos Karantzalis" <akarantzalis@a giltech.gr> wrote in message
              > news:#v3gHnDvEH A.1400@TK2MSFTN GP11.phx.gbl...[color=green]
              > > You mean that if i create a class MyClass, put it in a class library
              > > (assembly DLL) and have the assembly referenced from another project,[/color]
              > where[color=green]
              > > the code is like:
              > >
              > > MyClass obj = new MyClass();
              > >
              > > .. I can specify in advance what process this class instance will run in[/color][/color]
              ?[color=blue][color=green]
              > >
              > > That sounds a bit weird to me. This is functionality provided by COM &[/color]
              > COM+,[color=green]
              > > no ? Perhaps you mean .NET COM+ components ? Your suggestion is[/color][/color]
              something[color=blue][color=green]
              > > new to me :?
              > >
              > > Angel
              > > O:]
              > >
              > >
              > > "Sujith S. Varier" <sujithsv@gmail .com> wrote in message
              > > news:ukcbCbDvEH A.1260@TK2MSFTN GP12.phx.gbl...[color=darkred]
              > > > Hi Angelos,
              > > >
              > > > I read your reply on COM+ .NET comparison. One of the points[/color][/color]
              > actually[color=green][color=darkred]
              > > > conflicts with my idea on this..
              > > > like..
              > > > - you ahve written that .net classes are instantiated in the same
              > > > process as that of the caller.
              > > > But actually we can have both in process and out of process[/color][/color]
              > componets[color=green]
              > > as[color=darkred]
              > > > we have in COM (some keywords client activated, singleton,singl ecall[/color][/color]
              > etc),[color=green][color=darkred]
              > > > but here the things are lil bit differnet becasue there is some thing[/color][/color]
              > like[color=green][color=darkred]
              > > > application domain ...which is not actually equivalent to a process.[/color]
              > > ANyway[color=darkred]
              > > > the objects need not always be in the same process as that of the
              > > > caller.(Details i think we can get from MSDN)
              > > >
              > > > Angelos, if i am wrong, correct me.
              > > >
              > > > regards
              > > > Sujith S.Varier
              > > >
              > > > "Angelos Karantzalis" <akarantzalis@a giltech.gr> wrote in message
              > > > news:O5Ep#ACvEH A.2196@TK2MSFTN GP14.phx.gbl...
              > > > > .NET classes are regular objects. They live in the same process with[/color]
              > > their[color=darkred]
              > > > > caller, and that's that.
              > > > >
              > > > > COM+ Components offer some more advanced functionality, for[/color][/color][/color]
              instance:[color=blue][color=green][color=darkred]
              > > > >
              > > > > 1) Transactions. Imagine a process that needs to get some data[/color][/color][/color]
              through[color=blue][color=green]
              > > say[color=darkred]
              > > > 5
              > > > > objects for processing. If one of them fails, you don't want to[/color][/color][/color]
              "save"[color=blue][color=green]
              > > the[color=darkred]
              > > > > changes the ones before it have made, and you don't want to process[/color][/color]
              > the[color=green][color=darkred]
              > > > data
              > > > > any further. COM+ will allow you to do that ( in simple terms )
              > > > >
              > > > > 2) Clustering/Load Balancing: In cases of high loads, the container[/color][/color]
              > can[color=green][color=darkred]
              > > > pool
              > > > > instances of your object, even in different machines, and re-use[/color][/color][/color]
              them.[color=blue][color=green][color=darkred]
              > > > That
              > > > > saves you a lot of instantiation overhead.
              > > > >
              > > > > 3) Synchronization : You can define how your object is accessed from
              > > > > different caller threads.
              > > > >
              > > > > COM+ will give you all that, with an added overhead in coding &
              > > > complexity.
              > > > > It takes a while to get acquainted with all it's little[/color][/color][/color]
              idiosyncracies[color=blue]
              > &[color=green][color=darkred]
              > > > > tricks. In addition, you can create COM+ components using .NET[/color]
              > > relatively[color=darkred]
              > > > > easily.
              > > > >
              > > > > In any case that you absolutely need all the above, COM+ will do the[/color]
              > > trick[color=darkred]
              > > > > for you. If you want to develop something simple that will not have[/color][/color][/color]
              to[color=blue][color=green][color=darkred]
              > > > > process thousands of requests in 3 milliseconds ( I wish !), go for
              > > > > plain-old-.NET-objects.
              > > > >
              > > > > Angel
              > > > > O:]
              > > > >
              > > > > "Robert" <Robert@discuss ions.microsoft. com> wrote in message
              > > > > news:BFBE4D69-FE91-4F4E-8417-8341336B5A21@mi crosoft.com...
              > > > > > What is the general difference between .Net and COM+ components?[/color][/color]
              > When[color=green]
              > > is[color=darkred]
              > > > > one
              > > > > > better than the other? Where can I find information about the
              > > > similarities
              > > > > > and differences? I have browsed msdn but so far I have not found[/color][/color]
              > much[color=green][color=darkred]
              > > > > useful
              > > > > > information.
              > > > >
              > > > >
              > > >
              > > >[/color]
              > >
              > >[/color]
              >
              >[/color]


              Comment

              Working...