Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Which is safer, Client Side or Server-Side data processi
Message
 
À
18/11/2010 07:47:12
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01489520
Message ID:
01489711
Vues:
48
>>Client-side uses .NET Data Objects to process and update data. However, server-side uses ExecScalar() to execute Dynamic SQL to process and update data. My concern in client-side methodology is the data integrity which is possible specially if there are a hundred users simultaneously using the system. Server-side maybe is a little bit slower but I do think that it's safer because the server does the locking and queuing of sql statements to be executed.
>>
>>What do you think is safer methodology in updating and processing data?
>
>I'll be interested in your results. I tend to use one or the other or even a combination of the two....(i know crazy, but it depends on the requirements and how much control I have on the backend)

Tc,

It's actually a point of debate between me and the head of the development team in our company. In client-side, you have to pull the data from server then do the processing something like:

drow["amount"].value = drow["amount"].value + 100

if drow["amount"].value contains a value of 200 the time you pulled it from server, then you will be sending back a value of 300 in the server. What if during the processing, somebody within the network updated the value from 200 to 400 just before you send the value from your PC?

In dynamic sql statements, it's a bit different:

Update TableA set amount = amount + 100 where TableA.refno = @something

There is no chance that you won't get the correct value because SQL Server will do the locking and queuing.

Client-side is considered to be a methodology for fat clients as opposed to thin client's stored procedure and/or dynamic sql statements.
JESS S. BANAGA
Project Leader - SDD division
...shifting from VFP to C#.Net

CHARISMA simply means: "Be more concerned about making others feel good about themselves than you are in making them feel good about you."
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform