473,488 Members | 2,516 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

whether a dictionary property for data holder business object is goodor not?

hi,

yet another design question, this one is more simple and maybe a
little silly.

When it comes to classes like

class Person{
string Name;
string Address;
int Age;
....
}

They have a bunch of data holding properties, and properties that
could change over time, I read somewhere that a dictionary would be a
good thing to replace properties like this, so would a dictionary be
better?
A bad thing would be that properties would turn out to be strings! Is
that ok?

More importantly, would this help me bind my properties easily when it
comes to making long annoying forms with a control for each property
that must be validated. Is there a good design to automate
validation,updating the right property in the business object and
saving it.
Thanks so much

Gideon

Oct 1 '08 #1
4 1004
On Oct 1, 10:35 am, giddy <gidisr...@gmail.comwrote:
hi,

yet another design question, this one is more simple and maybe a
little silly.

When it comes to classes like

class Person{
string Name;
string Address;
int Age;
....

}

They have a bunch of data holding properties, and properties that
could change over time, I read somewhere that a dictionary would be a
good thing to replace properties like this, so would a dictionary be
better?
A bad thing would be that properties would turn out to be strings! Is
that ok?

More importantly, would this help me bind my properties easily when it
comes to making long annoying forms with a control for each property
that must be validated. Is there a good design to automate
validation,updating the right property in the business object and
saving it.

Thanks so much

Gideon
If they are replaced very often yes, a dictionary is a good idea.

I find weird though that a class Person change that often, it might
indicate a bad design
Oct 1 '08 #2
If they are replaced very often yes, a dictionary is a good idea.

I find weird though that a class Person change that often, it might
indicate a bad design
hmm, but there are properties like
PuposeOfVisit, Country of Birth, State Of Birth, and a bunch of other
details that the marketing guys could maybe benefit from??

But more or less they're all just "Data" about the user more than
properties.

Thanks
Gideon
Oct 1 '08 #3
On Oct 1, 11:25 am, giddy <gidisr...@gmail.comwrote:
If they are replaced very often yes, a dictionary is a good idea.
I find weird though that a class Person change that often, it might
indicate a bad design

hmm, but there are properties like
PuposeOfVisit, Country of Birth, State Of Birth, and a bunch of other
details that the marketing guys could maybe benefit from??

But more or less they're all just "Data" about the user more than
properties.

Thanks
Gideon
our system has something like that, user Defined Fields. Basically
they are stored and treated as a dictionary.
As you saw it's more challanged to create a form to display them. you
have to design he form to allow it to have an unknown number of fields.
Oct 2 '08 #4
"Ignacio Machin ( .NET/ C# MVP )" <ig************@gmail.comwrote in
message
news:9b**********************************@y71g2000 hsa.googlegroups.com...
>hmm, but there are properties like
PuposeOfVisit, Country of Birth, State Of Birth, and a bunch of other
details that the marketing guys could maybe benefit from??

But more or less they're all just "Data" about the user more than
properties.

Thanks
Gideon

our system has something like that, user Defined Fields. Basically
they are stored and treated as a dictionary.
As you saw it's more challanged to create a form to display them. you
have to design he form to allow it to have an unknown number of fields.
Grids are very handy for that.
Oct 2 '08 #5

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

Similar topics

2
2218
by: | last post by:
Ive created an ASP class that uses a dictionary object which is filled from a recordset. It passes the object to the propterty of another ASP class byref: Public Property Let dicReplaceVars(byref...
11
12707
by: Aaron Queenan | last post by:
Given the classes: class Class { public static implicit operator int(Class c) { return 0; } } class Holder
1
9237
by: john wright | last post by:
I have a dictionary oject I created and I want to bind a listbox to it. I am including the code for the dictionary object. Here is the error I am getting: "System.Exception: Complex...
18
14948
by: Rune B | last post by:
Hi Group I was considering using a Generic Dictionary<> as a value container inside my business objects, for the reason of keeping track of fields changed or added and so on. - But how...
15
2021
by: Lauren Wilson | last post by:
Owning your ideas: An essential tool for freedom By Daniel Son Thinking about going into business? Have an idea that you think will change the world? What if you were told that there was no way...
4
14655
by: NullQwerty | last post by:
Hi folks, I have a Dictionary which contains a string key and an object value. I want the object value to point to a property in my class and I want it to be by reference, so that later on I...
14
14601
by: Rolf Welskes | last post by:
Hello, I have an ObjectDataSource which has as business-object a simple array of strings. No problem. I have an own (custom) control to which I give the DataSourceId and in the custom-control...
1
4155
by: GVDC | last post by:
Example server-side JavaScript Web script, Dictionary class //Dictionary class, hash array unlimited length configurable speed/efficiency // printf("<html><body>"); printf("<b>Creating...
2
3202
by: =?Utf-8?B?anAybXNmdA==?= | last post by:
I'm pulling records from or database by dates, and there are multiple records for each part number. The part numbers are being stored as strings in a List in a custom Employee class: ...
0
6967
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
7142
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,...
1
6847
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...
0
5445
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4875
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
3078
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1383
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
618
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
272
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.