
 Rank: Guest Groups: Guest
Joined: 9/17/2007 Posts: 11,670 Points: -1,200
|
Date parsed: 05/10/2007 16:11:34 Date: Fri, 5 Oct 2007 15:11:34 +0100
"rodchar" <rodchar@discussions.microsoft.com> wrote in message news:EA9B0E2D-AD50-4485-9988-41FBBDD5CF1F@microsoft.com... > hey all, > i have a very simple asp.net application and i'm trying to decide where my > methods should reside in an n-tier context. > > i have 2 classes: > BusinessLayer.cs > DataAccess.cs > > all the application does is it goes to a database to populate my datatable > and then i dynamically populate an html table from that. > > so far, i pass the html table to the businesslayer class which then gets > dynamically populated by a data table. the data table was populated thru the > dataaccess class. all the methods are static. > > i could not decide whether the methods that dynamically populate the html > table should go in the ui layer, business layer, or data layer?
Since the purpose of HTML is to describe how data should be presented then HTML belongs in the UI layer. Your business object shouldn't have any clue about HTML.
> > would this design also be automatically suitable for remoting? > > general suggestions are also welcomed. >
Another option is to take XML from the Business layer (this could be the XML that underpins a strongly typed dataset) into the UI layer which uses XSL to transform to html.
-- Anthony Jones - MVP ASP/ASP.NET
|