Last post Nov 30, 2014 06:27 PM by jammycakes
Nov 30, 2014 04:04 AM|bsurendiran|LINK
We are doing a data cleansing application and we need approach
The user of the application will validate the data and move the data to another level for approval.
Lets say we have a table tblProductDetails which has more than 20 columns among the 20 columns there is one column 'Status'. and the table may have huge volume of records.
The allowed values for Status column are
The application will consume a WCF Service. The WCF Service will in turn return the data (tblProductDetail) from the sql server.
The RadGrid (Telerik Control) will be binded with the data returned by the WCF Service.
The user of the application will modify the data (rows) and assign the Status of each column based on data.
After modifying the data the user will click on the Save button which will validate each and every records whether the records are valid or not based on some conditions.
Valid records alone will be saved in the tblProductDetails and invalid records remain in the Grid with the status "Invalid" . And we will be inserting the invalid records (only the invalid columns) into a tblValidation table. After binding the records back
to the Grid we will showing a Clickhere link button column for each and every record . On click on the Clickhere button it will be show a popup which will show the invalid columns so that the user will know what are the columns need to be modified in the
Grid. After modification the user will click on the save button again the validation will happen if the records are valid then it will be save in the tblProductDetails and invalid records will following the same cycle as mentioned above.
Need an approach in doing the following :-
Where to do the validation whether in the ASP.NET Application (or) in the WCF Service or in the Database
Nov 30, 2014 06:27 PM|jammycakes|LINK
My big question here is: why is your application consuming a WCF service? Is it something that needs to be consumed by other applications as well or is it just that you're putting your layers onto separate tiers?
In the former case, whether you put validation in the application or in the WCF service will depend on whether your validation code needs to be used by the other applications or not. Putting it in the application will improve performance since it reduces
calls to the service, but it wouldn't be reusable by the other applications.
If you're trying to put your layers into separate tiers, on the other hand, you're almost certainly over-engineering your solution. Don't distribute your application unless you have a valid business or performance reason for doing so. Keep it all on one
server if you can.