473,326 Members | 2,813 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,326 software developers and data experts.

Multi-tier ASP.net web application

Hi,
I've a question, regarding the multi-tier model of designing
applications. I'm programming a web-application (Little web-shop) in
VB.net for a project of the university and my question is the
following:

I have a table "Customer" in the database. Is it intelligent then, if
I'm creating (in the business logic) a VB class called Customer.vb,
which looks like the following:
Namespace Blogic
Public Class Customer
Dim _alias As String
Dim password As String
Dim companyname As String
Dim firstname As String
Dim lastname As String
Dim birthdate As String
Dim street As String
Dim city As String
Dim zipcode As String
Dim country As String
Dim contactTitle As String
Dim email As String
Dim phone As String

Public Sub New()
MyBase.new()
....
End Sub
....
....
End Class
End Namespace

The idea is every time i retrieve data about the customer, I create
objects out of that class, filled with the data from the database and I
pass this object then further to the Top-logic or UI logic??
Or would it be better just to pass the data in some kind of collection,
elaborated in the business logic?

Can someone give me suggestions, since I'm new to ASP.net

Thanks

Aug 11 '06 #1
5 1338
Really, it makes no difference what you're storing in the database. If you
analyze the problem, you realize that every database table contains columns
and rows, regardless of what you call it. What I'm getting at here, is that
it is the business rules, the requirements of you app that determine the
structure. It may be logical to create a "Customer" class, or it may not.
For example, if you want to create a tabular interface for working with
Customer records, the extra step of creating a Customer class would be
unnecessary. On the other hand, if you need to apply a lot of logic that
acts upon that data, treating it as a Customer (a human being or an
organization), a Customer class would probably be a good idea.

What you need to do is completely anaylyze the requirements and business
rules of your app, taking into account likely future enhancements and
changes, and design your structure accordingly.

--
HTH,

Kevin Spencer
Microsoft MVP
Chicken Salad Surgery

Orange you bland I stopped splaying bananas?
"kito" <ju****************@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
Hi,
I've a question, regarding the multi-tier model of designing
applications. I'm programming a web-application (Little web-shop) in
VB.net for a project of the university and my question is the
following:

I have a table "Customer" in the database. Is it intelligent then, if
I'm creating (in the business logic) a VB class called Customer.vb,
which looks like the following:
Namespace Blogic
Public Class Customer
Dim _alias As String
Dim password As String
Dim companyname As String
Dim firstname As String
Dim lastname As String
Dim birthdate As String
Dim street As String
Dim city As String
Dim zipcode As String
Dim country As String
Dim contactTitle As String
Dim email As String
Dim phone As String

Public Sub New()
MyBase.new()
....
End Sub
....
....
End Class
End Namespace

The idea is every time i retrieve data about the customer, I create
objects out of that class, filled with the data from the database and I
pass this object then further to the Top-logic or UI logic??
Or would it be better just to pass the data in some kind of collection,
elaborated in the business logic?

Can someone give me suggestions, since I'm new to ASP.net

Thanks

Aug 11 '06 #2
Yes, ok
thanks

Kevin Spencer wrote:
Really, it makes no difference what you're storing in the database. If you
analyze the problem, you realize that every database table contains columns
and rows, regardless of what you call it. What I'm getting at here, is that
it is the business rules, the requirements of you app that determine the
structure. It may be logical to create a "Customer" class, or it may not.
For example, if you want to create a tabular interface for working with
Customer records, the extra step of creating a Customer class would be
unnecessary. On the other hand, if you need to apply a lot of logic that
acts upon that data, treating it as a Customer (a human being or an
organization), a Customer class would probably be a good idea.

What you need to do is completely anaylyze the requirements and business
rules of your app, taking into account likely future enhancements and
changes, and design your structure accordingly.

--
HTH,

Kevin Spencer
Microsoft MVP
Chicken Salad Surgery

Orange you bland I stopped splaying bananas?
"kito" <ju****************@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
Hi,
I've a question, regarding the multi-tier model of designing
applications. I'm programming a web-application (Little web-shop) in
VB.net for a project of the university and my question is the
following:

I have a table "Customer" in the database. Is it intelligent then, if
I'm creating (in the business logic) a VB class called Customer.vb,
which looks like the following:
Namespace Blogic
Public Class Customer
Dim _alias As String
Dim password As String
Dim companyname As String
Dim firstname As String
Dim lastname As String
Dim birthdate As String
Dim street As String
Dim city As String
Dim zipcode As String
Dim country As String
Dim contactTitle As String
Dim email As String
Dim phone As String

Public Sub New()
MyBase.new()
....
End Sub
....
....
End Class
End Namespace

The idea is every time i retrieve data about the customer, I create
objects out of that class, filled with the data from the database and I
pass this object then further to the Top-logic or UI logic??
Or would it be better just to pass the data in some kind of collection,
elaborated in the business logic?

Can someone give me suggestions, since I'm new to ASP.net

Thanks
Aug 11 '06 #3
spaces.msn.com/sholliday/

I have a 1.1 and 2.0 "tiered development" example.

Should you create a Customer class? Most times, I'd say yes.
But if all you are doing is creating a web page, with a list of customers,
so you can click "Edit", than maybe not.

But anytime I program something professional or semi professional, I go with
the custom objects.

The articles at the blog reference a microsoft article, I'd find it and read
it.
It gives you the main stream way so handling info, and what it means.
Much better than I could explain in a newsgroup post.

Last comment:
"Rapid Development" is not the same thing as "Good Development" alot of
times.
So it depends on your motivation.
When I'm not less interested in "Rapid", I set up my custom objects.

