MVC 3 Architecture? - asp.net-mvc-3

I don't know whether this is right forum to ask about MVC3 Framework.
Actually my Project Manager asked me to do next project in MVC3 achitecture. I never worked even in MVC.
Can anyone help me to provide a tutorials link about MVC3?
Is it right to go with MVC3 without knowing about MVC?
Please help?

Well since you mention MVC 3 your manager probably means Microsoft ASP.NET MVC 3, and the perfect starting place to learn about ASP.NET MVC is www.asp.net/mvc
You will find a lot of helpful tutorials and video presentation that will help get you started.

It's actually quite easy ( = comfortable) to learn basics of ASP.NET MVC nowadays.
There are many great resources at www.asp.net/mvc.
I can also recommend videos from MIX events by Scott Hanselman. You can look for them in MIX archive (years 09-11) or at his site www.hanselman.com. He + guys like Scott Gu and Phil Haack did project called Nerddinner which was good starting point for beginners (during days of MVC1 and MVC2), because there are videos about it and also free ebook (you can get all at nerddinner.com - link is in footer), but its a bit aged now and there are already newer tutorials aiming newer versions of ASP.NET MVC3 directly at official ASP.NET MVC site.
So your best starting point for ASP.NET MVC3 really is the www.asp.net/mvc site and 1. Getting Started section ;) Read overview, start following the first tutorials (first ASP.NET MVC Applicaton and ASP.NET MVC Music Store). Then when you will get into troubles with something specific, you can come back here and ask again.

Steven Sanderson's book is actually the good one to start. Not only it explains MVC framework in depth, but provides comparison with other web frameworks and all the pros/cons it has got. After reading first chapters, you'll undestand why your project manager asked so :). The book is is mvc2 - so there're some points explained that are already old (WebForms view engine) but anyways, book gives good knowledge

i hope this one may be of help too.
http://kbochevski.blogspot.com/2011/06/architecting-loosely-coupled-mvcnet.html

You can follow some video tutorials on pluralsight. It's not that expensive and one month is quite enough.
There are also plenty of books that may help you during your learning process.
I would suggest this one
Pro ASP.NET MVC 3 Framework 3rd Edition
The official site for asp.net mvc has also some great tutorials

Lets start with what in my opinion is the best tutorial on ASP.NET MVC 3 and the Entity Framework 4.1. Go to
MVC Music Store
I have tried several tutorials and that one is the best. It comes with a PDF that leads you through the process. Next comes the razor view engine syntax, something you definitely need to learn. Here is a good book on Programming Razor
Programming Razor
You must learn the Razor syntax and the razor view engine to build ASP.NET MVC 3 websites.

Now that you have had an introduction, lets get down to it. First, a word of caution about one particular book on MVC 3
Pro ASP.NET MVC 3 Framework
This book has an excellent introduction to the MVC architecture and MVC design pattern, related design patterns and programming techniques. However, its tutorial is riddled with bugs and omissions. Basically, the CRUD code doesnt work. After you have ground through several chapters of code, you find that when you call SaveChanges(), nothing happens, not even an error. I downloaded the sample code and ran it and not even it works. Take that book with a grain of salt. It appears to have been released without proper editing and validation of the code. I am going to try to get my tokens back for downloading that book on safari.oreilly.com. The MvcMusicStore tutorial is a much better one and the code actually works.
Now we come to a book that pretty much nails programming ASP.NET MVC 3, Razor and the Entity Framework
Professional ASP.NET MVC 3
This book is based on the very good MVC Music Store tutorial and expands on it quite nicely. It will get you started much faster and has much better practical information for getting a well designed, complete MVC application up and running quickly. The Entity Framework code-first tutorial is excellent. It is also a short 450 or so pages but there is a lot packed in that book.
You may also want to spend some time learning the Entity Framework 4.1 and LINQ to Entities. The best book for that is Julie Lehrmans excellent book on LINQ and the Entity Framework
Programming Entity Framework, Second Edition
I am a n00b here so I cant post a link to that book. You can find it on safari.oreilly.com or go to programmingentityframework.com, Julie's website. I haven't had a chance to even look at ASP.NET MVC 4!

