PC Review


Reply
Thread Tools Rate Thread

Bouncing Tiers

 
 
Freaky Coder
Guest
Posts: n/a
 
      24th Aug 2003
Can anyone tell me if I'm insane or not?

I have a problem where I have a data tier where every class represents a
table, and a class can have properties which are object of another class.
For instance:
Data.Car.Driver ' A Driver class
Data.Car.Passengers ' A Passenger collection class

The problem is, if I then have a business layer that inherits from the data
layer, and I then use the business layer in my UI, the object namespaces can
get out of whack, for instance:
Business.Car.Driver ' Driver comes back as Data.Car.Drvier, because the
implementation code says to return a data driver class.

Now, there's not much I can do about that. So I came up with this idea:
The UI uses the Data objects, which inherits from the Business objects (the
opposite of before). So now in my Data code when I want a property that
isn't an object, say Data.Car.VIN the code looks something like this:
Public Property VIN() As String
Get
' Database implementation code
' Gets the data from the database
' Hands it to the Base (Business) which does its magic
Return(MyBase.VIN)
End Get
Set (ByVal Value As String)
MyBase.VIN = Value
' Database implementation code
End Set
End Property

So basically the DAL gets the data first then hands it off to the Business
which does what it needs to do, then that data goes back to the DAL and
either inserts/updates or outputs. Hence why I call it "Bouncing Tiers".

Now does anyone have a problem with this? I'm very interested in hearing
anyone's opinion.

Horribly Frustrated


 
Reply With Quote
 
 
 
 
Fergus Cooney
Guest
Posts: n/a
 
      24th Aug 2003
Hi Freaky

You said
|| Business.Car.Driver ' Driver comes back as Data.Car.Drvier,
because the
|| implementation code says to return a data driver class.

I don't understand the problem yet, can you show us some code?
Maybe we can then dry those tiers of frustration.

Regards,
Fergus

ps. If you can still ask the question, you're probably not insane. But you
are a little freaky, lol.


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tiers =?Utf-8?B?TWlrZSBD?= Microsoft Access Queries 3 18th Jun 2005 07:29 AM
middle tiers for .net =?Utf-8?B?a2Vu?= Microsoft ASP .NET 1 4th Jun 2004 09:58 PM
3-tiers of vb.net =?Utf-8?B?a2Vu?= Microsoft Dot NET Framework Forms 2 3rd Jun 2004 05:50 AM
Tiers? Jacob Pedersen Microsoft ASP .NET 2 22nd Mar 2004 02:33 PM
Creating Value Tiers Dave Microsoft Access Queries 8 21st Jan 2004 03:38 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:40 AM.