With 2.0 and generic <List>'s , its alot easier, since I don't have to
create a CustomCollection : CollectionBase for every object I created.


"kito" <ju****************@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
Hi,
I've a question, regarding the multi-tier model of designing
applications. I'm programming a web-application (Little web-shop) in
VB.net for a project of the university and my question is the
following:

I have a table "Customer" in the database. Is it intelligent then, if
I'm creating (in the business logic) a VB class called Customer.vb,
which looks like the following:
Namespace Blogic
Public Class Customer
Dim _alias As String
Dim password As String
Dim companyname As String
Dim firstname As String
Dim lastname As String
Dim birthdate As String
Dim street As String
Dim city As String
Dim zipcode As String
Dim country As String
Dim contactTitle As String
Dim email As String
Dim phone As String

Public Sub New()
MyBase.new()
....
End Sub
....
....
End Class
End Namespace

The idea is every time i retrieve data about the customer, I create
objects out of that class, filled with the data from the database and I
pass this object then further to the Top-logic or UI logic??
Or would it be better just to pass the data in some kind of collection,
elaborated in the business logic?

Can someone give me suggestions, since I'm new to ASP.net

Thanks

Aug 11 '06 #4
Yes I normally also create objects for tables like Customers, Products
and so on...But since it is the first time I program a .NET ASP
application, I was not sure. What about memory...
Usually in Java applications, I created objects out of the database,
storing them in some Collection (Array-list) or so....depending which
object than was changed by my program, the object updated itself (with
some corresponding method) to the database. This worked quiet fine, but
I'm not sure if this is the right strategy for a web application.
I think it should be better not to load all data into memory...

thanks anyway sloan

sloan wrote:
spaces.msn.com/sholliday/

I have a 1.1 and 2.0 "tiered development" example.

Should you create a Customer class? Most times, I'd say yes.
But if all you are doing is creating a web page, with a list of customers,
so you can click "Edit", than maybe not.

But anytime I program something professional or semi professional, I go with
the custom objects.

The articles at the blog reference a microsoft article, I'd find it and read
it.
It gives you the main stream way so handling info, and what it means.
Much better than I could explain in a newsgroup post.

Last comment:
"Rapid Development" is not the same thing as "Good Development" alot of
times.
So it depends on your motivation.
When I'm not less interested in "Rapid", I set up my custom objects.

With 2.0 and generic <List>'s , its alot easier, since I don't have to
create a CustomCollection : CollectionBase for every object I created.


"kito" <ju****************@gmail.comwrote in message
news:11**********************@h48g2000cwc.googlegr oups.com...
Hi,
I've a question, regarding the multi-tier model of designing
applications. I'm programming a web-application (Little web-shop) in
VB.net for a project of the university and my question is the
following:

I have a table "Customer" in the database. Is it intelligent then, if
I'm creating (in the business logic) a VB class called Customer.vb,
which looks like the following:
Namespace Blogic
Public Class Customer
Dim _alias As String
Dim password As String
Dim companyname As String
Dim firstname As String
Dim lastname As String
Dim birthdate As String
Dim street As String
Dim city As String
Dim zipcode As String
Dim country As String
Dim contactTitle As String
Dim email As String
Dim phone As String

Public Sub New()
MyBase.new()
....
End Sub
....
....
End Class
End Namespace

The idea is every time i retrieve data about the customer, I create
objects out of that class, filled with the data from the database and I
pass this object then further to the Top-logic or UI logic??
Or would it be better just to pass the data in some kind of collection,
elaborated in the business logic?

Can someone give me suggestions, since I'm new to ASP.net

Thanks
Aug 12 '06 #5
greetings kito,

whtever u were trying to develop, you should first search for n-layer
net applications at google or msdn.

Sharing makes All the Difference

--
Sent via .NET Newsgroups
http://www.dotnetnewsgroups.com
Aug 12 '06 #6

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

Similar topics

37
by: ajikoe | last post by:
Hello, Is anyone has experiance in running python code to run multi thread parallel in multi processor. Is it possible ? Can python manage which cpu shoud do every thread? Sincerely Yours,...
4
by: Frank Jona | last post by:
Intellisense with C# and a multi-file assembly is not working. With VB.NET it is working. Is there a fix availible? We're using VisualStudio 2003 Regards Frank
12
by: * ProteanThread * | last post by:
but depends upon the clique: ...
0
by: frankenberry | last post by:
I have multi-page tiff files. I need to extract individual frames from the multi-page tiffs and save them as single-page tiffs. 95% of the time I receive multi-page tiffs containing 1 or more black...
6
by: cody | last post by:
What are multi file assemblies good for? What are the advantages of using multiple assemblies (A.DLL+B.DLL) vs. a single multi file assembly (A.DLL+A.NETMODULE)?
6
by: Joe | last post by:
I have 2 multi-list boxes, 1 displays course categories based on a table called CATEGORIES. This table has 2 fields CATEGORY_ID, CATEGORY_NAME The other multi-list box displays courses based on...
4
by: mimmo | last post by:
Hi! I should convert the accented letters of a string in the correspondent letters not accented. But when I compile with -Wall it give me: warning: multi-character character constant Do the...
5
by: dkelly925 | last post by:
Is there a way to add an If Statement to the following code so if data in a field equals "x" it will launch one report and if it equals "y" it would open another report. Anyone know how to modify...
0
by: Sabri.Pllana | last post by:
We apologize if you receive multiple copies of this call for papers. *********************************************************************** 2008 International Workshop on Multi-Core Computing...
1
by: mknoll217 | last post by:
I am recieving this error from my code: The multi-part identifier "PAR.UniqueID" could not be bound. The multi-part identifier "Salary.UniqueID" could not be bound. The multi-part identifier...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.