views:

175

answers:

5

Hello

I am new for both concepts.

1) I want to know that MVC and WPF is same concepts but WPF for desktop while other is for WEB ?

2) Will be easy to learn other one If i learn one of them ?

+1  A: 

No,

WPF and Silverlight are much more closely related than WPF and ASP.NET MVC. Silverlight is a seperate runtime and is basically a subset of .NET; Silverlight uses XAML markup for the UI, which supports a subset (and some web-specific) features from WPF and .NET.

ASP.NET MVC is Microsoft's implementation of the MVC pattern. What differentiates MVC from WebForms ("classic" ASP.NET web-development) is that MVC assists in using best-practices and giving the developer a high-level of control of the output of the application--WebForms was more RAD (Rapid Application Development) driven, making it easy to begin to work with--but putting some concerns about best-practes, pattens, and control to the wayside.


As for which is easier: MVC will likely be quicker to start with, but doing full-blown web-development requires a set of technologies (HTML/CSS/JavaScript/.NET) whereas WPF keeps your required knowledge more focused (XAML/WPF/.NET).

STW
A: 

MVC (model-view-controller) is a design pattern, and is not specific to a particular technology set.

WPF (Windows Presentation Framework) is Microsoft's windowing library, and can be used in an MVC-designed system. However there's nothing to enforce this and MVC pattern usage can certainly be abused with WPF.

MVC is a widely used pattern and familiarity with it is going to be useful regardless of the technology set used (whether it's web-based, WPF, Swing etc.). Note that MVC is usually associated with GUIs, but there's no particular restriction and the pattern can be used wherever a model and its changes need to be reflected to different consumers with different views on that data.

Brian Agnew
Downvoted why ?
Brian Agnew
+3  A: 

I think you probably meant "ASP.NET MVC" technology when you were talking about "MVC" (based on the tags of your question). Anyway, here are a few points that may clarify what is going on:

  • ASP.NET MVC is a technology for developing web applications based on the model-view-controller (MVC) pattern. You can twist it a little bit, but the framework is specifically desgined to work with this pattern.

  • WPF is a technology for developing windows applications. You can use various different design patterns when writing WPF applications, but the most popular one these days is called model-view-viewmodel (MVVM). You could also use the MVC pattern (organization of components) when writing WPF applications, but that wouldn't work as nicely as more native approaches.

So, regarding your questions:

  • They are not the same concepts - the technologies are different and the usual patterns (ways of organizing code) used with the two technologies also differ.

  • Learning one technology may make it easier to understand the other one slightly, because they are both .NET GUI frameworks and share some concepts. However, I don't think this will help a lot.

Tomas Petricek
ASP.NET MVC is implementation of MVC pattern but WPF is not ? As well as i understand WPF is implemented by microsoft for using it with some patterns as MVC.
Freshblood
I mean WPF makes possible to implement MVC pattern on desktop ,right ?
Freshblood
@Freshblood: Yes, you could implement MVC in WPF, but you could do the same with Winforms. WPF is designed to work with the MVVM pattern, not specifically for MVC.
Adam Robinson
Ohh, I even didn't know that i could implement MVC pattern with winforms without WPF.
Freshblood
@Freshblood: You can implement MVC pattern in Winforms, WPF, ASP.NET WebForms or even .NET Console Application if you wanted :-). It is just a way of organizing code into some components that are related in some way. "ASP.NET MVC" implements the pattern more strictly than how you could implement it in other frameworks, but the specific implementation of the pattern may vary.... I would say that both WPF and ASP.NET WebForms are in some way inspired by that pattern, but aren't as strict as ASP.NET MVC.
Tomas Petricek
A: 

No. MVC is a pattern while WPF is a Microsoft technology.

You could with some effort likely use the MVC pattern in WPF but more popular in WPF is MVVM nowadays. MVC itself is not restricted to web only.

Grz, Kris.

XIII
A: 

2) Will be easy to learn other one If i learn one of them ?

Shure: They both can be programmed using c# or vb. And they both can be programmed using Visual Studio.

But the same is true for any technology that incorporates .NET technology (Winform, ASP.NET, Silverlight...)

Malcolm Frexner