Re: Server side controls vs client side script.

Steven Fraser <[email protected]> Thu, 27 Jun 2002 10:33:26 +0100
Newsgroups gmane.comp.windows.devel.dotnet.general
Message-ID <[email protected]>
Hi Mattias,

How do you go about using IE as a direct client to a WebService?

Regards,
             Steven Fraser

The views expressed here are mine and not those of my employer


-----Original Message-----
From: Matthias Hertel [mailto:[email protected]]
Sent: 27 June 2002 07:22
To: [email protected]
Subject: Re: [DOTNET] Server side controls vs client side script.


This argumention is right and false - it depends on the way you implement y=
our pages and is not .NET specific.

Sample:
You have a HTML Form with 20 kByte that uses Data of 1 kByte that is displa=
yed and modified in 4 fields.

Case 1:
If you implement a server-site validation on every onchange-event the data =
is uploaded 4 times to the server for validation and 4 times the whole Page=
 with data comes back to the client.
The final submit only tranfers the data.
Sum: ~ 21 + 4*(1+21) + 1 =3D 110 kbyte (if no errors in input)

Case 2:
You implement a server-site validation when the form is submitted there is =
no up/download while the values in the fields are changed.
Sum: ~ 21 + 1 =3D 22 kbyte (if no errors in input)

Case 3:
Same as Case 2 but you ADD a client-site validation.
You only have to add some HTML+JScript code that's transfered to the client.
Sum: ~ 21 + 1 + 2 =3D 24 kbyte (even if some errors while editing input)

Case 4:
Server-site validation is done by calling a WebService. It is possible to u=
se the IE as a direct client to a webservice and this enables a full featur=
ed validation including reference data-lookup.
Sum: ~ 21 + 1 + 4*1 + 2 =3D 28 kbyte (even if some errors while editing inp=
ut)

Discuss:
All of these cases can be implemented on every server-plattform (.NET, ASP,=
 JSP, PHP,...) so this is not .NET specific.
Some people use every new feature they can get; they should think about a <=
asp:label runat:server ...>. Programming the Case 1 is also done in some of=
 the .NET Samples but showing the possibilities doesn't mean that you have =
to us them. Mixing HTML and ASP.NET objects also makes sense.

Case 4 is not suppored very well by the existing ASP.NET classes but callin=
g webservices directly from the client enables a lot of features. We implem=
ent our solution this way.
=20
----- Urspr=FCngliche Nachricht -----
    Von: "Steve Miller" <[email protected]>
    Ges.: 26.06.02 16:50:35
    An: "[email protected]" <[email protected]>
    Betreff:      [DOTNET] Server side controls vs client side script.
   =20
    Some client-side code purist argue that ASP.NET's server side controls =
put
    to much of a load on the server and cause to many round trips to the
    server.  When you are pitching ASP.NET and run into these arguments how=
 do
    you answer these criticisms of ASP.NET?
   =20
    Steve Miller
   =20
    You can read messages from the DOTNET archive, unsubscribe from DOTNET,=
 or
    subscribe to other DevelopMentor lists at http://discuss.develop.com.
   =20

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.


______________________________________________________________

CONFIDENTIALITY NOTICE
This communication and the information it contains is intended for the pers=
on or organisation to whom it is addressed.  Its contents are confidential =
and may be protected in law.  Unauthorised use, copying or disclosure of an=
y of it may be unlawful.  If you are not the intended recipient, please con=
tact us immediately.

The contents of any attachments in this e-mail may contain software viruses=
, which could damage your own computer system.  While Marlborough Stirling =
has taken every reasonable precaution to minimise this risk, we cannot acce=
pt liability for any damage which you sustain as a result of software virus=
es.  You should carry out your own virus checking procedure before opening =
any attachment.

Marlborough Stirling plc, Registered No. 3008820,
Allen Jones House, Jessop Avenue, Cheltenham, Gloucestershire, GL50 3SH
Tel: 01242 547000     Fax: 01242 547100
http://www.marlborough-stirling.com

The following companies are subsidiaries of Marlborough Stirling plc and ar=
e registered in England and Wales at the above address:
Marlborough Stirling PLC, Registered No. 3008820
The Marlborough Stirling Group PLC, Registered No. 1855353
Marlborough Stirling Administration Limited, Registered No. 2341195
Metgem Limited, Registered No. 02341195

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.