ASP.NET vs ASP

G

Guest

Hi
I’m migrating a standard ASP application to ASP.NET. When I designed the ASP app, I tried to perform as much processing on the client side as possible, so I don’t have to make too many trips to the web/database servers, etc
Now in ASP.NET, if I would use all the new features and server controls offered by ASP.NET, I feel like every time a user clicks on the form it’s posted to the web server, even for such simple tasks as data validation (Validator Control). I mean every time I want to use a server control, I’m asking myself “Why not use a simple html client side element?â€

So I guess a well designed ASP.NET app will not try to use all this new features and server controls, but instead will try to balance server and client side processing and will still use some or a lot of client side code

Let’s say I want to display some data from the database in an html table by calling a stored procedure. I guess I should never use DataGrid, DataList controls for this task (even though they support data binding) since they’re very “heavy†and I’m not using all the functionality they offer anyway, I’m just displaying the data

Instead I should use HtmlTable or maybe even better use LiteralControl or make it the way I do it ASP using Response.Write? I mean can anybody tell me why not? Why using server controls is better then using Response.Write, performance-wise? And from this perspective why is ASP.NET better then ASP? Aren’t all the advantages of ASP.NET offset by the increased level of communication between the browser and the web server

Thank you
Vitaly D.
 
B

bruce barker

actually its pretty easy to write your own set of server controls that do
what you want. its a good method for encapsulating the functionality,
including the associated javascript. as the builtin client side validation
only works with IE, I ended up writing my own (which my controls support).

with IE having no soap support (they have a web behavior, but the default
security setting disables it), you are left with only the hidden frame
postback method. this make writing heavy clients harder.

that said, i find i am using more and more jscript on my sites.


-- bruce (sqlwork.com)


Vitaly said:
Hi,
I'm migrating a standard ASP application to ASP.NET. When I designed the
ASP app, I tried to perform as much processing on the client side as
possible, so I don't have to make too many trips to the web/database
servers, etc.
Now in ASP.NET, if I would use all the new features and server controls
offered by ASP.NET, I feel like every time a user clicks on the form it's
posted to the web server, even for such simple tasks as data validation
(Validator Control). I mean every time I want to use a server control, I'm
asking myself "Why not use a simple html client side element?"
So I guess a well designed ASP.NET app will not try to use all this new
features and server controls, but instead will try to balance server and
client side processing and will still use some or a lot of client side code.
Let's say I want to display some data from the database in an html table
by calling a stored procedure. I guess I should never use DataGrid, DataList
controls for this task (even though they support data binding) since they're
very "heavy" and I'm not using all the functionality they offer anyway, I'm
just displaying the data.
Instead I should use HtmlTable or maybe even better use LiteralControl or
make it the way I do it ASP using Response.Write? I mean can anybody tell me
why not? Why using server controls is better then using Response.Write,
performance-wise? And from this perspective why is ASP.NET better then ASP?
Aren't all the advantages of ASP.NET offset by the increased level of
communication between the browser and the web server?
 
K

Kevin Spencer

Hi Vitaly,

Your concerns are well-founded. One of the issues that developers have had
to deal with in recent years is how to balance optimization with
extensibility and rapid application development. Certainly, one could write
a proprietary platform for a specifc software application and it would run
faster and perform better. On the other hand, whoever writes the stack has
to maintain the stack, and there is certainly a good economic argument for
letting a company like Microsoft write and maintain the stack. In addition,
using an existing stack makes for rapid application development, as the
stack already exists, and you merely develop on top of it.

Applying these general principles to ASP.Net, you are correct in assuming
that there is a balance between using pre-built Server Controls over
client-side HTML and JavaScript. How you attain that balance for yourself
will be your own mission to accomplish; nobody can make that determination
for you. Keeping the principles of rapid application and extensibility in
mind, keep good object-oriented programming principles in mind as well, and
strike your own balance. Object-orientation is very powerful when used
correctly.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

Vitaly said:
Hi,
I'm migrating a standard ASP application to ASP.NET. When I designed the
ASP app, I tried to perform as much processing on the client side as
possible, so I don't have to make too many trips to the web/database
servers, etc.
Now in ASP.NET, if I would use all the new features and server controls
offered by ASP.NET, I feel like every time a user clicks on the form it's
posted to the web server, even for such simple tasks as data validation
(Validator Control). I mean every time I want to use a server control, I'm
asking myself "Why not use a simple html client side element?"
So I guess a well designed ASP.NET app will not try to use all this new
features and server controls, but instead will try to balance server and
client side processing and will still use some or a lot of client side code.
Let's say I want to display some data from the database in an html table
by calling a stored procedure. I guess I should never use DataGrid, DataList
controls for this task (even though they support data binding) since they're
very "heavy" and I'm not using all the functionality they offer anyway, I'm
just displaying the data.
Instead I should use HtmlTable or maybe even better use LiteralControl or
make it the way I do it ASP using Response.Write? I mean can anybody tell me
why not? Why using server controls is better then using Response.Write,
performance-wise? And from this perspective why is ASP.NET better then ASP?
Aren't all the advantages of ASP.NET offset by the increased level of
communication between the browser and the web server?
 

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,995
Messages
2,570,226
Members
46,815
Latest member
treekmostly22

Latest Threads

Top