hzwang wrote:
I am not sure if this has been discussed but I didn't find by searching the forum. I know this has been discussed extensively about WebApps. If it is please point me to the discuss.
There has been a discussion on the forms. I think it's called "Best Practicies for WinForms"
hzwang wrote:
I just get a WinForm project and it should be simplier as I thought given it's a single user environment. However, a closer look shows there are many different issues to be worried about:
1. How any sessions should I have?
I guess it depends on the type of application. In my MDI application, each child form has its own session.
hzwang wrote:
2. How long a session should be kept alive?
The session stays alive as long as the form is loaded.
hzwang wrote:
3. When should I clear/flush a session?
The session is flushed when the user saves the form.
hzwang wrote:
4. How transaction should be controled?
I only use a transaction around the save operation. So if any errors occur during save, they are all rolled back.
hzwang wrote:
Therefore, is there any architecture best practice round?
Not sure if any of this is "best practice" but it seems to be working for me.