473,388 Members | 1,342 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

help designing my classes

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?

would this design also be automatically suitable for remoting?

general suggestions are also welcomed.

thanks,
rodchar
Oct 5 '07 #1
2 1043
"rodchar" <ro*****@discussions.microsoft.comwrote in message
news:EA**********************************@microsof t.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
Oct 5 '07 #2
thank you for the discernment.
rod.

"Anthony Jones" wrote:
"rodchar" <ro*****@discussions.microsoft.comwrote in message
news:EA**********************************@microsof t.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
Oct 11 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: E G | last post by:
Hi! I am having problems in designing a class. First, I have a base class that allocates a 3D data set and allows some other mathematical operations with it, something like this: template...
3
by: alexhong2001 | last post by:
When design a class, should always make it "derivable" as a base class? Is there really a situation that the designed class not "derivable"? When should make a member "protected"? Only when...
2
by: Jackson Yap | last post by:
can someone kind enough to help me look at the attached html and js file? Why is it that the javascript menu could not work at www.apchosting.net but could work at...
8
by: John Hardin | last post by:
All: The syntax for overloading the "+" and other simple binary math operators is pretty straightforward, but I can't seem to wrap my brain around the idea that overloading the "+" operator...
3
by: Mark | last post by:
I've been writing code in VB and VBScript for several years and I'm finally caving in to .net! I've decided to work with C# as I've always understood the basic concepts of C/C++ but never gained...
8
by: cmay | last post by:
I am looking for something to help me with documenting / planning / designing my asp.net applications. Once in a while I try doing some UML in Visio, but it really feels like overkill, espically...
12
by: Don Huan | last post by:
Hi my job is to migrate our WinForms application to ASP.NET. This app was build very modular so every peace of code can be replaced by another "modul". There are 1 VS-solution with about 60...
1
by: slonocode | last post by:
I'm wondering if there are certain processes that I could follow to learn to design better classes? Where could I find these processes? Is designing classes more of an art that comes from...
0
by: Julia Beresford | last post by:
Hi I have a VB .NET class library with classes and collection classes (classes that implement ICollection) that allow a client to read and write data to and from an SQL database. For example if...
2
by: sck10 | last post by:
Hello, I created a class (public class General) with the following. My question is, is this good practice to have a group of methods(?) in one class, or should I have a separate class for each...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.