Compiled, Not Interpreted!

A

Arpan

I am a newbie ASP.NET programmer. While going through the MSDN ASP.NET tutorial, I came across the following sentence:

All ASP.NET code is compiled rather than interpreted which allows early binding, strong typing & just-in-time (JIT) compiling to native code.

What do "compiled rather than interpreted" & "early binding" mean? Also since ASP.NET code is compiled & not interpreted, what are the benefits of "compiled" code over "interpreted" code?

Thanks,

Arpan
 
K

Karl Seguin

Compiling code is the step of taking your VB.Net/C#/XXX code and turning it into native code. Native code is code that the actual processor understands (assembly language). In essence it's the process of converting code from human readable form (what you work with) to machine form (what the processor works with). Compiling can be done manually (like going in VS.Net and selecting "Build" or automatically, like the JIT in ASP.Net).'

Interpreted code is also turned into native code (as it obviously must for the processor to understand it), but it's done each time the program is run (or the page is requested in the case of ASP). This means that each time the code/page is run, the compiling step must take place (which is pretty complicated, involves symbol trees, parsers, error recovery and blah blah blah).

The benefits of compiled code are numerous. First off, it's faster because compilation only happens once - additionally, since compiled code can normally take more time to compile, the compilers tend to make better optimization. Secondly it you can simply compile the code to see if there are any compile-time errors, otherwise you have to run the code - which can still detect compile time errors since the code IS compiled, but they feel more like runtime errors (which are bad). Security is another benefit, with compiled code you only have to ship the compiled product to your clients - much harder to steal your code - interpreted code doesn't have this benefit. There are more...

You can read up on late vs early binding here: http://word.mvps.org/FAQs/InterDev/EarlyvsLateBinding.htm but early binding code is faster because it's compiled up front....it provides code which is far less likely to cause a runtime error...and generally tends to have better support with your tools (such as intellisense).

Hope this helps,
Karl

--
MY ASP.Net tutorials
http://www.openmymind.net/


I am a newbie ASP.NET programmer. While going through the MSDN ASP.NET tutorial, I came across the following sentence:

All ASP.NET code is compiled rather than interpreted which allows early binding, strong typing & just-in-time (JIT) compiling to native code.

What do "compiled rather than interpreted" & "early binding" mean? Also since ASP.NET code is compiled & not interpreted, what are the benefits of "compiled" code over "interpreted" code?

Thanks,

Arpan
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top