views:

60

answers:

2

Is it better to access data from within the web parent app and pass the necessary data to the control and back via properties, or pass a reference or url pointer (of webservice) to control and let it access the data for the fields it encompasses keeping in mind that the parent doesn't need to use the data anywhere else that the server control uses.

A: 

I think that usually it would be easier to manage the control by the app, but in some scenarios especially when you don't need the application to access the data you can just embed the control, e.g. when you want to embed an external video player etc. or some external web-part or other frame.

Shimmy
+1  A: 

The idea is you don't want the UI interacting with the db layer. So you abstract that data by creating a datalayer (basically a class which you can compile down to an assembly / dll). Your UI talks to the BLL which in turn talks to the DAL.

JonH
Well, yea I should have been more clear. The control wouldn't directly be accessing the data, there are other layers for that but my question was is it better to call the service from the web parent or from the control...does it really matter?
suedeuno