473,320 Members | 2,112 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,320 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 1258
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: eMKa | last post by:
Hi Code guru's I have created a user control which has access, and thus makes use of a shared singleton class like: Dim MyAppSettings As DLAppSettings = DLAppSettings.GetAppSettings This...
13
by: Bryan Parkoff | last post by:
I have created three classes according to my own design. First class is called CMain. It is the Top Class. Second class and third class are called CMemory and CMPU. They are the sub-classes....
5
by: Don Vaillancourt | last post by:
Hello all, Over the years as I design more database schemas the more I come up with patterns in database design. The more patterns I recognize the more I want to try to design some kind of...
1
by: E.U. | last post by:
Hi, I an using MS-Access in order to build a site. I have this item that can have upto 10 pictures (might have none) I want to design a dynamic table which has the ID of the item at the first...
7
by: Shimon Sim | last post by:
I have a custom composite control I have following property
2
by: Carlo Stonebanks | last post by:
I have the infamous GoF Design Patterns boo - it's been sittin gon my shelf for years. I have a huge reading list and find this book a rather dry read and am always putting it off. I have...
5
by: macca | last post by:
Hi, I'm looking for a good book on PHP design patterns for a OOP beginner - Reccommendations please? Thanks Paul
1
by: Tim | last post by:
Dear All, In my opinion, there are so many possible designs for a project, even small up to a class. How can I know which one is better? Is there any important point I should consider in the...
4
by: Ken Fine | last post by:
I've been living with a frustrating issue with VS.NET for some months now and I need to figure out what the problem is. Hopefully someone has run into the same issue and can suggest a fix. I...
7
by: Immortal Nephi | last post by:
I have an idea how to design an object in a better way. I would like to give you my thought example. Please let me know what you think if it is best object design. Please recommend me any book...
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...
1
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...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
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...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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

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.