473,509 Members | 2,763 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1265
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
1902
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
2352
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
674
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
2390
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
2972
by: Shimon Sim | last post by:
I have a custom composite control I have following property
2
2594
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
2724
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
1366
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
2446
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
1708
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
7233
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
7135
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
7410
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...
1
7067
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
7505
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...
0
5650
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,...
0
4729
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3201
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1570
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 ...

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.