David McCallum said:
Good explanation. Now for me, The differenece (in plain English) between
managed and unmanaged code.
David McCallum
Managed code is code that is run in a virtual machine environment, where
specific rules and constraints have been placed on the code, and specific
features of the environment are routinely used by the code. Managed code is
encoded in an intermediate language (MSIL for .Net, Bytecode for Java) that
the virtual machine can understand by a compiler that understands the
capabilities of the virtual machine environment.
Coding in this manner provides a controlled space in which to operate,
allowing the software developer to know, for a fact, that some of the
difficult problems typical of prior coding paradigms have been solved for
them.
Managed code is managed for the developer, not the user.
Unmanaged code is coding that is run directly by the operating system, and
calls traditional libraries in a less constrained environment. In this
environment, the programmer takes on the additional responsibility for the
tasks that could be provided by a managed environment. In exchange for
taking on additional dev responsibility, the code usually runs a bit faster
and can often access hardware resources more readily. For business
applications (GUI apps and Web apps) the difference is nearly never
noticable. For intense applications, like gaming environments, CAD systems,
real time device control, among others, sophisticated environments already
exist that perform the common tasks required by developers, so their
advantage in moving to managed code is substantially less, and the
performance cost of the constrained virtual machine may present a greater
obstacle.
I hope this helps,
--
--- Nick Malik [Microsoft]
MCSD, CFPS, Certified Scrummaster
http://blogs.msdn.com/nickmalik
Disclaimer: Opinions expressed in this forum are my own, and not
representative of my employer.
I do not answer questions on behalf of my employer. I'm just a
programmer helping programmers.
--