ASP.NET MVC Preview 2 Screencast Tutorials
ASP.NET MVC Preview 2 released today and you can head over to http://www.asp.net/mvc to get the new stuff. I put together four new screencasts for this release.
I really feel that a well-done screencast is a great learning tool. Last month I did a survey of you all, Dear Reader, and got 1000 responses and published the results. I took all the comments, stats and general feedback and tried to improve these screencasts. As a result, I am more judicious in my use of PIP (Picture in Picture) and the screencasts are shorter and more to the point.
If you watched the original MVC Screencast, some of the content in videos #1 and #2 will be repeated as it's been updated for Preview 2, but I hope it doesn't waste your time. However, there's new things sprinkled around and a number of changes are called out. Additionally, videos 3 and 4 are completely new content. Video #4 talks about how to use a Mocking Framework to to TDD with MVC and #3 touches on a number of advanced techniques that you can practice at the Mix HOL (Hands-On-Labs).
#1 | MVC Preview - Part 1 - Displaying Data 16 minutes, 41 seconds | #2 | MVC Preview - Part 2 - Editing Data and Making Forms 18 minutes, 38 seconds |
#3 | MVC Preview - Part 3 - Advanced Techniques 12 minutes, 56 seconds | |
UPDATE: There's only a template for MSTest in the new File | New MVC Project wizard right now because we're reaching out to the big Unit Testing libraries to get them to help create templates. If you have a Unit Testing Library, you can get into the MVC File | New Project dialog by packaging up your templates like this. I'd guess/hope that the installers for the major libraries would just include their templates in their next versions.
I'll work with Phil to get all the source to the apps in these videos posted soon. I hope you enjoy them as much as I enjoyed making them.
Note that while the player on the http://www.asp.net site is Silverlight, you can download versions on the same page in WMV format, as well as ones customized for the Zune, iPod, PSP, and MP4 and 3GP.
One other important new feature on the ASP.NET site is that Videos now accept comments and those comments include RSS feeds. Do feel free to leave comments on this blog, but you can also comment on videos and screencast tutorials all over the ASP.NET site. We all read these comments (including my boss) so your feedback IS paid attention to.
About Scott
Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.
About Newsletter
Where can I get that sources for video?
Is there a way to find out what the news are in ASP.NET MVC Preview 2? It's probably in the videos, but I don't have any earphones at the moment and I'm very curious.
You couldn't consider removing the video feed of yourself while your showing stuff on the screen that the viewers should watch?
A moving picture in the periphery draws the focus away from what you're showing, and I find it hard to concentrate on what you're discussing. (I usually end up blocking the bottom right corner of my screen with a book or something, which is kind of sad since I sometimes miss text that is shown in that spot)
You can grab the latest MbUnit v2 and v3 previews from here: http://code.google.com/p/mb-unit/
Otherwise, great series of videos, I do think the technology has promise (and I just can't help but play around with new stuff!), so I'll be following MVC closely up until final release.
James
Watched the first two videos; so far, so awesome! I'm very impressed by the work you guys are doing on this. Thank you very much for putting in so much time to make sure we all understand this framework.
A couple questions/comments:
1) No named routes? You mentioned 3 options for generating URLs and I didn't see named routing in there anywhere. I'd really like to see this as a feature so we don't have to depend on the controller for our routes.
2) I'd love to see an example of a non-typed ViewPage (one that doesn't inherit from ViewPage<T>) and uses a Bag instead (you mentioned this is possible but didn't show it).
3) Perhaps more attention to RESTful routes/resources would help give developers who have never heard of REST an introduction to a great topic.
Keep up the great work, I'm really enjoying the new framework!
-Joe
Most ASP.NET developers are, I think, used to assigning values to controls in the code-behind, and all that inline C# code is kinda ugly in the view. Are there plans to remedy this?
I took a totally different impression from the videos - the helperclasses, combined with consistent form field naming structure seemed to make the postback soup that we have had to deal with as ASP(.NET) developers for years... melt... restfully.... away.
Wanted to post a comment on the actual video, but asp.net seems to be trying their hardest to keep that from happening...
Hal - That's a totally valid observation and that is what a lot of folks thing when they see Views from different MVC Frameworks.
Darren - Do you have examples?
ScottW - I'm on the comment thing, thanks! As for controls, most of those require ViewState, so they're not appropriate for MVC. I'll do a larger post at some point explaining this stuff in more "philosophical terms." One thing that folks forget is that 90% of devs WON'T or shouldn't use MVC. It's not for every development shop and it's most certainly not for every problem.
The rule of thumb for framing a face close-up is that you should aim to have the eyes of the speaker 1/4 of the way down the screen from the top.
Beyond that very minor nitpick, I think you've hit on a great formula for presenting this information, and, as usual, the information itself is a goldmine. Thanks!
The rule of thumb for framing a face close-up is that you should aim to have the eyes of the speaker 1/4 of the way down the screen from the top.
Did I say 1/4? I meant 1/3. Usually anywhere between 1/4 and 1/3. Depends on how close-up the shot is.
It looks like the v2 has really made some great changes
Just wanted to let you know that you do have the best screen casts out there today. Thanks for all the work you put into them.
In watching MVC RC2 video #3 I duplicated the code for the HandleUnknownAction method and discovered a problem. My expectation would be for as you referred to in the video "MissingMethod" calls to occur - and only that. In fact it is called for more often. For example, try just a default URL (i.e. http://localhost:port) and the method will fire. In your video you tested the actionName for a specific string ('about') - while I understand it was for example purposes it won't work in production.
Any ideas on how to deal with this?
Have a question for the {*catchall}. Why have an action that takes a string parameter? Why not have an action that takes a dictionary object as a param?
What would be it's use now that you mention it? Besides keeping MS employees employed.
:]
I've been playing around with the December CTP, and I'm looking forward to "getting it on" with this new one.
I love the fact that you can have 100% control over the markup, unlike the traditional ASP.NET WebForms model, which could be kind of a pain.
I've noticed that the helper methods, such as Textbox() and Form() puts some extra space in between attributes, and space between the last attribute end quote char and the ">". I know it's a small thing, but I hope you'll consider making it pretty in a later release.
If I write <sometag someattribute="<%= Some code %>">, I get zero intellisence in the code block. I'm guessing this is an issue with Visual Studio... Will this addressed?
;)
Mads F - That's weird. I suspect the intellisense thread is parsing. Does it ever come back?
No, I've waited and waited... Also, when hitting Ctrl+Space, I get that sound Windows use to tell you that you can't do that.
Intellisense everywhere else is working fine (and fast too).
I have this problem on my computer at home and on the one at work.
Am I the only one experiencing this?
The comment i was trying to submit:
Unfortunately, sorry to say, you are incorrect in Part 3 - Advanced Techniques.
InterceptionController does not technically handle unknown actions. It handles every action, because the InterceptionController itself doesn't have any actions).
I would have to suggest the video be corrected. Especially since this is learning material for the masses. I appreciate that this may involve significant effort, so at the very least there should be a health warning attached to the video.
http://forums.asp.net/t/1229582.aspx
The rest of the series is great. keep up the good work.
I particularly liked the simplicity of having a single user control for the form fields in ProductInput.ascx to reuse in both the New and Update views. And wrapping this with the typed Html.Form with Lambda. Begins to show some of the techniques to build out a full app.
My main dilema at the moment is form element ids. To allow inline editing of multiple entities of the same type, the id will have to be of the format eg. Product-{id}-Title, or at least that's the format I often use. It would be almost nice if the HtmlHelpers had a BuildId(htmlName, dataSource) method that you can override. Saves then having to pass in the id as an attribute each time in the View, for each Html.FieldType method call. Or can something like this currently be done?
I've got a different concern about MVC - is there any place for some AJAX automation? Or everyone will have to do all the AJAX stuff on his own e.g. using ajax calls to web services.
What I also don't like is mixing the markup with the code (it's a little bit like old ASP isn't it).
I fully agree that this model of MVC would make the application fully controled by the developer what's not always that easy with current ASP.NET model.
I can't wait further news on MVC. Keep up the good work.
Give me some confidence in this endeavor Scott...
;-)
have they been rejected? have they been read? are they being dealt with?
why did the 1 comment that did appear appear? it's basically a "please delete me" comment, if anything it's the only comment that shouldn't be there.
pretty sucky if you ask me.
I`m a german .NET developer and played with the mvc sample and added a simple membershipbased login system: here is the link to my blogpost (scroll down to [ Download Democode ] - the blogpost is in german, but the application in english) :
http://code-inside.de/blog/2008/03/13/aspnet-mvc-preview-2-membership/
You can login, register a new account, get a new password, change userproperties (email and password) and with the admin account you are able to delete other users.
There are a lot of questions in the asp.net mvc forum about membership - maybe such a extended mvc demo app would be usefull.
Can someone give me a link to the source code from these screencasts? I have searched high and low on Scott's site but can't find it. It's probably somewhere obvious but it has got me beat.
Thanks in advance
As usual, the way you present and explain your videos always helps me understand the subject better than other videos.
I am really, REALLY interested in MVC and I've been consuming everything I can about it since it's inception. I've got a better understanding of it since watching videos and reading tons of material, but I'm still foggy on a few things. So in the hopes that I would better understand it by doing, I started a web site and hopefully an MVC project that the community can help with.
http://www.mvcstarterkits.net was starting on April 9, 2008. If you know of anyone, including yourself, who would want to be a part of this open source MVC project, please send them to the site. I want to have several team leaders on this since I'm starting with an e-commerce project.
My problem with MVC is wrapping my head around it and sort of unlearning what I've learned with ASP.NET 2.0 and it's developer friendly UI.
Keep up the good work. BTW, when do you sleep?
Thanks,
King Wilder
Comments are closed.