Click here to Skip to main content
15,884,629 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Check for repeated characters Pin
markovl23-May-12 21:07
markovl23-May-12 21:07 
QuestionScope For Hospital Management Pin
santosh_pathak22-May-12 21:51
santosh_pathak22-May-12 21:51 
AnswerRe: Scope For Hospital Management Pin
Sandeep Mewara22-May-12 23:44
mveSandeep Mewara22-May-12 23:44 
GeneralRe: Scope For Hospital Management Pin
santosh_pathak23-May-12 0:13
santosh_pathak23-May-12 0:13 
AnswerCross posted from design forum Pin
Pete O'Hanlon23-May-12 0:20
mvePete O'Hanlon23-May-12 0:20 
QuestionVSTO Pin
Ramkumar_S22-May-12 19:49
Ramkumar_S22-May-12 19:49 
AnswerRe: VSTO Pin
Not Active23-May-12 2:36
mentorNot Active23-May-12 2:36 
QuestionApproach on getting rid of server side validation Pin
Fabio Franco22-May-12 12:13
professionalFabio Franco22-May-12 12:13 
Hi all, first of all thanks for taking the time to look into this.

My scenario is the following:

ASP.NET 4 Web Forms app distributed in 4 layers (C# projects):

1 - UI (Web Forms)
2 - DomainModel (Behavior and Data. This layer has no knowledge of the other layers)
3 - DAL (Get data from the database to fill the domain model)
4 - Service (This layer is responsible for managing calls from Web Forms, fetching the data from the database and filling the model)

So what happens is, once the user loads a certain user interface, there is a particular area where the user interface constantly changes depending on the user input. And all the rules for those are on the domain model. So for example:

User types XYZ on field 1:
Fields 2 and 3 show up because user typed XYZ on field 1.

If user types ABC on field 1:
Then Fields 4 and 5 show up because user typed ABC on field 1.

Internally, when the user changes the value of a text box or dropdownlist, the codebehind updates the model with that value and the model returns the new fields that need to be set. This works quite well, with update panels and the roundtrips to the server.

The problem starts when the user is in a far away location. Example: Server US, User Spain.

It takes a long time for the user to have its data refreshed on the update panel so he can't be effective on filling the fields, they usually are a lot of fields so we are having a productivity bottle neck with this.

A way to solve this issue is to bring the rules to client side as javascript, but I'm running away from it for several reasons:

1 - I'd need to replicate the business rules on javascript. This means that I will loose lots of the C# OO features and this is can get really risky, since the rules can get complex.

2 - This would create a sync problem. If update one model, the other would need to be updated as well, this is a high risk of someday falling out of sync, if they ever get in perfect sync at all.

3 - I don't like the idea of having client side code containing too much information about the underlying business rules.

Now, without touching the hardware infrastructure, do you have any suggestion on the approach on how mitigate this problem? Obviously distance is the main problem here and I can't bring the user closer to the server and vice-versa.

If the scenario is unclear, please let me know what else I can explain.

I appreciate any suggestion on this matter.

Regards
To alcohol! The cause of, and solution to, all of life's problems - Homer Simpson
----
Our heads are round so our thoughts can change direction - Francis Picabia

AnswerRe: Approach on getting rid of server side validation Pin
jkirkerx23-May-12 6:49
professionaljkirkerx23-May-12 6:49 
GeneralRe: Approach on getting rid of server side validation Pin
Fabio Franco23-May-12 7:23
professionalFabio Franco23-May-12 7:23 
GeneralRe: Approach on getting rid of server side validation Pin
jkirkerx23-May-12 10:04
professionaljkirkerx23-May-12 10:04 
GeneralRe: Approach on getting rid of server side validation Pin
Fabio Franco23-May-12 10:19
professionalFabio Franco23-May-12 10:19 
GeneralRe: Approach on getting rid of server side validation Pin
jkirkerx23-May-12 11:44
professionaljkirkerx23-May-12 11:44 
GeneralRe: Approach on getting rid of server side validation Pin
Fabio Franco23-May-12 16:14
professionalFabio Franco23-May-12 16:14 
GeneralRe: Approach on getting rid of server side validation Pin
jkirkerx24-May-12 5:37
professionaljkirkerx24-May-12 5:37 
GeneralRe: Approach on getting rid of server side validation Pin
Fabio Franco24-May-12 8:32
professionalFabio Franco24-May-12 8:32 
AnswerRe: Approach on getting rid of server side validation Pin
vvashishta25-May-12 2:41
vvashishta25-May-12 2:41 
QuestionJavascript and code-behind button events Pin
MattFFunke22-May-12 6:13
MattFFunke22-May-12 6:13 
AnswerRe: Javascript and code-behind button events Pin
Raj589122-May-12 7:52
Raj589122-May-12 7:52 
GeneralRe: Javascript and code-behind button events Pin
MattFFunke22-May-12 8:03
MattFFunke22-May-12 8:03 
AnswerRe: Javascript and code-behind button events Pin
jkirkerx23-May-12 13:05
professionaljkirkerx23-May-12 13:05 
QuestionHow do I find control IDs on one page from another? Pin
sa4720k22-May-12 4:44
sa4720k22-May-12 4:44 
QuestionPopup Window Pin
Member 387988122-May-12 2:46
Member 387988122-May-12 2:46 
AnswerRe: Popup Window Pin
R. Giskard Reventlov22-May-12 6:27
R. Giskard Reventlov22-May-12 6:27 
AnswerRe: Popup Window Pin
vvashishta25-May-12 2:43
vvashishta25-May-12 2:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.