Answered by:
Help for a Beginner

Question
-
User-1306547723 posted
Hello - I'm a webforms developer and I'm looking to start working w/ ASP.NET MVC for a new project. The project is for a (very) high traffic public site where I need more control over the HTML than webforms normally allows - so MVC seems like it would be perfect.
The first phase of the project is simple - it is a display only page - pulling from a database based on a single parameter (an ID #.) Eventually we'll likely have different views depending on the origin of the request but for now we just have a ton of data to be displayed to the user.
The data is all pulled by a single Stored Procedure w/ multiple record sets (its an old procedure - but it works.) Previously I'd either use a SQLDataReader or Dataset to get the data and work from there - but I'm trying to adhere to the MVC model (and allow for growth and change in the future.)
My current thinking is that I should create a strongly typed domain model - which encapsulates all the data returned (some are straight values - others are "lists" of other strongly types classes. Then create a class that pulls the data from the DB (based on the ID) and populates the strongly typed class - which is used by the view.
Am I headed in the right direction? Over-complicating things? As I read through the materials I have - a ton of it gets into LINQ and data access methods that seem like overkill - I just need to be able to access the data from a SP (of course it could change to use a Web Service down the line - which is why I want to decouple the model from the data access method.)
Any push in the right direction would be appreciated - I don't want to head down a path that either creates overhead that could damage performance (or handcuff me down the road by not doing things right at the beginning.)
Bill
Thursday, February 25, 2010 4:09 PM
Answers
-
User-434868552 posted
Hello Bill,
your post briefly appeared twice in ASP.NET MVC forum but is now over in Architecture.
I'm not sure as to why it's been moved ... regardless, I have a few suggestions for you.
First, work through the ASP.NET MVC tutorials.
My suggestion is to start with the relatively easy movie database tutorial*.
Actually do each tutorial. In the first part of the movie database tutorial,
you will create a database and an Entity Framework Model using LINQ to Entities.
When you have fully, successfully completed that very first tutorial, start
changing it ... see what roadblocks you will hit. When you are comfortable
with tweaking the first tutorial, try to do a small similar real application
to practice and reinforce your learning. From there, repeat the process
tutorial by tutorial.Read the ASP.NET MVC forum on a regular basis so that you can see
with what issues your peers are being confronted.----
As for your existing experience, you can wrap parts of it in the Model.
There is nothing wrong with using SP's via the Model. Note, some
of the early tutorials actually perform data access in the Controller
that actually belongs in the Model. Later tutorials show you how
to migrate to the Model.---
essential reading and watching:
see the answers, mine included, here:
http://forums.asp.net/t/1500780.aspx.
Good Luck!
Regards,
Gerry (Lowry)
* Movie database tutorial:
view in VB or C#
see also, http://forums.asp.net/t/1401522.aspx
Tutorial 1: c#, f.y.i.: errors in the first ASP.NET MVC tutorial ...
Creating a Movie Database Application with ASP.NET MVC (C#)- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, February 25, 2010 6:25 PM -
User-434868552 posted
P.S.:
the tutorials are here: http://www.asp.net/mvc/learn/.
the forums, announcements, and FAQs for ASP.NET MVC are here:
http://forums.asp.net/1146.aspx.- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, February 25, 2010 6:34 PM
All replies
-
User-434868552 posted
Hello Bill,
your post briefly appeared twice in ASP.NET MVC forum but is now over in Architecture.
I'm not sure as to why it's been moved ... regardless, I have a few suggestions for you.
First, work through the ASP.NET MVC tutorials.
My suggestion is to start with the relatively easy movie database tutorial*.
Actually do each tutorial. In the first part of the movie database tutorial,
you will create a database and an Entity Framework Model using LINQ to Entities.
When you have fully, successfully completed that very first tutorial, start
changing it ... see what roadblocks you will hit. When you are comfortable
with tweaking the first tutorial, try to do a small similar real application
to practice and reinforce your learning. From there, repeat the process
tutorial by tutorial.Read the ASP.NET MVC forum on a regular basis so that you can see
with what issues your peers are being confronted.----
As for your existing experience, you can wrap parts of it in the Model.
There is nothing wrong with using SP's via the Model. Note, some
of the early tutorials actually perform data access in the Controller
that actually belongs in the Model. Later tutorials show you how
to migrate to the Model.---
essential reading and watching:
see the answers, mine included, here:
http://forums.asp.net/t/1500780.aspx.
Good Luck!
Regards,
Gerry (Lowry)
* Movie database tutorial:
view in VB or C#
see also, http://forums.asp.net/t/1401522.aspx
Tutorial 1: c#, f.y.i.: errors in the first ASP.NET MVC tutorial ...
Creating a Movie Database Application with ASP.NET MVC (C#)- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, February 25, 2010 6:25 PM -
User-434868552 posted
P.S.:
the tutorials are here: http://www.asp.net/mvc/learn/.
the forums, announcements, and FAQs for ASP.NET MVC are here:
http://forums.asp.net/1146.aspx.- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Thursday, February 25, 2010 6:34 PM