473,395 Members | 1,456 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,395 software developers and data experts.

Inherit a class only with Enum Values

I have 3 layers.

First - UI Layer (Windows Application - Thick Client)
Second - Biz Layer (DLL)
Third - Messaging Layer (DLL)

The Messaging Layer is referenced in Biz Layer and Biz Layer is reference in
UI Layer.

I have one class called "MessageValueEnum" in the Messaging layer which
contains arround 20 sets of Enum values. I would like to access these enum
values both in the Biz Layer and UI Layer.

Since the Messaging layer is referenced in Biz layer, I am able to use
Imports and acces all the enum values in "MessageValueEnum". But I am not
able to access this Enum valeus in the UI Layer. Can you please help me out
in telling me the best way of accessing Enum Values in UI Layer.

Thanks and Regards,

Peri
Jan 11 '08 #1
3 1492
On Jan 10, 10:48*pm, "Peri" <p...@CSPL.comwrote:
I have 3 layers.

First - UI Layer (Windows Application - Thick Client)
Second - Biz Layer (DLL)
Third - Messaging Layer (DLL)

The Messaging Layer is referenced in Biz Layer and Biz Layer is reference in
UI Layer.

I have one class called "MessageValueEnum" in the Messaging layer which
contains arround 20 sets of Enum values. I would like to access these enum
values both in the Biz Layer and UI Layer.

Since the Messaging layer is referenced in Biz layer, I am able to use
Imports and acces all the enum values in "MessageValueEnum". But I am not
able to access this Enum valeus in the UI Layer. Can you please help me out
in telling me the best way of accessing Enum Values in UI Layer.

Thanks and Regards,

Peri
Create a separate dll that contains the objects that you want the biz
and ui layers to access, and then reference it from both... i
commonly do something like:

myapp.exe
mybizlayer.dll
mydatalayer.dll
mydataobjects.dll

My data objects is often referenced by myapp, mybizlayer, and
mydatalayer, because those data objects have to pass between all three
layers.

--
Tom Shelton
Jan 11 '08 #2
Thanks Tom, But is there any other better solution to this?

"Tom Shelton" <to*********@comcast.netwrote in message
news:7e**********************************@c23g2000 hsa.googlegroups.com...
On Jan 10, 10:48 pm, "Peri" <p...@CSPL.comwrote:
I have 3 layers.

First - UI Layer (Windows Application - Thick Client)
Second - Biz Layer (DLL)
Third - Messaging Layer (DLL)

The Messaging Layer is referenced in Biz Layer and Biz Layer is reference
in
UI Layer.

I have one class called "MessageValueEnum" in the Messaging layer which
contains arround 20 sets of Enum values. I would like to access these enum
values both in the Biz Layer and UI Layer.

Since the Messaging layer is referenced in Biz layer, I am able to use
Imports and acces all the enum values in "MessageValueEnum". But I am not
able to access this Enum valeus in the UI Layer. Can you please help me
out
in telling me the best way of accessing Enum Values in UI Layer.

Thanks and Regards,

Peri
Create a separate dll that contains the objects that you want the biz
and ui layers to access, and then reference it from both... i
commonly do something like:

myapp.exe
mybizlayer.dll
mydatalayer.dll
mydataobjects.dll

My data objects is often referenced by myapp, mybizlayer, and
mydatalayer, because those data objects have to pass between all three
layers.

--
Tom Shelton
Jan 11 '08 #3
Better in what respect? I believe it to be common to use this approach
across tiers.

"Peri" wrote:
Thanks Tom, But is there any other better solution to this?

"Tom Shelton" <to*********@comcast.netwrote in message
news:7e**********************************@c23g2000 hsa.googlegroups.com...
On Jan 10, 10:48 pm, "Peri" <p...@CSPL.comwrote:
I have 3 layers.

First - UI Layer (Windows Application - Thick Client)
Second - Biz Layer (DLL)
Third - Messaging Layer (DLL)

The Messaging Layer is referenced in Biz Layer and Biz Layer is reference
in
UI Layer.

I have one class called "MessageValueEnum" in the Messaging layer which
contains arround 20 sets of Enum values. I would like to access these enum
values both in the Biz Layer and UI Layer.

Since the Messaging layer is referenced in Biz layer, I am able to use
Imports and acces all the enum values in "MessageValueEnum". But I am not
able to access this Enum valeus in the UI Layer. Can you please help me
out
in telling me the best way of accessing Enum Values in UI Layer.

Thanks and Regards,

Peri

Create a separate dll that contains the objects that you want the biz
and ui layers to access, and then reference it from both... i
commonly do something like:

myapp.exe
mybizlayer.dll
mydatalayer.dll
mydataobjects.dll

My data objects is often referenced by myapp, mybizlayer, and
mydatalayer, because those data objects have to pass between all three
layers.

--
Tom Shelton
Jan 11 '08 #4

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

Similar topics

3
by: Waqas Pitafi | last post by:
Hi, I have a table with the data like this, ID Status Description 1 R Read 2 U UnRead D D ...
10
by: Chiller | last post by:
Ok, this is a continuation of a problem I posted on an earlier thread. I've started another thread because my problem has progressed from the initial constructor problem into a general method...
5
by: Ernst Murnleitner | last post by:
Hello, is it possible to derive from std::vector and derive also its iterator? If I do it like in the example below, I get a problem when I need the begin of the vector: begin() returns the...
0
by: Brian Riis | last post by:
This all pertains to the above mentioned article. Anyone want to read it (it's rather neat, actually), here's the address: http://www.cuj.com/documents/s=8205/cujweb0305meynard/ Anyway, I was...
0
by: keith bannister via .NET 247 | last post by:
(Type your message here) -------------------------------- From: keith bannister Hi, I'm new to .net (as of last week) but here goes. I want to serialize/deserialize a file the conforms...
5
by: Keith Bannister | last post by:
I'm new to .net so here goes. I'm tying to deserialize a class that is associated with an XML schema. I created the C# class with xsd.exe as below: xsd.exe /c /n:somenamespace...
2
by: Dave Wurtz | last post by:
All, Is there anyway to inherit from an Enum and/or to add items to them outside of the Enum statement? Public Class Class1 Public Enum Test Value1 = 1 Value 2 = 2 End Enum
12
by: Mark Fink | last post by:
I wrote a Jython class that inherits from a Java class and (thats the plan) overrides one method. Everything should stay the same. If I run this nothing happens whereas if I run the Java class it...
2
by: RJ | last post by:
I was hoping to code a base class that would somehow require inheriting classes to define an Enum. Each inheriting child class needs to define it's own enum with it's own enumerated values, which...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.