What has managed code achieved?

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

    What has managed code achieved?

    Hi

    What are the advantages actually achieved of managed code? I am not talking
    of theory but in reality.

    Thanks

    Regards


  • Mr. Arnold

    #2
    Re: What has managed code achieved?


    "John" <info@nospam.in fovis.co.ukwrot e in message
    news:%23A%23Bye kMJHA.3496@TK2M SFTNGP04.phx.gb l...
    Hi
    >
    What are the advantages actually achieved of managed code? I am not
    talking of theory but in reality.
    >

    <http://it.toolbox.com/blogs/paytonbyrd/day-1-introduction-to-managed-code-and-the-net-infrastructure-6588>



    Comment

    • kimiraikkonen

      #3
      Re: What has managed code achieved?

      On Oct 20, 3:06 am, "John" <i...@nospam.in fovis.co.ukwrot e:
      Hi
      >
      What are the advantages actually achieved of managed code? I am not talking
      of theory but in reality.
      >
      Thanks
      >
      Regards
      Check these out:

      Discover how Progress DataDirect cloud and on-premises data connectivity solutions support Relational, NoSQL, Big Data and SaaS data sources. Get started today!



      As your managed code runs under supervision of CLR, it's well-
      maintained for .NET framework and the concepts what .NET includes such
      as performance, compatibilty and security.

      HTH,

      Onur Güzel


      Comment

      • Scott M.

        #4
        Re: What has managed code achieved?

        If you think about VB 6.0, which was not managed, developers had to write
        lots of extra code that didn't necessarially have anything to do with the
        programming problem. Developers had to write extra code to ensure memory
        was managed correctly (set x = Nothing) and if they didn't, the program
        would develop memory leaks. Developers also had to write addional code to
        handle certain security and performance issues as well.

        In the managed environment of the .NET CLR, much of this work is
        automatically managed by the CLR through its code access security, garbage
        collection, & MSIL.

        The real, tangible advantages are that less code is written and that the
        resulting programs are more robust and cross-language compatible.

        -Scott

        "John" <info@nospam.in fovis.co.ukwrot e in message
        news:%23A%23Bye kMJHA.3496@TK2M SFTNGP04.phx.gb l...
        Hi
        >
        What are the advantages actually achieved of managed code? I am not
        talking of theory but in reality.
        >
        Thanks
        >
        Regards
        >
        >

        Comment

        • Cor Ligthert[MVP]

          #5
          Re: What has managed code achieved?

          John,

          What do you think?

          Cor

          "John" <info@nospam.in fovis.co.ukwrot e in message
          news:%23A%23Bye kMJHA.3496@TK2M SFTNGP04.phx.gb l...
          Hi
          >
          What are the advantages actually achieved of managed code? I am not
          talking of theory but in reality.
          >
          Thanks
          >
          Regards
          >
          >

          Comment

          • Juan T. Llibre

            #6
            Re: What has managed code achieved?

            re:
            !What are the advantages actually achieved of managed code?

            Imho, the greatest achievement for managed code is: it gets rid of "dll hell".

            There's also automatic memory management, platform-neutrality, and cross-language integration.

            Performance benefits are gained from executing all code in the CLR.
            Calling unmanaged code decreases performance because additional security checks are required.

            Other performance advantages are available through the use of the Just-In-Time compiler,
            with gains in built-in security by using code access security and the avoidance of buffer overruns.




            Juan T. Llibre, asp.net MVP
            asp.net faq : http://asp.net.do/faq/
            foros de asp.net, en español : http://asp.net.do/foros/
            =============== =============== ========
            "John" <info@nospam.in fovis.co.ukwrot e in message news:%23A%23Bye kMJHA.3496@TK2M SFTNGP04.phx.gb l...
            Hi
            >
            What are the advantages actually achieved of managed code? I am not talking of theory but in reality.
            >
            Thanks
            >
            Regards
            >
            >

            Comment

            • William Vaughn \(MVP\)

              #7
              Re: What has managed code achieved?

              But have we traded one kind of DLL hell for another? How many versions of
              the Framework are loaded on your system? How is COM-based DLL management any
              different than GAC-cached modules that can be replaced without retesting the
              consumer applications? Since we now must wait while the code is compiled
              before it can be executed, the performance argument might not hold water for
              some applications. Notice how long it takes to launch the Report Manager...
              I expect that managed code has managed to disenfranchise a lot of perfectly
              good COM developers...

              --
              _______________ _______________ _______________ _______________ ______________
              William R. Vaughn
              President and Founder Beta V Corporation
              Author, Mentor, Dad, Grandpa
              Microsoft MVP
              (425) 556-9205 (Pacific time)
              Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
              _______________ _______________ _______________ _______________ _______________ _______________ __



              "Juan T. Llibre" <nomailreplies@ nowhere.comwrot e in message
              news:OJP$fstMJH A.5692@TK2MSFTN GP04.phx.gbl...
              re:
              !What are the advantages actually achieved of managed code?
              >
              Imho, the greatest achievement for managed code is: it gets rid of "dll
              hell".
              >
              There's also automatic memory management, platform-neutrality, and
              cross-language integration.
              >
              Performance benefits are gained from executing all code in the CLR.
              Calling unmanaged code decreases performance because additional security
              checks are required.
              >
              Other performance advantages are available through the use of the
              Just-In-Time compiler,
              with gains in built-in security by using code access security and the
              avoidance of buffer overruns.
              >
              >
              >
              >
              Juan T. Llibre, asp.net MVP
              asp.net faq : http://asp.net.do/faq/
              foros de asp.net, en español : http://asp.net.do/foros/
              =============== =============== ========
              "John" <info@nospam.in fovis.co.ukwrot e in message
              news:%23A%23Bye kMJHA.3496@TK2M SFTNGP04.phx.gb l...
              >Hi
              >>
              >What are the advantages actually achieved of managed code? I am not
              >talking of theory but in reality.
              >>
              >Thanks
              >>
              >Regards
              >>
              >>
              >
              >

              Comment

              • Gregory A. Beamer \(Cowboy\) - MVP

                #8
                Re: What has managed code achieved?


                "Juan T. Llibre" <nomailreplies@ nowhere.comwrot e in message
                news:OJP$fstMJH A.5692@TK2MSFTN GP04.phx.gbl...
                re:
                !What are the advantages actually achieved of managed code?
                >
                Imho, the greatest achievement for managed code is: it gets rid of "dll
                hell".

                I think this depends on whether or not your regard the problems with the GAC
                as another type of DLL hell,as it sounds like both I and Bill do. ;-)

                For most, however, this is a definite advantage, as most do not use the GAC
                much and those who do know how to version (maybe?).

                --
                Gregory A. Beamer
                MVP, MCP: +I, SE, SD, DBA

                Subscribe to my blog


                or just read it:


                *************** *************** **************
                | Think outside the box! |
                *************** *************** **************


                Comment

                • Gregory A. Beamer \(Cowboy\) - MVP

                  #9
                  Re: What has managed code achieved?

                  Less Blue Screens by junior developers. ;-)

                  Realistically, from my COM days, the biggest real world advantage is not
                  having to register everything and the pain associated with registering
                  development builds to properly test.

                  Of course, if you use MTS, you had the option of dropping the running
                  process and droppping a new COM DLL over the old DLL. But this was thinking
                  WAY outside the box. You also ended up having to add the weight of MTS to
                  your app. Not too bad with web apps, which already had most of the weight.
                  Not as exciting for other apps.

                  With .NET, however, you can do this without a kludge. So that is a real
                  world advantage.

                  --
                  Gregory A. Beamer
                  MVP, MCP: +I, SE, SD, DBA

                  Subscribe to my blog


                  or just read it:


                  *************** *************** **************
                  | Think outside the box! |
                  *************** *************** **************
                  "John" <info@nospam.in fovis.co.ukwrot e in message
                  news:%23A%23Bye kMJHA.3496@TK2M SFTNGP04.phx.gb l...
                  Hi
                  >
                  What are the advantages actually achieved of managed code? I am not
                  talking of theory but in reality.
                  >
                  Thanks
                  >
                  Regards
                  >
                  >

                  Comment

                  • Ben Voigt [C++ MVP]

                    #10
                    Re: What has managed code achieved?

                    Juan T. Llibre wrote:
                    re:
                    !What are the advantages actually achieved of managed code?
                    >
                    Imho, the greatest achievement for managed code is: it gets rid of
                    "dll hell".
                    Replaces it with assembly-hell, and since most assemblies still end in .dll
                    ....
                    >
                    There's also automatic memory management, platform-neutrality, and
                    cross-language integration.
                    Ok.
                    >
                    Performance benefits are gained from executing all code in the CLR.
                    Calling unmanaged code decreases performance because additional
                    security checks are required.
                    That's "enabling partial trust scenarios", not improving performance.
                    Native performance is still better.
                    >
                    Other performance advantages are available through the use of the
                    Just-In-Time compiler,
                    Like? Sure, the JIT *could* use information about the hardware environment,
                    such as cache size or availability of extended instruction sets. But that's
                    more theory than reality.
                    with gains in built-in security by using code access security and the
                    avoidance of buffer overruns.
                    JIT doesn't avoid buffer overruns, bounds checking does. And precompilation
                    does a lot better job of reasoning about bounds checks at compile time and
                    optimizing them away than the JIT.

                    Almost all runtime performance gains from .NET are the fact that memory
                    allocation from a stack is a LOT cheaper than from a heap. In most cases
                    that actually pays for all the inefficiencies of .NET so managed code comes
                    out even with native on average, on many apps managed is a little faster,
                    for some native is a lot faster.
                    >
                    >
                    >
                    >
                    Juan T. Llibre, asp.net MVP
                    asp.net faq : http://asp.net.do/faq/
                    foros de asp.net, en español : http://asp.net.do/foros/
                    =============== =============== ========
                    "John" <info@nospam.in fovis.co.ukwrot e in message
                    news:%23A%23Bye kMJHA.3496@TK2M SFTNGP04.phx.gb l...
                    >Hi
                    >>
                    >What are the advantages actually achieved of managed code? I am not
                    >talking of theory but in reality. Thanks
                    >>
                    >Regards

                    Comment

                    • Cor Ligthert[MVP]

                      #11
                      Re: What has managed code achieved?

                      William,

                      You awake me.

                      I agree with you that it is strange that we load all kind of Net framework,
                      or better Microsoft does that on our computers.

                      As we are not using Net 1.x then the latest version should in fact be
                      enough.

                      Cor


                      "William Vaughn (MVP)" <billva@NoSpamB etav.comwrote in message
                      news:5ADAAC52-4FA0-4FD0-B7E0-84803F35FF58@mi crosoft.com...
                      But have we traded one kind of DLL hell for another? How many versions of
                      the Framework are loaded on your system? How is COM-based DLL management
                      any different than GAC-cached modules that can be replaced without
                      retesting the consumer applications? Since we now must wait while the code
                      is compiled before it can be executed, the performance argument might not
                      hold water for some applications. Notice how long it takes to launch the
                      Report Manager... I expect that managed code has managed to disenfranchise
                      a lot of perfectly good COM developers...
                      >
                      --
                      _______________ _______________ _______________ _______________ ______________
                      William R. Vaughn
                      President and Founder Beta V Corporation
                      Author, Mentor, Dad, Grandpa
                      Microsoft MVP
                      (425) 556-9205 (Pacific time)
                      Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
                      _______________ _______________ _______________ _______________ _______________ _______________ __
                      >
                      >
                      >
                      "Juan T. Llibre" <nomailreplies@ nowhere.comwrot e in message
                      news:OJP$fstMJH A.5692@TK2MSFTN GP04.phx.gbl...
                      >re:
                      >!What are the advantages actually achieved of managed code?
                      >>
                      >Imho, the greatest achievement for managed code is: it gets rid of "dll
                      >hell".
                      >>
                      >There's also automatic memory management, platform-neutrality, and
                      >cross-language integration.
                      >>
                      >Performance benefits are gained from executing all code in the CLR.
                      >Calling unmanaged code decreases performance because additional security
                      >checks are required.
                      >>
                      >Other performance advantages are available through the use of the
                      >Just-In-Time compiler,
                      >with gains in built-in security by using code access security and the
                      >avoidance of buffer overruns.
                      >>
                      >>
                      >>
                      >>
                      >Juan T. Llibre, asp.net MVP
                      >asp.net faq : http://asp.net.do/faq/
                      >foros de asp.net, en español : http://asp.net.do/foros/
                      >============== =============== =========
                      >"John" <info@nospam.in fovis.co.ukwrot e in message
                      >news:%23A%23By ekMJHA.3496@TK2 MSFTNGP04.phx.g bl...
                      >>Hi
                      >>>
                      >>What are the advantages actually achieved of managed code? I am not
                      >>talking of theory but in reality.
                      >>>
                      >>Thanks
                      >>>
                      >>Regards
                      >>>
                      >>>
                      >>
                      >>

                      Comment

                      • Juan T. Llibre

                        #12
                        Re: What has managed code achieved?

                        re:
                        !But have we traded one kind of DLL hell for another?

                        Not exactly.

                        Did you ever develop in Classic ASP ? "Dll Hell" was quite evident there.

                        1. Different dll versions *prevented* your application from running in IIS.
                        2. Updating a dll meant manually stopping IIS, and all applications, so a single app could be updated

                        re:
                        !How many versions of the Framework are loaded on your system?

                        That's irrelevant.
                        The fact that several versions of the .Net Framework can coexist hardly qualifies as "dll hell".




                        Juan T. Llibre, asp.net MVP
                        asp.net faq : http://asp.net.do/faq/
                        foros de asp.net, en español : http://asp.net.do/foros/
                        =============== =============== ========
                        "William Vaughn (MVP)" <billva@NoSpamB etav.comwrote in message
                        news:5ADAAC52-4FA0-4FD0-B7E0-84803F35FF58@mi crosoft.com...
                        But have we traded one kind of DLL hell for another? How many versions of the Framework are loaded on your system? How
                        is COM-based DLL management any different than GAC-cached modules that can be replaced without retesting the consumer
                        applications? Since we now must wait while the code is compiled before it can be executed, the performance argument
                        might not hold water for some applications. Notice how long it takes to launch the Report Manager... I expect that
                        managed code has managed to disenfranchise a lot of perfectly good COM developers...
                        >
                        --
                        _______________ _______________ _______________ _______________ ______________
                        William R. Vaughn
                        President and Founder Beta V Corporation
                        Author, Mentor, Dad, Grandpa
                        Microsoft MVP
                        (425) 556-9205 (Pacific time)
                        Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
                        _______________ _______________ _______________ _______________ _______________ _______________ __
                        >
                        >
                        >
                        "Juan T. Llibre" <nomailreplies@ nowhere.comwrot e in message news:OJP$fstMJH A.5692@TK2MSFTN GP04.phx.gbl...
                        >re:
                        >!What are the advantages actually achieved of managed code?
                        >>
                        >Imho, the greatest achievement for managed code is: it gets rid of "dll hell".
                        >>
                        >There's also automatic memory management, platform-neutrality, and cross-language integration.
                        >>
                        >Performance benefits are gained from executing all code in the CLR.
                        >Calling unmanaged code decreases performance because additional security checks are required.
                        >>
                        >Other performance advantages are available through the use of the Just-In-Time compiler,
                        >with gains in built-in security by using code access security and the avoidance of buffer overruns.
                        >>
                        >>
                        >>
                        >>
                        >Juan T. Llibre, asp.net MVP
                        >asp.net faq : http://asp.net.do/faq/
                        >foros de asp.net, en español : http://asp.net.do/foros/
                        >============== =============== =========
                        >"John" <info@nospam.in fovis.co.ukwrot e in message news:%23A%23Bye kMJHA.3496@TK2M SFTNGP04.phx.gb l...
                        >>Hi
                        >>>
                        >>What are the advantages actually achieved of managed code? I am not talking of theory but in reality.
                        >>>
                        >>Thanks
                        >>>
                        >>Regards
                        >>>
                        >>>
                        >>
                        >>

                        Comment

                        • Tom Shelton

                          #13
                          Re: What has managed code achieved?

                          On 2008-10-21, Scott M. <s-mar@nospam.nosp amwrote:
                          You're making my point Cor.
                          >
                          In VB 6, if you didn't explicitly destroy your object references, you not
                          only wasted memory, but also potentially tie up external resources. So, to
                          solve those two problems the developer HAD to dereference objects.
                          >
                          Ben's last message seems to indicate that we should still do this in .NET
                          for optimal object collection. I was correcting him, as doing what he
                          suggests can actually delay object de-referencing.
                          >
                          In .NET, as you know, as long as you are disposing of your objects, which is
                          built in using Using, you are all set.
                          >
                          The point being that in .NET, the developer doesn't write memory management
                          code, as was required in VB 6, and that is one advantage of working in a
                          managed environment.
                          >
                          -Scott
                          >
                          Scott - most of the time explicit managment of references was not necessary in
                          VB6 either. About the only time that setting an object reference to nothing
                          amounted to anything is if the object was a class or module level value -
                          which is about the same as VB.NET. In VB6 local variables were automatically
                          claimed when the method exited - well, assuming there wasn't a bug in the
                          underlying COM objects implementation :)

                          --
                          Tom Shelton

                          Comment

                          • William Vaughn \(MVP\)

                            #14
                            Re: What has managed code achieved?

                            Yes, but this attitude is myopic. In a client system in a business you might
                            be able to restrict the application configuration and remove unnecessary
                            Framework installations but as I understand it, some versions of the
                            Framework depend on earlier versions. In addition, in a typical system I
                            expect that even the OS draws on more than one version of the Framework for
                            its own utilities as do the utilities and applications that are supplied by
                            the hardware vendor. I expect that we're stuck with any number of
                            Frameworks for the next decade.

                            As to memory, I think it's arrogant to assume that memory is cheap so it's
                            ok to just load up the system and take all you need for as long as you like.
                            This is what kills system are applications that consume every byte of memory
                            in sight forcing other applications to be swapped out. Consider that 32-bit
                            systems (Vista or XP) can only use 3.5GB of RAM. Take away the OS footprint,
                            a couple .NET Frameworks and the memory consumed by the ancillary utilities
                            like Anti-Virus, Anti-spyware, Anti-spam, SQL Server Express instances,
                            Adobe, Office and other "helper" DLLs and you don't have much memory left to
                            load up that set of pictures, documents and "real" applications. Consider
                            that most (by far) of the systems out there are owned and run by consumers
                            or offices that permit their employees to treat their systems as their
                            own--thus they get loaded up with a lot of memory-hungry applications and
                            wallpapers. I see this attitude toward memory (and disk space) like the US's
                            approach to cheap oil. We built an entire infrastructure around it with no
                            eye to the future when oil is $150/barrel.

                            No, IMHO developers still need to be cognizant about how much memory they're
                            consuming and holding. Given that the .NET Framework GC only runs when the
                            system is memory stressed only exacerbates the problem.

                            --
                            _______________ _______________ _______________ _______________ ______________
                            William R. Vaughn
                            President and Founder Beta V Corporation
                            Author, Mentor, Dad, Grandpa
                            Microsoft MVP
                            (425) 556-9205 (Pacific time)
                            Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
                            _______________ _______________ _______________ _______________ _______________ _______________ __



                            "Cor Ligthert[MVP]" <Notmyfirstname @planet.nlwrote in message
                            news:O5IKezyMJH A.4724@TK2MSFTN GP04.phx.gbl...
                            William,
                            >
                            You awake me.
                            >
                            I agree with you that it is strange that we load all kind of Net
                            framework, or better Microsoft does that on our computers.
                            >
                            As we are not using Net 1.x then the latest version should in fact be
                            enough.
                            >
                            Cor
                            >
                            >
                            "William Vaughn (MVP)" <billva@NoSpamB etav.comwrote in message
                            news:5ADAAC52-4FA0-4FD0-B7E0-84803F35FF58@mi crosoft.com...
                            >But have we traded one kind of DLL hell for another? How many versions of
                            >the Framework are loaded on your system? How is COM-based DLL management
                            >any different than GAC-cached modules that can be replaced without
                            >retesting the consumer applications? Since we now must wait while the
                            >code is compiled before it can be executed, the performance argument
                            >might not hold water for some applications. Notice how long it takes to
                            >launch the Report Manager... I expect that managed code has managed to
                            >disenfranchi se a lot of perfectly good COM developers...
                            >>
                            >--
                            >______________ _______________ _______________ _______________ _______________
                            >William R. Vaughn
                            >President and Founder Beta V Corporation
                            >Author, Mentor, Dad, Grandpa
                            >Microsoft MVP
                            >(425) 556-9205 (Pacific time)
                            >Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
                            >______________ _______________ _______________ _______________ _______________ _______________ ___
                            >>
                            >>
                            >>
                            >"Juan T. Llibre" <nomailreplies@ nowhere.comwrot e in message
                            >news:OJP$fstMJ HA.5692@TK2MSFT NGP04.phx.gbl.. .
                            >>re:
                            >>!What are the advantages actually achieved of managed code?
                            >>>
                            >>Imho, the greatest achievement for managed code is: it gets rid of "dll
                            >>hell".
                            >>>
                            >>There's also automatic memory management, platform-neutrality, and
                            >>cross-language integration.
                            >>>
                            >>Performance benefits are gained from executing all code in the CLR.
                            >>Calling unmanaged code decreases performance because additional security
                            >>checks are required.
                            >>>
                            >>Other performance advantages are available through the use of the
                            >>Just-In-Time compiler,
                            >>with gains in built-in security by using code access security and the
                            >>avoidance of buffer overruns.
                            >>>
                            >>>
                            >>>
                            >>>
                            >>Juan T. Llibre, asp.net MVP
                            >>asp.net faq : http://asp.net.do/faq/
                            >>foros de asp.net, en español : http://asp.net.do/foros/
                            >>============= =============== ==========
                            >>"John" <info@nospam.in fovis.co.ukwrot e in message
                            >>news:%23A%23B yekMJHA.3496@TK 2MSFTNGP04.phx. gbl...
                            >>>Hi
                            >>>>
                            >>>What are the advantages actually achieved of managed code? I am not
                            >>>talking of theory but in reality.
                            >>>>
                            >>>Thanks
                            >>>>
                            >>>Regards
                            >>>>
                            >>>>
                            >>>
                            >>>
                            >

                            Comment

                            • Scott M.

                              #15
                              Re: What has managed code achieved?

                              Scott - most of the time explicit managment of references was not
                              necessary in
                              VB6 either. About the only time that setting an object reference to
                              nothing
                              amounted to anything is if the object was a class or module level value -
                              which is about the same as VB.NET. In VB6 local variables were
                              automatically
                              claimed when the method exited - well, assuming there wasn't a bug in the
                              underlying COM objects implementation :)
                              >
                              --
                              Tom Shelton
                              I don't know how you can make that statement when different VB 6
                              applications had object references scoped differently. I could just as
                              easily say that most applications did have module scoped object variables.
                              In those situations, you (the developer) were required to manage the
                              object's lifetime and by association, any external resources used by that
                              object.

                              In .NET, using Using, the developer need not do anything.

                              This is one aspect of what working with managed code buys us.

                              -Scott




                              Comment

                              Working...