Real winforms/wpf projects which use MVC, MVP, MVVM - c#

I have looked some videos and read some articles about MVC, MVP, MVVM. I think, that I understood basic principles and differences. But it seems to me that samples in articles and videos are very easy.
I think that it's easy to learn how to apply these patterns when you can look on some projects.
So I'd like to look on real projects(Winforms/WPF), which use MVC, MVP or MVVM. Could you provide me links to sources of such projects? (If it is open source)
It will be great if projects will have unit tests for Controller/Presenter/ViewModel, because it's one of my problem when I develop applications.
Thanks in advance.

CodePlex will have a fair few http://www.codeplex.com/
I assume you have also used the samples at http://www.asp.net/mvc (you seemed to suggest this in your post)
Edit: also see these questions:
Good examples of WPF applications
Real World ASP.NET MVC Applications with Source Code?

Mini SQL Query at codeplex http://minisqlquery.codeplex.com/
see my answer at https://stackoverflow.com/a/25376174/423356

Related

project template with MVC,EF, WCF, Repository, UoW, DI, loger?

I want to start a project. Can you please guide me if a open source template is available which is suitable for small-medium applications and not over complex.
I want something with MVC, EF, WCF, Repository , UOW and DI pattens, test project and a error loger.
Please advice.
Is this the first time that you work with ASP.NET MVC 3? There are many tutorials online and sample applications that you can work through. 99% of these sample applications implement what you are looking for. Work through applications so that you can learn, you are going to have to invest in some time to understand this a little better. You can go and search Codeplex, there are tons of applications that you can download and work through the source code.
A project that helped me alot was Kigg. Very well written code. Check it out on Codeplex.

C# and WCF , where to learn about it?

Its been a few weeks since I started learning C#, i know my way around visual studio, know things about classes, constructors, objects, played around with WPF and now think its time to learn some networking, say making a simple server/client application.
From what I understand winsockets are outdated and currently it is better to learn WCF ?
Maybe someone know some books, articles or tutorials about WCF for beginners where it would be explained step by stem from the ground up. :) Since all I was able to find were either rather complicated materials assuming that the reader it already a master-programmer or just coded supposed to be used as copy/paste without really explaining what it does.
Thanks! :)
In short, WCF is Microsoft's library of code to simplify the process of inter-machine and inter-process communication. Pre-WCF, there were a number of frameworks you could use. WCF gives them a consistent .net interface to simplify programming.
I recommend "Learning WCF", by Michele Leroux Bustamante. It's as thick as a Bible, but it has accessible material about the different facets of WCF with lots of code samples.
http://msdn.microsoft.com/en-us/netframework/wcf-screencasts.aspx
A very accessable group of tutorials, that cover the basics very well. Great place to start.
I would like to reccomend Pro WCF: Practical Microsoft SOA Implementation
- i've been learning with wcf with it.
I learned what I needed to know from the book Windows Communication Foundation Unleashed by Craig McMurty, Marc Mercuri, Nigel Watling and Matt Winkler. It has good examples that you can use to produce your own web services and such. It requires some knowledge of C#, which you seem to already have.
Go to MSDN my friend,If you have the patience to read the tutorials/articles in MSDN you can learn WCF very well.
Here are some good beginner tutorials from MSDN
http://msdn.microsoft.com/en-us/library/ms735119(VS.90).aspx

Winforms or WPF MVC

