Tag | MVC Posts

As I am learning about TDD and MVC, one thing comes up. How should I arrange my models, views and controllers? Of course, I know I need to set up the models view and cotrnollers folders for ASP.NET MVC, but what view actions should go into a controller? An example may help illustrate my question: In the default project template for an ASP.NET MVC app, you get a HomeController which has to actions in it: Index and About. Should the about really be an action on the home controller? I guess my initial ...
I really enjoyed speaking at this past weekend's CMAP Code Camp. I hope you all enjoyed my presentation on "Loosen Your Dependencies with Dependency Injection and Inversion of Control Containers". It was a great discussion to have with everyone and I like to learn there as much as I teach. I also enjoyed teaming up with Scott Allen on his "A Gentle Introduction to Mocking" where we talked about mocks versus stubs, test pattens and mock frameworks such as Rhino Mocks and Moq. Hopefully we'll be doing ...
Now that Unity has been released into the wild, there has definitely been a bit of interest swirling around it. One of my key wants for a good IoC container is basic interception capabilities. My criteria for evaluating a container usually comes down to the following: Configurability (XML, DSL, Code) Dependency Resolution, usually opinionated Lifetime Management (Per Thread, Pooled, Singleton, Transient, etc) Extensibility for Interception So, I realized that Unity was missing some of these things ...
Rob Conery has release some cool screencasts on ASP.Net MVC Storefront series: ASP.NET MVC: Introducing The MVC Storefront Series ASP.NET MVC: MVC Storefront, Part 2 ASP.NET MVC: MVC Storefront, Part 3 Scott Gu has written an article (no need to mention excellent) on ASP.NET Dynamic Data Preview Blake Caraway has written a good explanation of Agile methodology usage. check here --Manish ...
Well, Brad Wilson and Jim Newkirk must really be busy lately. After I talked about the release of xUnit.net RC2, just today, Brad announced the release of RC3. As always, you can find the latest bits here. This fixes a number of bugs and adds CruiseControl.NET and ASP.NET MVC Preview 2 support as well in addition to the Resharper 3.1 and TestDriven.NET support. For more information about it, check out Brad's post here. More or less, they are feature complete for version 1.0 and the only that I think ...
Rob Conery has started posting a series of web casts on building a storefront website with the MVC framework and using TDD principles. Rob has been very forthcoming in that he is *not* an expert in TDD, and he is *not* doing this series as a "how to"...more of a "learn along with me" type of thing, which is great! If you haven't done TDD before and want an interactive way to learn, consider following Rob's series and interacting with him via his blog. Initial Webcast Second Webcast D ...

I just got the email that my birds of a feather session on 'ASP.NET vs MVC - What's your Take?' has been accepted! It's slotted for June 4 at 7:45 - 8:45 PM, so if you're interested in having a lively talk about the future of web development, how the MVC framework will play into the larger web application initiatives of Microsoft and your own companies, and share your stories and experiences with the MVC framework, c'mon over and get into the conversation!

D

