Click here to Skip to main content
15,923,006 members
Home / Discussions / Web Development
   

Web Development

 
QuestionIssues in Cyrstal Report for VS 2005+Atlas Pin
skannapiran10-Oct-06 1:23
skannapiran10-Oct-06 1:23 
QuestionAuthentication in asp vbscript Pin
krishna1910-Oct-06 0:33
krishna1910-Oct-06 0:33 
AnswerRe: Authentication in asp vbscript Pin
Ish Kapila10-Oct-06 20:02
Ish Kapila10-Oct-06 20:02 
NewsPhoto album Integrated with Gooogle Maps ! Pin
ashish_patil++9-Oct-06 23:10
ashish_patil++9-Oct-06 23:10 
QuestionSSL Certificates Pin
g00fyman9-Oct-06 22:55
g00fyman9-Oct-06 22:55 
QuestionBest practice? (SQLCommand and Web Services) Pin
User 18952979-Oct-06 2:58
User 18952979-Oct-06 2:58 
AnswerRe: Best practice? (SQLCommand and Web Services) Pin
Colin Angus Mackay9-Oct-06 3:11
Colin Angus Mackay9-Oct-06 3:11 
GeneralRe: Best practice? (SQLCommand and Web Services) Pin
stupiddumbguy9-Oct-06 5:15
stupiddumbguy9-Oct-06 5:15 
I agree partially with Colin. Allowing raw sql from the internet is effectively granting hackers full control to your database. But accessing data for your application through a narrow set of specially secured stored procedures isn't any better. I consider this a false sense of security.

Enforcing security in your application by applying additional security requirements does not make your application secure. If anything, it's worse because the surface of your application is wider. Any mistake in security requirements and the hackers are in. There are stored-procedures that can execute command-line scripts, register linked databases with external IP addresses -- how do you convince your boss / client that you've hardened everything? Your application should be secure by design.

The best practice is to expose your data as a service or "end-point". While you could use stored-procedures to access your data, but it means that the client application has to know these values. This might be a valid approach if you only have to worry about a single client such as web-application, but if you have a win-form application, third party, console script or any other service-oriented application then this isn't very portable. Ideally, your client-application shouldn't have any details about where the data comes from.

This level of transparency is especially true for winforms applications. If you suddenly need to version or replace parts of your database you run the risk of compatibility problems with your client-applications, forcing you to redeploy a new version. If you don't control who installs your application, this means you have to version this complexity indefiniately! Ideally, if the client has no knowledge of the back-end implementation, you should be able to swap out or replace your back-end systems (ie, move from a database to a xml file) without breaking that dependency on the client side.

Fundamentally, from a best-practice perspective, I see there are two approaches to exposing this data.

1) A "command" strategy. You create a single service that acts as a gateway into your database. You don't pass stored-procedures, you pass an object which represents a command. This still requires that your clients know the names or types of commands to execute, but it creates that transparency of the back-end that you need.

2) Data Access Layer as a Service. Create wrappers around all your stored-procedures to represent their line of business data functions. For example, a ProductGateway class would perform all product related database functions. If your application has additional security or session requirements, create wrappers around those classes to act as application functionality, such as a ProductManager, which speaks to the ProductGateway on your behalf.






GeneralRe: Best practice? (SQLCommand and Web Services) Pin
Colin Angus Mackay9-Oct-06 5:36
Colin Angus Mackay9-Oct-06 5:36 
GeneralRe: Best practice? (SQLCommand and Web Services) Pin
stupiddumbguy9-Oct-06 9:19
stupiddumbguy9-Oct-06 9:19 
AnswerRe: Best practice? (SQLCommand and Web Services) Pin
g00fyman10-Oct-06 4:48
g00fyman10-Oct-06 4:48 
QuestionDisable save as and print button of ie Pin
Kunal B Padia9-Oct-06 2:21
Kunal B Padia9-Oct-06 2:21 
AnswerRe: Disable save as and print button of ie Pin
Colin Angus Mackay9-Oct-06 5:38
Colin Angus Mackay9-Oct-06 5:38 
GeneralRe: Disable save as and print button of ie Pin
g00fyman10-Oct-06 4:58
g00fyman10-Oct-06 4:58 
QuestionViewState for Checkbox Enabled Property after AJAX function Pin
Mahaprabhu9-Oct-06 1:24
Mahaprabhu9-Oct-06 1:24 
QuestionRecommend a good host Pin
Rohde8-Oct-06 22:44
Rohde8-Oct-06 22:44 
AnswerRe: Recommend a good host Pin
JUNEYT8-Oct-06 23:35
JUNEYT8-Oct-06 23:35 
Questionunable to connect to remote server Pin
Alaa' Al Atrash8-Oct-06 22:37
Alaa' Al Atrash8-Oct-06 22:37 
QuestionGet value from function and put in textbox Pin
Ish Kapila8-Oct-06 20:15
Ish Kapila8-Oct-06 20:15 
AnswerRe: Get value from function and put in textbox Pin
JUNEYT8-Oct-06 23:40
JUNEYT8-Oct-06 23:40 
GeneralRe: Get value from function and put in textbox Pin
Ish Kapila9-Oct-06 1:29
Ish Kapila9-Oct-06 1:29 
GeneralRe: Get value from function and put in textbox Pin
JUNEYT9-Oct-06 1:40
JUNEYT9-Oct-06 1:40 
GeneralRe: Get value from function and put in textbox Pin
Ish Kapila9-Oct-06 18:00
Ish Kapila9-Oct-06 18:00 
GeneralOkay I have fixed the code for you Pin
JUNEYT9-Oct-06 22:07
JUNEYT9-Oct-06 22:07 
QuestionWebservice related query Pin
biaali8-Oct-06 0:29
biaali8-Oct-06 0:29 

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.