473,394 Members | 1,706 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,394 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
Nov 15 '05 #1
1 921
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

Nov 15 '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:
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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
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
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
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.