8 Replies - 2089 Views - Last Post: 22 September 2014 - 10:31 PM Rate Topic: -----

#1 furor   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 12
  • Joined: 02-September 14

Design Pattern: WinForm, WPF, ASP.NET, Mono, Mobile

Posted 09 September 2014 - 08:04 PM

Hi guys,

After settling down with VS2013 as the development platform, I need to refactor the existing WinForm code which is based on a tightly-coupled MVP view as I see it.

I need your input on your recommended approach to Design Pattern so that my code is reusable and portable especially when I will change the current WinForm project into WPF, Linux, Web and Mobile platforms.


I have searched in this forum on the topic "design pattern", "pattern", "MVPVM" and unable to have any good reference point. Googling just send me down so many different paths that I got lost.

Other topics I have visited were,
http://www.dreaminco...eptions-of-net/
http://www.dreaminco...1&#entry1688128

Still I am lost. Please help. Any input is appreciated (I am aware there isn't any perfect model out there)

Oh i forgot to add I have also read this post.
http://www.dreaminco...1&#entry1687705

Still, please give me your views moving forward. (Windows 9 is coming out)

Is This A Good Question/Topic? 0
  • +

Replies To: Design Pattern: WinForm, WPF, ASP.NET, Mono, Mobile

#2 Skydiver   User is online

  • Code herder
  • member icon

Reputation: 6451
  • View blog
  • Posts: 22,085
  • Joined: 05-May 12

Re: Design Pattern: WinForm, WPF, ASP.NET, Mono, Mobile

Posted 09 September 2014 - 08:17 PM

If it's tightly coupled, then it's not truly MVP. With MVP you should be able to substitute any of the components just like you would be able to do do with properly written MVC or MVVM.
Was This Post Helpful? 0
  • +
  • -

#3 furor   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 12
  • Joined: 02-September 14

Re: Design Pattern: WinForm, WPF, ASP.NET, Mono, Mobile

Posted 09 September 2014 - 09:57 PM

View PostSkydiver, on 09 September 2014 - 08:17 PM, said:

If it's tightly coupled, then it's not truly MVP. With MVP you should be able to substitute any of the components just like you would be able to do do with properly written MVC or MVVM.


Yea, that is why I need to refactor the codes.

So which design patteen is ideal for me to easily change the 'view'
Was This Post Helpful? 0
  • +
  • -

#4 furor   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 12
  • Joined: 02-September 14

Re: Design Pattern: WinForm, WPF, ASP.NET, Mono, Mobile

Posted 09 September 2014 - 11:08 PM

I also have read the topic by andrewsw
http://www.dreaminco...ttern-winforms/

Still, please tell me what do you guys use?
And also which pattern allows me to easily change the view from WinForm to WPF to Web to Mobile (if any)?
Was This Post Helpful? 0
  • +
  • -

#5 tlhIn`toq   User is offline

  • Xamarin Cert. Dev.
  • member icon

Reputation: 6535
  • View blog
  • Posts: 14,450
  • Joined: 02-June 10

Re: Design Pattern: WinForm, WPF, ASP.NET, Mono, Mobile

Posted 10 September 2014 - 02:44 PM

What do you mean by "what do you guys use"? It sounds like you think there is only one way to code, or only one pattern to use for all situations.

Sorry for how this sounds but I think most successful coders use:
Their experience, their understanding of the various design patterns, their ability to envision the project and the need. In short we use our minds.

You aren't going to get a ready-made answer by searching "Design pattern" and "MVVM". This isn't baking cookies where there is an exact recipe to follow.
2 objects
3 User interfaces
1 database
6 tables
Therefore use design pattern 4
Bake at 375 for 30 minutes


If you don't UNDERSTAND the different kinds of design patterns, and if you don't COMPREHEND the project you are working on, then of course you aren't going to be able to see how one stands out from the others as the best match.

In short, and sorry for how this sounds, but it feels like you are trying to design without first taking the time to learn. You can't build a 4 story building without bothering to go through architecture school; thinking you can google "Building weight loads" and "earthquake stress displacement". It just doesn't work that way. You actually have to take the time and put in the effort to learn the principals upon which you are building your career skillset.
Was This Post Helpful? 1
  • +
  • -

#6 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14425
  • View blog
  • Posts: 57,820
  • Joined: 12-June 08

Re: Design Pattern: WinForm, WPF, ASP.NET, Mono, Mobile

Posted 10 September 2014 - 02:48 PM

@tlhin - unless you are using Chef. :D/>
Was This Post Helpful? 0
  • +
  • -

#7 furor   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 12
  • Joined: 02-September 14

Re: Design Pattern: WinForm, WPF, ASP.NET, Mono, Mobile

Posted 21 September 2014 - 10:34 PM

Hi all

I have been reading up for the past days...

@tlhIn`toq - You got it correct. Since I am a newbie, I was trying to get a one sized fit all approach. However this thread was started to ask for opinion to move ahead.

@modi123_1 - I didn't know Chef exist. Haha.

I did read up topics by andrewsw,
http://www.dreaminco...ttern-winforms/

and also concidentally bumped into this topic,
http://www.codeproje...tion-patterns-M

In fact, the architecture patterns comparison and the general summaries would actually help me.

Anyway, I still thank you for your inputs here. ^_^
Was This Post Helpful? 0
  • +
  • -

#8 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 14425
  • View blog
  • Posts: 57,820
  • Joined: 12-June 08

Re: Design Pattern: WinForm, WPF, ASP.NET, Mono, Mobile

Posted 22 September 2014 - 09:25 AM

A simple "software design pattern" search yields quite a bit.

https://en.wikipedia..._design_pattern
http://code.tutsplus...erns--net-12752
http://www.codeproje...erns-in-ASP-NET
... etc.
Was This Post Helpful? 0
  • +
  • -

#9 furor   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 12
  • Joined: 02-September 14

Re: Design Pattern: WinForm, WPF, ASP.NET, Mono, Mobile

Posted 22 September 2014 - 10:31 PM

Actually I did all the Google searches and forum searches. That's how I found all the links in my posts. The reason for asking here is to see what are the common ones you guys use.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1