ASP.NET Dynamic Compilation

Discussion in 'ASP .Net' started by Marc, Jun 23, 2008.

  1. Marc

    Marc Guest

    I am studying ASP.NET and have a simple question reading the first lines in
    this page:



    http://msdn.microsoft.com/en-us/library/ms366723(VS.80).aspx

    Are they talking about compilation of C# code to IL code or about
    compilation of IL code to machine dependant instruction code?





    I've got some trouble with the used terms, I think both (C# -> IL and
    IL ->machine code) is called compilation?

    Marc Wentink
    Marc, Jun 23, 2008
    #1
    1. Advertising

  2. Marc

    Manish Guest

    Hi Marc,

    yes , you code in any language be in VB.NET or C#.net is compiled into
    machine independent language MSIL using the language compilers and the
    compiled into machine specific code using the JIT compiler at run time.

    Regards,
    Manish
    www.ComponentOne.com


    "Marc" wrote:

    > I am studying ASP.NET and have a simple question reading the first lines in
    > this page:
    >
    >
    >
    > http://msdn.microsoft.com/en-us/library/ms366723(VS.80).aspx
    >
    > Are they talking about compilation of C# code to IL code or about
    > compilation of IL code to machine dependant instruction code?
    >
    >
    >
    >
    >
    > I've got some trouble with the used terms, I think both (C# -> IL and
    > IL ->machine code) is called compilation?
    >
    > Marc Wentink
    >
    >
    >
    >
    Manish, Jun 23, 2008
    #2
    1. Advertising

  3. Marc

    Marc Guest

    "Manish" <> wrote

    > yes , you code in any language be in VB.NET or C#.net is compiled into
    > machine independent language MSIL using the language compilers and the
    > compiled into machine specific code using the JIT compiler at run time.


    Thanks for your effort Manish, but that unfortunately was not really my
    question. I might be unclear what is exactly my question. Let me try again:

    Does Dynamic Compilation refer to compiling source code to intermediate
    language or does it refer to compiling intermediate language to machine
    dependant instructions?
    Marc, Jun 23, 2008
    #3
  4. Marc

    Madhur Guest

    Hi Marc

    Actually dynamic compilation in this case refers to both compilation
    together.
    Basically what this means is that you can have .cs (or. vb) files in your
    source site.

    When you make a request, ASP.NET will compile the .cs first into IL and then
    into machine language to emit the required HTML for the client browser.
    The conversion from IL to machine is implicit.

    --
    MAdhur

    "Marc" <m,> wrote in message
    news:...
    >
    > "Manish" <> wrote
    >
    >> yes , you code in any language be in VB.NET or C#.net is compiled into
    >> machine independent language MSIL using the language compilers and the
    >> compiled into machine specific code using the JIT compiler at run time.

    >
    > Thanks for your effort Manish, but that unfortunately was not really my
    > question. I might be unclear what is exactly my question. Let me try
    > again:
    >
    > Does Dynamic Compilation refer to compiling source code to intermediate
    > language or does it refer to compiling intermediate language to machine
    > dependant instructions?
    >
    Madhur, Jun 23, 2008
    #4
  5. re:
    !> you can have .cs (or. vb) files in your source site

    Or both .cs *and* .vb , with a simple configuration in your web.config
    plus the creation of a couple of subdirectories under App_Code.



    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/
    ======================================
    "Madhur" <> wrote in message news:...
    > Hi Marc
    >
    > Actually dynamic compilation in this case refers to both compilation together.
    > Basically what this means is that you can have .cs (or. vb) files in your source site.
    >
    > When you make a request, ASP.NET will compile the .cs first into IL and then into machine language to emit the
    > required HTML for the client browser.
    > The conversion from IL to machine is implicit.
    >
    > --
    > MAdhur
    >
    > "Marc" <m,> wrote in message news:...
    >>
    >> "Manish" <> wrote
    >>
    >>> yes , you code in any language be in VB.NET or C#.net is compiled into
    >>> machine independent language MSIL using the language compilers and the
    >>> compiled into machine specific code using the JIT compiler at run time.

    >>
    >> Thanks for your effort Manish, but that unfortunately was not really my question. I might be unclear what is exactly
    >> my question. Let me try again:
    >>
    >> Does Dynamic Compilation refer to compiling source code to intermediate language or does it refer to compiling
    >> intermediate language to machine dependant instructions?
    >>

    >
    Juan T. Llibre, Jun 23, 2008
    #5
  6. Marc

    Marc Guest

    "Juan T. Llibre" <> wrote

    > Or both .cs *and* .vb , with a simple configuration in your web.config
    > plus the creation of a couple of subdirectories under App_Code.


    Yes I did know that, but that's not really relevant for the question.
    Marc, Jun 23, 2008
    #6
  7. Marc

    Marc Guest

    "Madhur" <> wrote

    > When you make a request, ASP.NET will compile the .cs first into IL and
    > then into machine language to emit the required HTML for the client
    > browser.
    > The conversion from IL to machine is implicit.


    I am confused with the JIT compilation of IL to machine code. The latter
    means, as I believe, that for any IL chunk of code, only the parts that are
    needed are translated to machine code. So I think ASP.NET wil make a IL dll,
    that would be dynamic compilation, and when it uses it, it will translate
    only the used parts of the dll to machine code, according to the JIT
    principle.

    As far as I can remember JIT works that way in both java and .NET.
    Marc, Jun 25, 2008
    #7
  8. Marc

    Madhur Guest

    Marc wrote:
    > "Madhur" <> wrote
    >
    >> When you make a request, ASP.NET will compile the .cs first into IL
    >> and then into machine language to emit the required HTML for the
    >> client browser.
    >> The conversion from IL to machine is implicit.

    >
    > I am confused with the JIT compilation of IL to machine code. The
    > latter means, as I believe, that for any IL chunk of code, only the
    > parts that are needed are translated to machine code. So I think
    > ASP.NET wil make a IL dll, that would be dynamic compilation, and
    > when it uses it, it will translate only the used parts of the dll to
    > machine code, according to the JIT principle.
    >
    > As far as I can remember JIT works that way in both java and .NET.


    What you have understood is correct. JIT works both in JAVA and .NET but
    there intrinsic implementations are different. JIT is very transparent to
    the user in
    ..NET Framework. So Dynamic compilation essentially means your source
    compilation
    to IL.

    Hope this helps

    Madhur
    Madhur, Jun 25, 2008
    #8
  9. Marc

    Marc Guest

    "Madhur" <> schreef

    > So Dynamic compilation essentially means your source compilation
    > to IL.


    But it has nothing to do with JIT compilation of IL code to machine code
    right? That was my confusion. I was reading some stuff and about Dynamic
    Compilation and I was thinking are they just meaning JIT or something
    totally independant of that, something totally different.
    Marc, Jun 25, 2008
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Steve

    Dynamic compilation errors

    Steve, Oct 22, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    429
    Steve
    Oct 23, 2004
  2. =?Utf-8?B?UGxhdA==?=

    Dynamic Compilation, Multiple *.vb Files

    =?Utf-8?B?UGxhdA==?=, Mar 16, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    339
    =?Utf-8?B?UGxhdA==?=
    Mar 16, 2005
  3. Dynamic Debug Compilation

    , Apr 7, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    3,664
  4. Sir Psycho

    ASP.NET dynamic compilation?

    Sir Psycho, Aug 16, 2007, in forum: ASP .Net
    Replies:
    6
    Views:
    523
    George Ter-Saakov
    Aug 21, 2007
  5. C__chp
    Replies:
    4
    Views:
    502
    Puppet_Sock
    Feb 15, 2008
Loading...

Share This Page