Click here to Skip to main content
15,891,905 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need to design a winform application for personal data management.

It has 10 winform forms starting from login form to Permanent address dialog, Temporary address dialog, Vehicle details dialog1, Vehicle details dialog2, Travel expence dialog, Misc expence dialog etc.

So from each dialog window i am giving provision to go 'Back' and 'Next' navigation.

Each dialog contains almost 10 to 15 fields.

I would like to know which is the best design pattern i can use here and why?

What I have tried:

What i have tried is whenever user navigate, current form i am saving as a blob and in the initialize function of the each dialog i am populating the fields by reading the respective blob.
Posted
Updated 20-Oct-16 0:10am
v2

I think your approach resembles the Memento[^] design pattern and, in my opinoin, is correct.
 
Share this answer
 
Comments
code4Better 20-Oct-16 7:00am    
Thanks much Pallani.
CPallini 20-Oct-16 8:06am    
You are welcome.
Your idea sounds like you are a beginner - why not give some time in understanding different patterns first - best is to go with the trend because you will find more examples - so in your case I would guess data-binding and updating is the important thing. So I'd use a MVVM pattern The MVVM Pattern[^] and WPF as Client Technology, maybe a UniversalApp? You will find tons of samples for these techs: GitHub - Microsoft/Windows-universal-samples: API samples for the Universal Windows Platform.[^]
or
https://github.com/Microsoft/WPF-Samples
 
Share this answer
 
Comments
code4Better 20-Oct-16 6:34am    
Johan, Thanks for your response. Mine is a winform application not WPF
johannesnestler 20-Oct-16 6:46am    
pattern is can be the same for winforms - just a little more work to implement... I like to use it, because undo-/redo can be centralized quite easy. but have a look what CPallini recommendet...
code4Better 20-Oct-16 6:56am    
Sure Johan, Thanks

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900