Click here to Skip to main content
15,924,507 members
Home / Discussions / Windows Forms
   

Windows Forms

 
QuestionA dumb question about writing to a text file Pin
Alan Burkhart22-Feb-09 11:06
Alan Burkhart22-Feb-09 11:06 
AnswerRe: A dumb question about writing to a text file Pin
Alan N22-Feb-09 12:16
Alan N22-Feb-09 12:16 
GeneralRe: A dumb question about writing to a text file Pin
Alan Burkhart22-Feb-09 13:57
Alan Burkhart22-Feb-09 13:57 
AnswerRe: A dumb question about writing to a text file Pin
Member 87970025-Feb-09 10:50
Member 87970025-Feb-09 10:50 
QuestionPresentation Model - Winforms Pin
erikash22-Feb-09 4:43
erikash22-Feb-09 4:43 
AnswerRe: Presentation Model - Winforms Pin
Trooks26-Feb-09 3:15
Trooks26-Feb-09 3:15 
GeneralRe: Presentation Model - Winforms Pin
erikash1-Mar-09 1:51
erikash1-Mar-09 1:51 
GeneralRe: Presentation Model - Winforms Pin
Trooks1-Mar-09 3:01
Trooks1-Mar-09 3:01 
The CSLA Framework from Rocky has been around a long time. Rocky has updated this for many years and a lot of companies use it. My understanding is that it is very good. There are other frameworks as well that might be used such as Smart Client Software Factory, Web Client Software Factory, ASP.NET MVC and the brand new PRISM for WPF and Silverlight. Personally, I have been sticking to the Microsoft Patterns and Factories. Then my model, my presenter, my view and/or controllers can be reused between them.

All of these have things in common. The model, the view and the presenter or the controller. I personally like MVP since it truly encapsulates the actions, rules, transitions and translators into a reusable framework that can be used and easily adjusted as requirements change. If there is one thing for certain in this world - requirements change as the users or management see things evolve. The ability to know where to go to make these changes without Spagetti Coding is crucial to success.

It appears that you have a good handle on the tiers here and their requirements. So here is my take. This is only my take and not a definitive answer. So if it is usable then hey use it, if not applicable to your case, file it away for later. The supervising controller is used to centralize the methods between views. All events that can be shared should be fired up to this controller and the controller in turns then fires commands back to interested views. It is very useful for keeping the views of data synchronized on the same class. So supervising controllers listen to events and fire commands to controllers which in turn fire the view events. Now you have a loosely coupled set of views that can be reused between modules without having any dependencies to any one parent container. The supervising controller handles the work and the actions, the view is merely a container with very few methods and the controller for the view has specific methods and interfaces to make the view do things. The controllers talk to the model and obtain most of the data then rearrange it as necessary using LinQ to Objects or if you are using generic list then use the predicates to handle the where clause etc.

All views in turn should handle the same interface so the controllers fire things in a coordinated fashion. It keeps you from getting confused as to what to do. Over time you will see exactly how to do this and it will become automatic.

Some of the model patterns that I use are the abstract factory pattern for the repository objects, a command pattern for reusable commands, a facade pattern for the method calls to make it easier to move this. Regardless of which framework you use the repository and the model do not change significantly. Now you can loosely couple everything and hook up the data with Enterprise Factory, nHibernate, LinQ to SQL or ADO.NET Entity Framework.

Finally, all UI classes should be wrapped with a BindingListView<t> so that all interfaces to the classes are exposed in a single location in the correct way.

I hope that this helps.

Best regards and keep working on it - this is definitely worth it in the long run.
Questionhow do i read the EULA(End User Licence Agrement) from any executable file? Pin
balukk21-Feb-09 2:35
balukk21-Feb-09 2:35 
AnswerRe: how do i read the EULA(End User Licence Agrement) from any executable file? Pin
Eddy Vluggen21-Feb-09 4:25
professionalEddy Vluggen21-Feb-09 4:25 
GeneralRe: how do i read the EULA(End User Licence Agrement) from any executable file? Pin
balukk21-Feb-09 4:39
balukk21-Feb-09 4:39 
GeneralRe: how do i read the EULA(End User Licence Agrement) from any executable file? Pin
Eddy Vluggen21-Feb-09 6:07
professionalEddy Vluggen21-Feb-09 6:07 
GeneralRe: how do i read the EULA(End User Licence Agrement) from any executable file? Pin
balukk23-Feb-09 5:33
balukk23-Feb-09 5:33 
QuestionCreating auto launch for exe on USB drive Pin
ashok_rgm20-Feb-09 0:03
ashok_rgm20-Feb-09 0:03 
AnswerRe: Creating auto launch for exe on USB drive Pin
Eddy Vluggen20-Feb-09 0:10
professionalEddy Vluggen20-Feb-09 0:10 
QuestionExecuting external application(.exe file) from windows application in C#.net Pin
Vishnu Nath19-Feb-09 22:20
Vishnu Nath19-Feb-09 22:20 
AnswerRe: Executing external application(.exe file) from windows application in C#.net Pin
Eddy Vluggen19-Feb-09 23:14
professionalEddy Vluggen19-Feb-09 23:14 
GeneralRe: Executing external application(.exe file) from windows application in C#.net Pin
Vishnu Nath20-Feb-09 2:30
Vishnu Nath20-Feb-09 2:30 
GeneralRe: Executing external application(.exe file) from windows application in C#.net Pin
Eddy Vluggen20-Feb-09 3:10
professionalEddy Vluggen20-Feb-09 3:10 
GeneralRe: Executing external application(.exe file) from windows application in C#.net Pin
Vishnu Nath20-Feb-09 18:34
Vishnu Nath20-Feb-09 18:34 
GeneralRe: Executing external application(.exe file) from windows application in C#.net Pin
Eddy Vluggen20-Feb-09 23:42
professionalEddy Vluggen20-Feb-09 23:42 
GeneralRe: Executing external application(.exe file) from windows application in C#.net Pin
Vishnu Nath20-Feb-09 23:44
Vishnu Nath20-Feb-09 23:44 
QuestionAuthentication premission to software Pin
lavankumar19-Feb-09 19:15
lavankumar19-Feb-09 19:15 
QuestionHow to open files in their respective editors??? Pin
bhagyashri.biyani17-Feb-09 23:35
bhagyashri.biyani17-Feb-09 23:35 
AnswerRe: How to open files in their respective editors??? Pin
Eddy Vluggen17-Feb-09 23:43
professionalEddy Vluggen17-Feb-09 23:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.