Back to list
Views:   7.4K
Replies:  2

Winform - Pattern in Action 4.5


I want to ask a question, in Winform project on Pattern in Action 4.5. Why don't use directly "service layer" to perform task in UI? Why use MVP, I feel it complex. If I use directly "service layer" in UI, Will happen?

Example: When I click button "OK" on LoginForm, It call LoginPresenter.Login(), then LoginPresenter call Model.Login(), then Model call Service Layer (in this case, it call nothing). I think its a long way. If I use directly "Service Layer" method when clicking on button "OK", What happen?
Thanh Phong Pham, Feb 21, 2014
Reply 1
There is always a balance. Too many layers, modules, patterns, indirections, etc. make the application complex.  

But simply coding without any plan or structure is a recipe for failure. particularly when your application is deployed and now your users want changes, enhancements, additions, etc.   If  your code is properly organized and structured, changes and enhancements are much, much easier. 

There is a lot more to this discussion, but I hope this provides a little clarity. 
Jack Poorte, Feb 27, 2014
Reply 2

Hi Thanh,

Their main target is to provide us close to real world examples of patterns and best practices, now these little projects are kind of a full reference at least for me

They have implemented these little projects so that developer community can learn how to build apps utilizing best practices and patterns, its up to us how we implement after learning

Implementing patterns and best practices not at all an easy and straight forward task, it needs good time and efforts to build a good architecture but the benefit is that later you don't need to worry about the change management things and things get easy and under control when business requirements change


Khurram Shahzad, Feb 24, 2014
Stay Inspired!
Join other developers and designers who have already signed up for our mailing list.
Terms     Privacy     Cookies       Do Not Sell       Licensing      
Made with    in Austin, Texas.  - vsn 44.0.0
© Data & Object Factory, LLC.