Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

In ASP.NET, we can easy programming the web application with codebehind feature.

 

But, is it practical? logically it should slow down the process right? normal ASP programming is more straighforward...

 

what is your opinion?

Posted

I know use code-behind is very convenient for developer, but in web application "SPEED" is a critical issue...

 

Our opinion is, convenient to developer is not important, the most important is convenient to end-user... I think you should agree right?

  • Moderators
Posted

Even if you don't use Code-Behind, you will use classes and

inheratance, imports and all that good stuff that .NET is all about.

So you will still end up with many pages of code-behind-the-

scenes anyway. Whether it's you're own library or something

shipped with the Framework, what's the difference? It's all compiled.

Visit...Bassic Software
Posted

Compiled Fast, Conventional slow

 

Pretty much answers it.

 

Code behind is better for the developer, end-user and seller:

 

1.) Apps built with code-behind can be distributed as DLL's - hence your application is protected and your code encapsulated.

 

2.) For graphic developers and programmers the code/graphics are split up for the most part. Hence your graphic guru will not overwrite your 400 line class file that makes a mokey shoot fruit out of his butt.

 

3.) If programmed correctly the code should be separed into regions which makes the code very easy to read/troubleshoot/add. Yes that only works for VS developers, but hey, its worth using just for the regions.... An example is attached..... This is an actual suite of applications that I wrote. (sorry for the format, it was done quickly)

 

4.) Logically it DOES NOT SLOW down the process and in some cases will speed it up. To really see how effecient your code is you will need to test it, and also look at the MSIL code that is created from your app.

 

5.) Normal asp programming makes much greater sense, UNTIL you learn .net -- you will find yourself saying "oh, thats how you do that, or why didnt they just call it THIS and I would have known what they meant." - it all has to do with mindset. MS is trying to re-program you. In the long term you will see the benefits, and you will see similiarities when working with other O/S and apps.

 

Hence:

Object

Context

Container

 

Since Win98 for example, everyting is object based. Did you notice that when you opened the explorer that it used to say "14 folders and 344 files"? -- Now it will say "14 objects" or "344 objects"

 

---------------------------------------------------

 

:-\

regions_sample.bmp

Posted

1. Compare with ASP (not ASP.NET), I still can use DLL in ASP.

2. For code behind, we need to use Web Control, it definitely slower than HTML Form control.

....

 

I will test the different of the speed to get my answer. Logically I believe code-behind should be slower, but I need to know how much slower...

 

Anyway, thank you for your reply.

  • *Experts*
Posted

Code-behind pages and the code at the top of ASPX pages (in

the header) will be compiled into a DLL before you can see the

changes in the code. This makes it lightning-fast.

 

Another good point brought up on the most recent episode of

VBTV (and in point #2 in aikeith's post) is that code-behind pages

help separate the UI from the code, and it can help keep things

organized for collaborative projects where different people are

working on the UI and the actual code.

 

Code that is in the page between <% %> brackets, however, is

not compiled, and is evaluated whenver the page is accessed.

This makes it much slower than the code-behind code or the code

at the top of the page.

"Being grown up isn't half as fun as growing up

These are the best days of our lives"

-The Ataris, In This Diary

  • Moderators
Posted

"Compare with ASP (not ASP.NET), I still can use DLL in ASP."

It is very easy in ASP.NET.

 

" For code behind, we need to use Web Control, it definitely slower than HTML Form control."

Code-Behind and Web Controls don't go hand-in-hand, you can use one without the other.

Visit...Bassic Software
  • Moderators
Posted

You can do this...

PlaceHolder1.Controls.Add(New LiteralControl("<body bgcolor=#F8FFBF>"))

 

or just send any HTML tag within a control...

Label1.text = "<table width=600 style='color: #000080'><tr><td><b>Some Text</b></td></tr><table>"

Visit...Bassic Software

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...