Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / March 2008

Tip: Looking for answers? Try searching our database.

ASP.NET - Inline / Code Behind

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Shiva Ramani - 28 Mar 2008 05:01 GMT
Though there are several blogs/Q&A's on inline or codebehind debate, I would
like to know the compilation model or the process thats happenign when we use
Inline or code behind in ASPX. Would it be right to say Inline and
code-behind code are executed on the Web server. Inline code is JIT compiled
at run time and code-behind code is precompiled.

Thanks
Cowboy (Gregory A. Beamer) - 28 Mar 2008 18:10 GMT
On a very high level, normal situation basis, you are somewhat on track
(sans your terminology), as the CodeBehind is compiled to assemblies, while
more of the steps are done on the server with inline. If you use publish
before pushing out bits, however, they can both be essentially precompiled,
although the inline makes it a bit easier to edit production (which is a bad
idea, BTW).

Both types of code are JITted into memory at the time of first hit, so there
is a compilation step beyond IL. Inline code also has to be turned into IL,
so there is a potential of a bit of an extra hit. You can avoid much of the
first hit lag with precompile.axd.

Overall, neither code behind nor inline is a great option for actually
working code, as you should have a clean separation of concerns (UI and
business logic). If you follow this "rule" (ie, putting your working code
into libraries), it should not really make much of a difference whether you
inline or code behind, although having the precompilation to IL also makes
it harder to get at your code (at least in theory) and gives you the option
of obfuscation.

Signature

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

Subscribe to my blog
http://gregorybeamer.spaces.live.com/lists/feed.rss

or just read it:
http://gregorybeamer.spaces.live.com/

*************************************************

| Think outside the box!

*************************************************
> Though there are several blogs/Q&A's on inline or codebehind debate, I
> would
[quoted text clipped - 6 lines]
>
> Thanks

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.