So now it's over. Conference is finished but we will all remember the best moments spent in last Saturday (04.07.2008). The pizza, gifts and knowledge about new things which we all learned is priceless and that's why I would like to thanks to all speakers and organizers. I also added some pictures from conference: 1. Welcome 2. Maciej Szczepanski and Pawel Lesnikowski in Test Driven Development (TDD) in practice. 3. Martin Kulov and "Debugging and Crash Dump Analysis of ASP.NET Web Sites". 4. Jaroslaw ...
As Chris Tavares mentioned in his blog, Unity 1.0 has been released a couple of days earlier than the April 7th release date mentioned by Grigori Melnik earlier. Scott Densmore also announced this as well as working on porting the inteception from ObjectBuilder2 which I talked about earlier in some of my Unity and IoC containers posts. Looking forward to that post as we've shared some emails on the subject. Would You Like To Know More? For those looking for my posts on the matter, I've covered it ...
And so the Twin Cities Code Camp came to an end yesterday, and Jason and his team did a phenomenal job once again. The turnout was even higher than last year, and the presentations and speakers were a who's-who of talent from Minnesota and the surrounding states. I was able to connect with a few new faces, like Javier Lozano, Chris Sutton, Bryan Sampica, and Chris Johnson, among many others. It was a great community event. My afternoon presentation on Developing ASP.NET with MVC without the MVC Framework ...
Having a ball here in Minneapolis (although the lack of sleep is going to smack me in a little bit...if not already)... My presentation went well enough I think. I ran into some hardware/software issues, and I need to better streamline how I cover the different aspects of how the MVC projects are structured. I also discovered an important rule when it comes to technology presentations: Don't assume that its as easy for something to work the way you think it would. Especially with the MVC framework. ...
One Line Statement Microsoft's IoC container Unity, hosted on CodePlex as an Application Block for Enterprise Library is now released in ver. 1.0. Introduction If you do not know what IoC is, you might want to check sample articles: The semi standard Dependency Injection (DI) and Inversion of Control (IoC) article by Martin Fowler (Tip, read as much as you can from this guy's writings - and thank me for suggesting it) [Warning: Not .NET Specific] Understanding IoC Container (Simple "down to code ...
For someone like me, who has never traditionally done test-driven development, it sucks. It's hard to get used to writing the test first, then when you write your test, it's easy to start writing the code to make the test pass and forget that you're doing TDD and just continue coding. It's also hard to know WHAT needs to be testing and HOW to test everything you need to, at the appropriate isolation level. To add to my frustration, I starting my first fully test-driven project (on my own) and learning ...
UPDATE: More posts on the subject xUnit.net RC3 Just Released Earlier this week, I wrote about the latest release of xUnit.net RC2. Since that time, Brad Wilson and Jim Newkirk released a new version to fix some of the issues with regards to TestDriven.NET integration and ASP.NET MVC integration. You can read more about the issues here. As always you can get the latest bits here. The Installer If you browse to the releases page of xUnit.net, you will notice an installer. This installer will help ...
I am creating a blog engine. Not because the world needs another, but because there are some techniques I want to learn about and creating this very straight-forward project will allow me to do that. First step was to create the project and start experimenting with Test-Driven Development inside MVC for ASP.NET. I started by searching for TDD MVC and ASP.NET which led me to this article by phil haack. While trying to put together some of my first tests, I had to use a mock object. The easiest way ...
I'm super pumped to be speaking at the Twin Cities Code Camp this weekend in Minneapolis! They have a fantastic set of speakers and sessions, and recently extended the schedule to include a sixth track! I'll be doing talks on introducing the Microsoft MVC Framework as well as how to implement MVC into your web-form based applications. Other topics cover everything: Workflow, F#, ORM, WCF, Spatial Computing with SQL 2008, Silverlight, Sharepoint, LINQ, CSLA...30 sessions over an 8 hour period...its ...
I've have been pretty quiet lately. Actually, I've been quite busy and it turns out that there isn't much new to share. However, this is one thing that comes to mind. A recurring pattern in my UI is selection criteria that can applied to a GridView. It turns out that frequently the same criteria applies to various screens. I use LinqDataSources to bind to DropDownLists for many of the criteria. It is not uncommon to use one controller for every page. Following this approach, I ended up with the same ...
UPDATE: I see a lot of comments which make me feel that this post has been useful. There have been a lot of queries also around the inability to find the download link. For the benefit of those, I am posting direct link here Download Mobile Web Form Templates for Visual Studio 2008 Now, for some for information around why it has been missing Visual Studio releases. According to Omar Khan from the Web Development Tools team, ASP.NET Mobile Webforms are really only useful for last generation ‘WAP’ ...
UPDATE: More posts on the subject xUnit.net RC3 Just Released Relooking at xUnit.net RC2 UPDATE: xUnit.NET RC2 New Drop includes ASP.NET MVC support and better GUI runner. Details here. UPDATE: Added Static Methods mention and F# - Thanks to DevHawk! I've been a big fan of such testing frameworks as NUnit and MbUnit, but recently I've found myself getting pulled more towards xUnit.net at least to play around with for any of my code samples that I write for this blog and on my own time. I'm not really ...
We are delivering Virtual Tech Days on April 9th and 10th (http://www.virtualtechdays... delivering a series of webcasts on different tracks ranging from SQL - BI to Visual Studio for Devices. Infact the three important tracks are SQL Server 2008, Visual Studio 2008 and Windows Server 2008. These would be in depth sessions covering specific topics on each of the above products. For Visual Studio we have dedicated tracks for Application Development and Lifecycle management using Visual Studio 2008 ...
I started working with sandcastle to generate api documentation for the Asp.Net MVC - MvcContrib project (http://MvcContrib.org). I wanted to get some feedback as to how useful the general API Namespace/Class listings are. Below are two of the outputs of the documentation. I encourage you to take a quick look at it so that you can provide feedback. To Subscribe to this RSS feed use this url: http://feeds.feedburner.com... Here is an html versions that the project could host online. http://mvccontrib.googlecod... ...
The title of this blog post might be a slight misnomer because it isn't dealing with MVC directly. It's dealing with something a little more high level (oddly enough). I'm working on a personal project when I have time. I haven't played around with Battle.net in a while and there's still a fairly active user community around it (not to mention that Starcraft 2 is going to be released one day). On top of everything else, I learned so much about all kinds of topics (design patterns, reflection, UI ...
I thought I would take a small moment to introduce myself and give some context around my opinions. I have been developing software professionally for 12 years in consulting, product development, corporate IT, premium Brand web sites and e-commerce. I until recently worked for a well known golf equipment company as the Director of eCommerce Technology. In this role I have worked on a number of ecommerce sites and have learned a great deal about online retail for both new and used products. I have ...
I just released the latest build in binary and source code format on CodePlex. To Subscribe to this RSS feed use this url: http://feeds.feedburner.com... What's new in this release?The following items are changes from the previous release: Revision: 275- corrected some warnings/errors.- added ViewDataExtensions. This brings the functionality of the smartbag to ViewData.- now, we have easy adding and getting to and from ViewData. No more casting, and if you only put a single "Customer" in ...
Chris Tavares wrote a great article no creating applications with the ASP .NET MVC Framework in the March Issue of the MSDN Magazine. Chris does a great job of grounding the reader with an understanding of the Model View Controller design pattern. The article also comes with a download code sample to help you get started. This is the future of web development get a jump start with the article on Building Web Apps without Web Forms. Technorati Tags: MSDN Magazine,ASP .NET,MVC,ASP .NET MVC ...
As I've noted before, Dave Laribee was recently interviewed by Scott Hanselman on Episode 104 of Hanselminutes. The reaction that I've seen has been pretty positive from what I've seen. It's great to see the ALT.NET message being spread outside the core believers group. Many people can be turned off after a few discussions on the altdotnet mailing list and not get the real gist of what the group is about. Dave did a great job explaining the core principles of ALT.NET which are: Use the right tool ...
In a recent post, I mentioned that I was working on a customized grid view. Last week I completed the "binding to user settings" behavior. Then I took a look at the source and was stunned. I had almost 700 lines of code (and comments) and it wasn't well organized. So, I set out to start adding regions to the code to separate different behavior. The last sentence should have raised some flags. Regions to separate behavior? What happened to the cohesion of my grid view? I seem to have lost sight of ...
As of yesterday, the ASP.NET MVC Release 2 source code has been made available on CodePlex. ScottGu made the source drop announcement earlier this morning. Congrats to Phil Haack and the ASP.NET MVC Team for shipping the source code. It's worth noting, it's not Open Source in the way that it's just a zip file and no outside patches are to be accepted, unlike IronRuby. The plan going forward is to make incremental drops of the source code going forward. As always, check out Jeffrey Palermo's MVCContrib ...
There are some key practices that all Agile developers should be familiar with. In fact, "familiar" probably isn't strong enough. One of these practices is test-driven development (TDD). As one of the most important activities it ironically requires a lot of discipline. What does Red-Green-Refactor mean? Here is a brief description. There are plenty of places to learn about TDD and Refactoring in more depth. Red: write a test (it fails of course) Green: write the least amount of code (the simplest ...
I've been investigating the ASP.NET MVC framework for some months, in between a major client project in January and holidays in Frebruary. In that time the ASP.NET team have been beavering away and released the MVC Preview 2 March CTP (download it here). Jeffrey Palermo has some great blog posts over at codebetter.com which detail some of the improvements. The big news for me was that I could finally upload any applications to my development site, which is on a shared hosting server at discountasp.net, ...
Well, I've had the urge to find all the videos I could and watch them to find out all the goodies I missed while not at MIX08. If you missed any of the main sessions, you can find out more about them here. Note that there are 88 sessions recorded here, so it's a lot of good viewing material. Best of all are Scott Hanselman's MVC Videos can be seen here. He also covers the MVC Mock Helpers which better allow for unit tests using various Mock frameworks including Rhino Mocks, TypeMock.NET and Moq. ...
So, I've been avoiding this whole ASP.NET Model View Controller (MVC pattern) thing for a while. That it, until late last week, when it landed squarely in my lap. We're going to be using it at a client, so I better get familiar with it. I had read a few articles online about the Model View Presenter (MVP pattern), and those read like stereo instructions, only not as exciting. So, as you can probably imagine, I was less than enthused at having to pick up YANT*. Fortunately, fate was smiling upon me ...
You could almost see the tears in his eyes as he wrote the blog post. Rob Zelt, nestled at his computer, pleading for someone...anyone...to come to the aid of the Birds of a Feather sessions and take it from a "Well that was fun" level to "OMG, my head JUST EXPLODED from the amazing discussion!" I heard Rob's cries...and I'm happy to report, that the call has been answered. Ok, so now that my dramatic intro is out of the way, the BOF (Birds of a Feather) sessions have become one of the hallmarks ...
Update: IoC and Unity - The Basics and Interception As Grigori Melnik noted on my blog previously as well as his own, there was a brand new drop of the Unity Application Block as of March 4th. This by far was a huge update with a lot of breaking changes. That teaches me to use a CTP of any product and blog about it actively as it compares to other Inversion of Control (IoC) containers. Glad I didn't do a lot on ASP.NET MVC just yet but I have a few good projects going on the side with that now. Where ...
http://www.hanselman.com scotths@microsoft.com New web project type for asp.net More control over your </html> Testable framework Not for everyone Master Cheif GU! .NET 3.5 MVC web application template. Options: Enable testing right out the gate. NVUnit or any Unit. No testing option System.Web.MVC System.Web.Extension System.Web.Routing [Namespace] Controllers Models and Views Controller is a base class Index and about public class's {controller/action} Direct relationship. Flexible Fundamental, ...
For all those interested in the information and the latest bits from the ASP.NET Team, here are the latest links. Downloads: ASP.NET MVC Preview 2 Silverlight tools including ASP.NET Server Controls ASP.NET 3.5 Extensions Preview from December ASP.NET Updates: ASP.NET Home Page Announcement ASP.NET 3.5 Extensions Download Page ASP.NET 3.5 Extensions Quickstarts ASP.NET Preview 2 (MIX) readme ASP.NET Updated Forums ASP.NET Server Controls for Silverlight Forum ASP.NET 3.5 Extensions Videos Jeffrey ...
Justice - "I have the most amazing news!" Me - "Really? What?!" Justice - "Oh, I'm not going to TELL you! I just wanted you to know that I had amazing news." In a nutshell that was my conversation with Justice this morning. He did drop a few crumbs (he's *SO* dramatic...seriously, the last Dev Teach we were at he hired a few homeless people to walk in front of him dropping rose petals wherever he walked and spray FeBreeze whenever he farted), but basically he's waiting to drop huge info on his blog. ...
Scott Hanselman just updated and/or added some terrific screencasts showcasing ASP.NET MVC, which just went wild as Preview 2 today. He talks about some significant changes from the December CTP and walks through several examples that make understanding and implementing the MVC simple, understandable, and (IMO) ultimately sellable to the uninitiated/uninterested. He covers, with great clarity, several methods for displaying data, working with forms in CRUD operations and helper classes that will ...
With MIX, and meeting the announced MVC roadmap, the new versions of AS.NET Extensions are now publicly available.ASP.NET MVC Framework Preview 2 is available also as separate download, same as Silverlight 2.0 BETA 1 (and Expression studio, Silverlight VS 2008 Tools). Download Links: ASP.NET 3.5 Extensions Preview 2 ASP.NET MVC Preview 2 Silverlight 2 Beta 1 Expression Studio 2.0 Beta Silverlight 2.0 Tools Beta 1 for Visual Studio 2008 UPDATE: Silverlight 2.0 Beta 1 SDK UPDATE: Internet Explorer ...

As part of the Mix 08 conference a new version of the Microsoft MVC framework is available for download.

http://www.microsoft.com/downloads/details.aspx?FamilyId=A9C6BC06-B894-4B11-8300-35BD2F8FC908&displaylang=en

 

The MvcContrib team will be working to get the contrib project up and running on the new version.

I'm working late on a project tonight where I'm implementing a MVC pattern into a non-MVC ASP.NET application. The original application was done in .NET 1.1 and relied heavily on a dataset for accessing the database. A thought occurred to me... Are datasets bound for extinction? Think about it... .NET 1 and 1.1 .NET is released upon the world, and the biggest shift in Microsoft development begins. There are a *tonne* of VB 6.0 devs who are chomping at the bit to try the new fully OO language features, ...
A quote from Jeffery Palermo regarding the Code Camp Project: "The mission of the first release is to provide an ASP.NET MVC Framework solution that can serve as the CodeCamp website for a user group. The project will be able to track and manage multiple conferences for a single user group." Funny enough, Pallermo never seemed to care about code camps. Suddenly he - and others - became the world’s expert on code camps, scheduling speakers, displaying sponsor logos and arranging catering. I wonder, ...
It's beginning to look like the start of the Code Camp Season, with at least 12 scheduled over the next 4 months. If you are organizing a code camp, there is a new open source project that Jeffery Palermo has started called CodeCampServer. The project aims to provide a solution that can server as the web site for a code camp and will be able to track and manage multiple conferences for a single user group. The project will use the ASP.NET MVC Framework and the MvcContrib. The project hasn't had their ...
I just released the latest build in binary and source code format on CodePlex. To Subscribe to this RSS feed use this url: http://feeds.feedburner.com... The following items are changes from the previous release: Added support for InputImage in FormHelper (new methods FormHelper.ImageButton()) Added Password Tag Added support for Password tag in FormHelper (new methods FormHelper.PasswordField()) Updated test to maintain 100% on form helper and UI Changed TextArea to use a full Close tag ...
While playing with Linq and trying to get it to work with Oracle (Linq to Oracle *sigh*), I struggled with the fact that Linq appears to tightly couple business objects with data/persistence. I found myself pondering this fact and trying different approaches to separate the ObjectContext from EntityContext(s). In Linq, the ObjectContext is the object that you provide with a connection string and has the knowledge to send/receive data to/from your database. The EntityContext(s) are the classes that ...
I want to first off thank the 45 members of the Kansas City .NET User Group who attended the presentation held last night. Myself, John, and Doug appreciate the dialog and questions about the topic of ASP.NET MVC Framework and hope to see more interest in the topic as it furthers in development at Microsoft. For those of you who couldn't make it or just want to see what the MVC Framework is all about, check out the samples and presentation located at the end of this post. Recap of A Model View Controller ...
Tonight is the Kansas City .Net User Group Meeting at Centriq Foss in Leawood, Kansas. The meeting should start around 6:00 pm. The topic is MVC in ASP .Net and Doug Butscher, Jeff Julian, and John Alexander should be speaking tonight. So if you can attend I would highly recommend it. If you really want to you can wish me an early birthday, since my 26th birthday is this Sunday (any presents you want to give me I will not turn down:-D). Hope to see you there tonight! Technorati Tags: User Group Meetings,.Net,Kansas ...
Today, I was playing around with ASP.NET MVC Framework when I came to an interesting situation. I was displaying Categories from the Northwind database as ActionLinks. When clicked on the link it will popup a confirmation box asking whether you want to delete the item or not. Here is the code to display the link and the confirmation box: <% foreach (var category in ViewData) { %> <%= Html.ActionLink<Category... => c.Delete(category.id), category.CategoryName, new { onclick ...

The first three chapters of ASP.NET MVC in Action are now available through the Manning Early Access Program. I am proud to announce that my friend Ben Sheirman is also one of the co-authors of the book (Awesome work Ben!) working with Jeffrey Palermo and Dave Verwer.

Keep up the good work and eagerly waiting for the book.

I received the "okay" today to develop our new application in .Net 3.5. This is really great news. I am looking forward to taking advantage of some of the new technologies available. In particular, I will be checking out the MVC Toolkit that Microsoft offers as an add-on. I have implemented MVC/MVP in previous versions of ASP.Net. The experience was cumbersome at best. The real issue I had is that it was really difficult to move the appropriate pieces out of the view and that the view knew too much ...