All,
As far as I understand ASP.NET MVC is the framework that implements the MVC pattern released my Microsoft. I wonder why there is no Winforms or WPF MVC implementation ?
The reason I am asking is that I am planning to start on a new big WinForms project and ideally we are looking for a framework that implements some kind of common pattern to improve the testability of our solution.
Thanks,
MK
For WPF, the MVVM pattern is so deeply ingrained in the framework itself that you don't really see it until someone points it out to you. You don't really need a separate framework for that (although certain types, such as Josh Smith's RelayCommand, would be nice to have in the BCL).
Windows Forms isn't really going anywhere anymore, which is why you don't see any new or thriving MVC-style frameworks for that platform. However, patterns & practices' Composite Application Block (CAB) was an attempt at such a framework.
Most people found the CAB to be too complicated to their taste, but I personally found it a valuable effort, even if it could have been simpler to use. It's still out there and available in source code format, so you might want to take a look at it.
However, if at all possible, implement your application as a WPF application instead.
If you want to use WPF you should look into using the MVVM pattern (Model View View-Model).
There's a template you can download for Visual Studio for it. It's part of the WPF Toolkit I think. Look on CodePlex.com.
Hope this helps!
There are a few similar SO Questions here and here.
Just because there is not a strict framework for MVC in webforms/wpf doesn't mean you can't follow the principles and code in an MVC way. I think MVVM for WPF is similar although I have no experience of this.
As Tony said, read up on the Model-View-ViewModel pattern (essentially, this a variation of MVC, but better suited for the WPF programming model
Have a look at the Composite Application Library for WPF and Silverlight (from Microsoft P&P). I can say from experience that this library is a lot easier to use than the Composite Application Block...
The Caliburn Framework is also worth looking at
WinForms are dead. You better look at WPF+MVVM (+Prism)
What an excellent question asked here: Why isn't there an MVC equivalent framework for WPF? I spent 6 years on WPF platform only to find out:
No further development on the WPF toolkit ever occurred since fist release.
Hosting web browsers in WPF still has major air-space issues.
Charting was never fully ported to WPF.
VS2013 never was provided with an WPF MVVM template for new projects.
Prism is confusing.
Learning curve is steep.
The open community hardly developed any open libs. like Javascript folks did.
Running it as an in-browser app. was very difficult to get right.
Compared to Web-Client rendering it is just plain slow.
And perhaps worst of all Microsoft went quiet on us. Until just recently announcing they're back in the game, but if you look at their plans it looks more like a Sunset release than getting back in the game.
The solution for me is to dump WPF in favor of MVC which I've done. MVC has its quirks but it's a much nicer platform than the cantankerous framework that's best suited using the "Relay Command" what a pile of nonsense.
Imagine your boss saying, hey we need that in a web browser and your reply "It'll be ready tomorrow"...

MVP examples for Windows Forms

Is there good example code or a test project for explaining the Model–view–presenter (MVP) pattern. There are a lot of explanation links, but I want to have some good example code to show others without reinventing the wheel.
Jeremy Miller's "Build your own CAB" series is fantastic. You get a nice dose of MVP (along with some other smart client patterns such as Pub/Sub).
http://codebetter.com/blogs/jeremy.miller/archive/2007/07/25/the-build-your-own-cab-series-table-of-contents.aspx
You may want to try the Claymore Framework.

Good place to start learning ASP.NET

I have a two years of experience of programming in Visual C# and Visual C++. I would like to know some good online sources to start learning ASP.NET or anything else I should/need to learn before diving into ASP.NET. I found some online videos that are proving to be quite useful. Perhaps I would like to know about some open source projects where I can have a look at the ASP.NET code directly.
Sorry, but I'm going to have to suggest the immediately obvious first:
Official Microsoft ASP .Net Site
There's a link at the top to both "Get Started" and "Learn", and I have found this site incredibly useful over the past year or so.
Speaking as a convert from WinForms to the Web, I offer the following tips
Learn the ASP.NET Life-cycle
Get to grips with the concepts of client vs server-side code; know how pages are served up etc
Don't bite off too much too soon, there are A LOT of new things to learn, and it changes very quickly. But you don't need to be writing a full-blown AJAX web app straight away.
I like http://www.asp.net/learn/ it has some great tuts and some cool videos that walk you through the processes.
Good Luck
IMHO, CodeProject (www.codeproject.com) has lots of excellent articles related to ASP.NET.
Regarding projects, there are plenty of ASP.NET applications in CodePlex (www.codeplex.com) or SourceForge.
Regarding a specific ASP.NET application, http://www.cuyahoga-project.org/ its a great application to see.
Best Regards.
https://web.archive.org/web/20211020202742/https://www.4guysfromrolla.com/
Loads of ASP.NET articles/tutorials at various levels. I found it pretty useful to get my head around some of the concepts.
Just to add, another great resource is www.learnvisualstudio.net
Its not free but it has a plethora of videos covering all aspects of asp.net from 1.1 to 3.5, AJAX, Webservices.
Programmer to Programmer style videos with great examples and downloadable source code.
Good luck :)

Categories