471,091 Members | 1,547 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Design Help Please

Hi,

I am currently working on an winforms client app. It has three main forms
for user input. I am having trouble with a good design for persisting the
user input. The user input will be used through out the program for some
calculations and eventually will be saved to file. Right now my design is
to have a controller/process class for each UI form. Also, I want the file
to be an xml file. So, should I just create a container class with
properties for all the user input and just pass the user data? If I have
one class it would be easier to create the file since I can use .Net
serialization. Or should I seperate the user input by the forms? I am just
trying to come up with a design that will allow me to easily save the data
to file and also be easy to get the user input throughout the program. Any
ideas would be great.

Thanks

Thanks
Jul 21 '05 #1
1 1192
Tom
Hi Jack,
I don't profess to be a theoritician on this sort of thing, but for what
it's worth, here's my gut reaction about how to organize your design.

Create classes that correspond to the natural organization of the data. Let
the various forms be the editors of those classes, but don't force the forms
to correspond exactly with each class. I'd create controls that *are*
designed for collecting information associated with each class and use them
to construct your forms. You may want to have the underlying classes raise
changed events and have the editor controls designed to update themselves
when the underlying data changes. This is particularly useful when your
application gets complex and data is rendered and edited in multiple places.

There's nothing to prevent you from using .NET Serialization with the data
classes, so long as you have one that contains (directly or not) the others.
Just make sure they are serializable.

Tom Clement
Apptero, Inc.
"Jack S" <no****@aol.com> wrote in message
news:ep**************@TK2MSFTNGP10.phx.gbl...
Hi,

I am currently working on an winforms client app. It has three main forms
for user input. I am having trouble with a good design for persisting the
user input. The user input will be used through out the program for some
calculations and eventually will be saved to file. Right now my design is
to have a controller/process class for each UI form. Also, I want the file to be an xml file. So, should I just create a container class with
properties for all the user input and just pass the user data? If I have
one class it would be easier to create the file since I can use .Net
serialization. Or should I seperate the user input by the forms? I am just trying to come up with a design that will allow me to easily save the data
to file and also be easy to get the user input throughout the program. Any
ideas would be great.

Thanks

Thanks

Jul 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

13 posts views Thread by Bryan Parkoff | last post: by
5 posts views Thread by Don Vaillancourt | last post: by
7 posts views Thread by Immortal Nephi | last post: by

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.