-
MVC coding in VB (part 416)
The bits move on, and only the code keeps changing.
My complaints in the last post are no longer valid. As of the 4/16 release of the MVC framework, VB no longer has that weird behaviour. Now, all action methods must return an ActionResult, so they become functions in both VB and C#.
Of course, you already knew that because you're not behind on your reading, and you've already read ScottGu's post on this. I just read blogs for a living (partly), unfortunately the posts I want to read oftimes get pushed back because of it.
-
MVC coding in VB
Don't ask why, but I decided to try to use the porridge that was "just right" in VB while trying to create a site using the new ASP.NET MVC framework. As I will no doubt forget the syntax to use in about 42 seconds, I'm including it here. Others may find it useful as well.
ActionLinks:
<%=Html.ActionLink(Of ViewEngines.CategoryController) _ (Function(c As ViewEngines.CategoryController) c.Add(), _ "Add Category")%>
Form definition:
<% Using Html.Form(Of ViewEngines.CategoryController) _ (Function(c As ViewEngines.CategoryController) c.Update(ViewData.CategoryID), _ FormMethod.Post)%>
The Function(c as ViewEngines.CategoryController) c.blah syntax is the equivalent syntax to the shorter, more symbolrific C# syntax: c => c.Add()....
-
Silverlight inspiration
While these pages are in Flash, they can/should also be inspirational for those working in Silverlight. Probably even for WinForms and ASP.NET developers.
As the good Jon Galloway pointed out the other day, Silverlight developers should really think of what they are doing from the user perspective, not from the developer "oh, shiny!" perspective. Don't just create something that could be done in HTML with a little JavaScript. Doing this just creates a site that is less functional, less searchable and overall less worthwhile. (yes, I'm looking at you Download center beta)
There was a backlash against Flash when people added it...