views:

259

answers:

3

In sense of separation tiers from each other,is it properly to use a datasource in the ASP web appliaction(presentation tier)?

A: 

I have seen checkists for architecture reviews. One item in those lists is to check for such "tier bypass" actions.

I would say it's not usually proper to allow such direct access. There are exceptions to every rule, but this is one that I would need much persuasion that it's necessary for such direct access.

djna
A: 

No, ideally in a n-tier application: your presentation layer should interact with your Business Logic Layer which in turn should interact with the DAL which will communcaiet with your data source, i.e:

Presentation Layer <---> Business Logic later <---> Data Access Layter <--> Database (data source)

Bhaskar
so how would you populate a gridview control ? with properly paging,sorting and filtering. the datasource is doing this all instead of you. i'd like to use one from telerik (radgridview)
you add some entity class and class collection which inherits from BinsingList<object> which you can bind it to any control (inlcuding gridview). The DAL can load the data in an entity class, which can be carried from DAL to presentation layer.
Bhaskar
what about if i nedd to populate the gridview with 300 000 racords ? Can't imagine to carry this amount of data.How would you do the paging ?
You plan instead to bring 300,000 records to the desktop?
djna
+1  A: 

Object DataSource, or possibly LINQ DataSource, could be used and arguably be called N-Tier.

But, direct access to the database via a SqlDataSource would not.

Mark Brackett