Related

Sample N-tier ASP.NET MVC3 application with best practices (using EF 4.1)

I am looking for a sample ASP.NET MVC3 N-Tier application that demonstrates best practices (uses Domain Driven Design and Entity Framework 4.1 Code first). I found the following. which one do you recommend out of these (or any other one not in this list)?
http://efmvc.codeplex.com/
http://prodinner.codeplex.com/
http://www.dofactory.com/Framework/Framework.aspx (not free)
I was in the same position not long ago.
The things you linked are OK, but certainly not enough on their own.
I find this topic lacking in the free resources, as it is quite big and needs good organization and breadth. On the other hand, there are good resources if you are willing to pay a little.
These are the resources I used:
PluralSight - training videos. ($30 per month, quite worth it, not affiliated, but a subsciber)
Here are the courses that are great on the topic:
Principles of Object Oriented Design - by Steve Smith, he is a great lector.
Design Patterns Library - over 10 hours of videos on design patterns. Can't compare them to DotFactory, but they are very well done.
Inversion of Control - what the name says, important topic in depth.
There are also lots of stuff on TDD, MVC, EF etc. All worthy topics.
Books on Kindle (I haven't been reading lots of books, but Kindle really revived my passion for written knowledge)
Professional Enterprise .NET
Microsoft® .NET: Architecting Applications for the Enterprise
Applying Domain-Driven Design and Patterns: With Examples in C# and .NET
Have you seen the following projects? They also have the source code that they can have complete documentation.
http://microsoftnlayerapp.codeplex.com/
http://www.nopcommerce.com
Best practices are always subjective. Your application may require DI and as well as Interceptors but sample apps are relatively small and putting anything into there turns out to be ridiculous. Still, I would suggest you to go through MVC Music Store. It has pretty good implementation and a very good sample.
http://mvcmusicstore.codeplex.com/
Although this post is old, But I have had same problem to find a good and modern pattern for a good ntier application. After I goggling for some hour, I Found Onion Architecture By Jeffrey Palermo. It is a must read article. here: jeffreypalermo.com/blog/the-onion-architecture-part-1/
By using this article and using some other researches I Made a template (Example) of this architecture that uses Entity Framework 6.0 and Ninject Dependency Injection 3.2.0
NTierCSharpExample
I this template: Center Layer Is Domain Layer. Then Service Layer that is a bridge between presentation and Data Layer.
For simplicity I used console app for presentation but you can simply remove it out and plug in a new asp.net mvc 5 application or any other presentation app you want.
Funny this kind of question comes up couple of times per week at least recently.
What I can say, only about the layering of the different projects, accordingly to my experience and feedback I've got, is to check question and my answer here:
MVC3 and Entity Framework
RKP this is not answering all and completely to your question, is about layering the architecture and some ideas on why only (see comments under my answer).
I make a good pattern based on EF 4.1 and MVC3:
MVC3 and EF architecture
good luck

Book for learning ASP.NET MVC3

I'm interested in learning about the MVC3 framework.
My background is MSc in Computer Science, with a professional experience in .NET2-4 and WebForms. I also have (very) little experience with MVC2, and some decent experience with JS and jQuery if that matters
I'm unsure which book to purchase to get me well off.
I've seen this book, Pro ASP.NET MVC 3 Framework, recommended in a few threads but its reviews are less than stellar. Including "Many errors in code", "lots of typos", "seems to be rushed out to be the first book on the subject". Therefore, I am reluctant to just go and buy this book in its first edition.
It seems the options are limited to
http://www.amazon.com/Pro-ASP-NET-MVC-3-Framework/dp/1430234040/ref=sr_1_2?s=books&ie=UTF8&qid=1312906757&sr=1-2
http://www.amazon.com/Professional-ASP-NET-MVC-Jon-Galloway/dp/1118076583/ref=sr_1_1?s=books&ie=UTF8&qid=1312907008&sr=1-1
And ofcourse, just looking at NerdDinner but I feel I'll probably miss a lot of cool features by taking that road...
Offhand note: I have no interest in learning Entity Framework at the moment.
What would be SO's recommendations for such a book?
I have the first book and posted a review of it on Amazon.
Overall it is a decent book that does a good job, but there are issues as mentioned in my review and others.
I would still recommend you get it as a starter though as for me it has been a great starter into MVC.
I have the first one (and the first and second edition as well...) and I think all editions are excellent. I can wholeheartedly recommend Sanderson's books.

Curriculum for developing with ASP.NET MVC 3

I want to write a web site using ASP.NET MVC 3.0 and Microsoft technologies. I'm studying it now, and enjoying it.
The web site is experimental, and will be used by me and my son in house, but of course I will want to grow it and let other people use it. It will be in Hebrew.
What other technologies do I need to study? One I'm sure of is C# 4.0 (and LINQ). But I'm not sure about ASP.Net 4.0 - Do I also need to study it? How about Html 5? Javascript? Entity framework? Ajax?
Well here's my $0.02 worth of advice. I guess if your are going to expand this site at some point in the future you would have to add Enfity Framework 4 as well in terms of how you do your data access and JQuery since it comes out of the box with your MVC projects. Since you are developing it now you might as well add HTML5 to the list. With respect to ASP.NET 4 you might not need to if you're only doing this for your site. It's a pity that there aren't any mvc3 books our yet but you could either refer to blogs for newer material or if you don't mind use MVC2 books to help you along with u

learning LINQ to SQL

For anyone interested in learning LINQ To SQL, could you suggest:
good book titles
web articles/tutorials
videos
UPDATE: After googling i found most usefull the following
LinqPad (I already bought a licence!)
Linq in Action by Manning and
Linq videos from the VB Team
Please be my guest and complete the list!
Linq To Entities is a good place to start.
http://learnentityframework.com/learnentityframework/
I think Scott Guthrie's blog, is a great place to start.
And this tutorial (although in ASP.NET MVC context), is very good, too (even if you're not specifically using ASP.NET MVC).
Depends what you are intending to do. LINQ is just a way of dealing with collections/lists of data. It can also assist you with connecting to data stores.
What I am saying is that it is just a language feature, and so the best book to buy is one that deals with a version of your language of choice. They usually introduce LINQ quite well. The best ones are the ones that deal with the technology you want to use, eg, ASP.NET. In this case:
Pro ASP.NET 4 in C# 2010, Apress, Matthew Macdonald, Adam Freeman and others was good enough for me.
As ever, the best way to learn these things is to just start working with them. So if, for example, you wanted to use ASP.NET MVC 2, I would buy Steven Sanderson's book (Pro ASP.NET MVC Framework 2) as well. There is a great example in the first few chapters that you can follow. The book has the added advantage that it teaches you to think in MVC.
Once you get to grips with working with LINQ, you can fine tune your knowledge with:
Programming Microsoft LINQ, Microsoft Press, Paolo Pialorsi and Marco Russo.

MVC2 VS custom built framework

We are planning to start a new Sale Management System which will have about 12 subsystem.
We will use MSSQL2008 as a database.
We have got custom framework for ASP.NET that was built about 3 years ago which is not MVC type... And i am planning to move to MVC2 Framework.
My Questions are
What will be the big advantages of moving
to MVC2?
How about the learning curve for MVC2 and will there be any good
guided study flow?
We are planning to use Multirow (Instead of Grid View), inputman (For function key event and validation) from grapecity and ActiveReport.. Will they be easily fit into MVC2 Framework?
Well, you have some good questions, but I think you have abused the question asking here. You will find that people will be more apt to answer if you divide your bullets into their own questions.
Advantages of MVC? Well pick up any MVC book and find those. IMHO however it lets you get to more pure views. It allows for separation of the main components of MVC (Model View and Controller) which allows you to test them. For me its more than that. I like how it allows for more control over what is in the view. I get so sick of the ASP.NET rendered controls that break javascript.
Learning curve? Well that all depends on how well you know HTML, Javascript, AJAX, and JSON. If you dont know them well at all, you will have a bigger curve. Now AJAX and JSON are not a must, but they will make it work better. JQuery is MVCs best friend, learn it and live it.

Resources