Tag | MVC Posts

I noticed today that Microsoft is about to release a new preview release of the ASP.NET MVC framework, so I thought I'd say something about that today. For those who haven't really used an MVC framework before, in short, its a flexible architecture that allows you to structure your code in such way as to keep clearly defined layers: a model (database access), a controller (business logic) and a view (a way to view the results of the execution of said logic). I've played around with other MVC frameworks ...
Introduction In Egyptian Developers Conference (EDC) 2008 this April, my geek network noticed a very nice, cute, and sweet little girl with me that I was very proud to introduce not just as one of the cleverest developers in SilverKey, but also as my life mate, my fiancée. Not sure if any of you noticed that by then, although being engaged, we were not wearing rings, yet! Well, WE DID FEW HOURS AGO! Yes, I now wear a ring with Mona's name on it. What a pleasure that is? To understand, you just need ...
Employee Info Starter Kit is an asp.net starter kit, which demonstrates the use of simple CRUD operations for maintaining a company's employee information. It has been developed by me as a guideline for building enterprise level projects. In last few months this starter kit placed in the top chart at code.msdn.microsoft.com for several times regarding the popularity. A very exciting news for all of Employee Info Starter Kit fans is yesterday this starter kit has been placed in the front page of Official ...
UPDATE: The component controller was removed from the MVC framework before the RTM release. For an updated version of this post, click here. At some point when creating a web app, you're going to want some reusable UI components. This might be because you want the same visual UI snippet repeated more than once on a single page or it might be because you want to use the same component on multiple pages. In a traditional ASP.NET web app, typically you would use a User Control for this type of thing. ...
I’ve have just sent this email to the developers exchange group in my company: I think you all know the routing engine that works with ASP.NET MVC framework to enable customizing URLs and mapping those to the corresponding controls, actions and their parameters. Some of you may know too that the routing engine is not just for ASP.NET MVC, but ASP.NET in general. If you happened to download the source code of the ASP.NET MVC framework (any preview), you’d have noticed that the routing comes as DLL ...
Microsoft is getting very close to releasing the new ASP .NET MVC framework. (Click here for more info). When I first took a look at the preview, the first thing that popped in my head was “it’s about time”. I must admit that I haven’t spent a lot of time with this new framework. So, my knowledge is somewhat limited; however, I can’t stop thinking about the following: 1) Why stop at ASP .NET? Why not create a common MVC framework for both the Windows and Web development? 2) Can WPF coexist with MVC ...
The latest release of the MVC framework provides the JsonResult for Controller actions. I was surprised that I did not find a weatlh of examples for usage so I figured it shouldn't be too hard to get a decent example going. It turns out, it was even easier than I anticipated. I wanted to create an example where I would invoke an AJAX call to dynamically populate a dropdown list. jQuery has recently received a huge surge of interest of the ASP.NET MVC community so I've been getting up to speed on ...
I've been at Microsoft a little over a year and a half. I'm very excited about a number of the new technologies that are here and on the coming roadmap. Microsoft is at a point where it's more open than it's ever been. The level of community involvement in projects like the ASP.NET MVC framework, IronRuby and much more has been historic. I get that it could always be better. But don't (as Joe Brinkman put it) throw a brick through my window to tell me that... More on my blog at Ranting and Raving ...
The Test-Driven Development talk I gave last night at the Kansas City Dot Net User Group meeting seemed to go really well. This was my first ever talk and it is something that I am very passionate about. There were definitely some technical glitches. I recorded my demos ahead of time using Cam Studio and that was good, but I didn't bump up my resolution so the people in the back could see the code. I will have to make sure to set the resolution higher next time. The turn out was stupendous. There ...
To set a normal text box in the MVC framework, the most typical code would look like this: 1: <%=Html.TextBox("FirstNa... ViewData.Model.Contact.Firs... The key here is that you should set the name of the textbox to be the exact same name of the property name. If you do this, then it enables you to use extension methods such as the UpdateFrom() method to automatically populate your object from Request.Form parameters when you post to your controller action. This is all well and good but ...
Introduction In all honesty, this review may be a bit premature. However, I wanted to record my thoughts and see if anyone listening shares them or has a difference of opinion. I've been evaluating the SlickEdit Tools and have come up with a few top picks. Also, I have identified some that make little difference to me. First of all, the Tools are segregated into two products: Editing Toolbox and Versioning Toolbox. I'll review them separately. Editing Toolbox Top Picks: Acronyms - This one is quite ...
UPDATE: This post is now out of date as of the CTP5 release of the MVC framework. For the lastest version, see this post here. One of the areas of MVC that is still an open area in development is how best to handle UI validations. There are numerous approaches currently being examined. MVCContrib Validator Toolkit for MVC The Enterprise Library's VAB is great because it allows you to specify all your validation logic in your business layer where it belongs rather than in your UI. Additionally, it ...
· Everything You Wanted To Know About MVC and MVP But Were Afraid To Ask · Functional Programming in C# 3.0: How Map/Reduce/Filter can Rock your World · MbUnit 2.4 - Avoiding Crappy Data Resulted From The Test · Managed Extensibility Framework · IronRuby at Tech Ed 2008 · Velocity: A Distributed In-Memory Cache from Microsoft · Must See WF/WCF Influencer MSDN Webcasts · WCF Webcast Series (Old but good) · Using CSS to Fix Anything: 20+ Common Bugs and Fixes (Found by Mohamed Tayseer) · A jQuery Client ...
When Asp.net AJAX was about to be born I was an early adopter. I dutifully downloaded each new preview and upgraded my solution to handle the API changes. This experience taught me that living on the edge is a world of pain. Each new release could mean hours of wasted time, just to get back to where I started. Since then I have avoided working with pre-release software - until Asp.Net MVC came along looking too good to refuse. So now I am back in the familiar cycle of responding to preview releases. ...
SNOOP is a fantastic tool that provides the ability to change the value of any UI property at run time. A Request Splitting attack abuses flaws in asyncronous requests and allows to inject arbitrary headers when an Http request is built, with reference to AOP using System.Reflection.Emit. The key difference between processes and threads is that processes are fully isolated from each other while threads share (heap) memory with other threads running in the same application. A blocked thread doesn't ...
Ever since the new ASP.NET MVC framework was announced in October, posts about it have spread about it like wildfire through the .NET blogosphere. There's usually at least 2-3 MVC stories a day that show up on DotNetKicks. At the last Philly.NET code camp in January, there was standing room only for the ASP.NET MVC talk (see photo to the right). Similar crowds have shown up at the HLS DevCon in Atlantic City, Central Jersey .NET & Fairfield/Westchester .NET user groups to hear about it. With ...
UPDATE (6/20/08): If you are at all confused about some of the techniques outlined in the blog posts by Udi and Ayende I discuss below, specifically about their multithreading-capabilities, you might want to check out my future post here. --- One of the first issues I have already found myself having to deal with in my game is the idea of how messages will be sent "from the entity" (since the entity is ultimately in charge of when something happens, and thus must trigger a message being sent), without ...
This is problematic with ASP.NET AJAX. The main Script Components are NOT sent to the client when in :Legacy” mode. This is “By design” in ASP.NET AJAX, although it is a clear limitation!! I’m investigating the problem for other solutions and will be sending an update soon. Thank you, Iman Halawany, for making me note this. I’ve been working on WCF services and ASP.NET MVC stuff lately than normal webforms, so, didn’t realize this obvious showstopper. To all my readers, I owe you a BIG apology. The ...
Scoot Guthrie's Announcement (With detailed walkthrough) Scott Hanselman's Announcement (With note on VS 2008 SP1 BETA) Resources: Installer Source Code Documentation Homepage Videos Introduction to ASP.NET MVC Preview 3 Basic Application Building with ASP.NET MVC Preview 3 Phil Haack's Northwind Demo Cross posted from weblogs.asp.net/meligy ...
Join my colleagues of the Magenic Technology Council (MTC) at the first annual Technology Summit in Chicago on June 20, 2008. This geeky, two-track, day-long mini-conference is packed with great sessions and keynotes by Rocky Lhotka and Jay Schmelzer, Group Program Manager on the Microsoft Visual Studio team. In the Developer track, members of the MTC will present on code quality, the ASP.NET MVC framework, LINQ indexing techniques, WPF and Silverlight in UX design. The Server track offers sessions ...
HTTP methods are not often thought about when coding Asp.net webforms applications. Links are GETs, buttons are POSTs and it all happens automatically. With Asp.NET MVC, and other MVC frameworks like Rails, the HTTP method used is more obvious and developers are begining to care about which they use. The problem is that GET requests tell visitors to your site, including search engines, client-side web optimizers and other automatic tools, that it is safe to make the request. Which is a problem if ...
I have been working with ASP.NET MVC for some time and yet I still had trouble trying to generate a URL in a view. URL generation is particularly important for ASP.NET MVC because it uses a routing engine to map URLs to code. If we hard code a URL then we lose the ability to later vary our routing scheme. I have found two ways that currently (ASP.NET MVC preview 2) work to generate URLs in a view. The first uses the GetVirtualPath method and seems overly complicated - so I wrapped it in a global ...
Recently I’ve been working a lot with the new ASP.NET MVC framework, with Preview 1 (bleh) and the interim drop, Pre-Preview 3? The ActionResult is a fantastic addition, making the framework far easier to test. However, I noticed I was basically doing the same thing for each test: [Test] public void TestSomething() { var actionResult = controllerUT.Something() as RenderViewResult; If ( actionResult == null ) Assert.Fail(“ActionResult was null.”); Assert.That(actionResult.Vi... Is.EqualTo(“ViewName”)); ...
ASP.NET related Kigg - Building a Digg Clone with ASP.Net MVC Part - 1 The Making of Blogo.NET Configuring & customizing the health monitoring system of ASP.NET Mobile Application related alcheMo - Technology (J2ME to BREW and iPhone porting solution) Mojax (Mobile Ajax application framework) - it provides access to device capabilities like Camera API, Location Services, Contacts and more. Android Weather Forecast - Google Weather API - Description Android Poor mans GPS - Cell (Tower) ID / Location ...
Microsoft .NET framework 3.5 Service Pack 1 and Visual Studio 2008 Service Pack 1 now have public BETAs. The service pack of Visual Studio 2008 has really interesting stuff. Highlights I'm interested in are performance improvements in HTML editor, collection of JavaScript intellisense hotfixes plus new ones enabling better JavaScript intellisense for libraries like jQuery, JavaScript Code Formatting, ASP.NET Routing engine (the one used in ASP.NET MVC, it is actually developed as separate component), ...
Our www.Phillydotnet.org second installment of the 2008 Code Camp series will be held at the DeVry University campus in Fort Washington, PA on Saturday, May 17 from 8:30-5:00. Please register on our web site.-->Detailed directions are on the DeVry web site. sold out. There will be another Code Camp in May.--> Lots of code, just say no to slides! 8+ hours 40+ sessions (8:30, 10:00, 12:30, 2:00, 3:30) 8 tracks + lunchtime entertainment 500 seats with tables (laptops welcome) Free breakfast, lunch, ...
Quote: ...legacy code is simply code without tests. - Working Effectivly with Legacy Code - Micheal Feathers I was discussing testing with a friend the other day, mainly Test Driven Development and we got onto the topic of new code without tests and retrofitting them. The first thing that popped into my head was the above quote and the following: Quote: Code without tests us bad code. It doesn't matter how well written it is; it doesn't matter how pretty or object-oriented or well-encapsulated it ...
ASP.NET MVC is going pretty HOT these days so I thought I should post some links to the ASP.NET MVC Videos which are hosted on www.AspAlliance.com. Video: Introduction to the ASP.NET MVC Framework Video: ASP.NET MVC Framework Unit Testing Video: Passing Parameters Across Pages Using ASP.NET MVC Framework Video: Url Rewriting Using ASP.NET MVC Framework Video: Introduction to the MVC Toolkit Video: Using JavaScript with the ASP.NET MVC Framework Video: Implementing Controller Action Authentication ...
When developing www.RefactorCode.com I was advised to create friendly URLS so that search engines like Google, Yahoo, Live Search etc would be able to index it. Ben Sheirman suggested that I should try out IRouteHandler interface which was originally part of the ASP.NET MVC Framework. I implemented the URL-Rewriting solution which worked on my local machine but failed on the production. The web host guys told me that currently they don't support ASP.NET 3.5 Extensions Preview (I don't think that ...
Coming Friday, June 20th in Downers Grove, IL The Magenic Technology Summit is a full day of Magenic-provided training. We have lined up an impressive array of speakers and topics in two tracks, .NET development and Microsoft servers. And we have lined up two keynotes. Our first keynote speaker is Jay Schmelzer, who is the Group Program Manager for RAD tools. This basically means he runs the teams for all the Visual Studio designers and related RAD tools. He’s an excellent speaker and should provide ...

I just published a new podcast on www.gridviewguy.com. In the podcast I talk about the new ASP.NET MVC Framework. You can download the podcast using the link below:

Introduction to the ASP.NET MVC Framework

Part of my UG talk the other night involved going over the helper classes that come with the MVC framework. These make it pretty easy to generate HTML that is friendly to your MVC structure without having to hand-bomb the markup yourself. You can read a great article covering them on Rob Conery's blog here. One of these helpers is Html.Form. This outputs a form tag with the appropriate href for handling any submit action that occurs. In the code below, you can see that I've got three helpers: the ...
When you create a new project with the MS-MVC Framework, it defaults to giving you a controller, model, and view folders. The recommendation is to keep that structure if you're going to be developing your application out of one project. But what if you want to split it up into separate projects: one for the views, one for the controllers, and one for the model. This question was raised at my MVC talk on Tuesday at our local user group and we had a bit of theoretical discussion about how yes, it could ...
I remember playing this game on my Sega Genesis...it was one of the Phantasy Star series where eventually your character had to get married. Who you chose as your wife would determine which character you would get in the *next* generation (or phase of the game). I feel like I'm reliving that, only my console has been replaced with the world wide web and my choices aren't nearly as sexy. For the last 7 years we've been learning the web form framework, learning the ins and outs of state management ...
I've just upgraded to the latest version interim drop of the MVC framework and MVC Contrib (which I can't seem to build from source using NAnt...). Everything appeared to be ok, except for one thing: a controller action that uploads a file was now throwing an error: cannot convert from 'System.Web.HttpPostedFileB... to 'System.Web.HttpPostedFile' After a few seconds of confusion I quicky dawned on me that this might be a very good thing. A quick look at the System.Web.Abstractions confirmed my throughts, ...
In my previous installment of recapping the events from ALT.NET Open Spaces, Seattle, I covered pretty much the opening ceremonies as it were. The weather was definitely interesting the entire weekend. Who would believe that we had snow, hail and rain for most of the time we were there in the latter half of April? Mind you it didn't stick, but if you believe in God, there is something to be said of ALT.NET coming to town. Coverage Galore Jeffrey Palermo was gracious enough to capture the opening ...
I've got news for everyone out there: VB.NET isn't going away anywhere. I've got other news: C# is a great programming language. So is F#, and Iron Ruby, and Iron Python, and <insert language here>. In fact, now more than ever we have choices as to what language we can use for our development, and for some reason *that* fact has been lost in the noise of the language argument. Here are some facts: VB.NET has been a great language for those who were exposed to VB 6.0 and made for a very easy ...
We had a pretty good discussion on the MS MVC framework. Phil Haack and Brad Abrams were in the house for it, and it pretty much turned into a "let's grill the Microsoft guys" sort of forum...which I think is ok...I mean, who better to answer the questions and offer feedback to? I was *really* impressed with our audience. We had about 40 people in the room, and there was *much love* for the new framework and the work being done. There were some tough questions, but nothing along the lines of what ...
This (04/16/2008) did not started out on the right foot. I missed the last bus to the Microsoft campus which left at 8:15 AM (I know it is too early to be the last bus). So, I went inside the hotel and asked for help. Anyway, I found two other guys who were in the same situation. I told them let’s take a taxi since my company will be paying all expenses. It was in the car that I realized that I am sharing the taxi with David Laribee and Scott Bellware(I guess everything happens for a reason). We ...
This (04/15/2008) was a fun day! It started out with breakfast where the only thing I could eat was muffins so I ate two of them. I had breakfast with Venkat Subramaniam. We talked a little bit about what we are working on and what exciting things are happening in the technology field. Later during the breakfast I spotted Sahil Malik. A gentleman that I am I immediately went to him and told him about his great book about the ADO.NET framework. The first session was about Silverlight which was given ...
There was a new source code release of the Asp.Net MVC framework . We just got the MVC Contrib project upgraded to work against the new release. You can find the release here. First I would like to thank Jeremy Skinner for his hard work upgrading the release! Here is what changed in the release: Upgraded to the 0416 Source Code drop of ASP.NET MVC. Moved most of ConventionController's logic into ConventionControllerActionI... ControllerDescriptor now only treats methods that return an ActionResult ...
Technorati Tags: Canadians @ MVP Summit 2008 Thursday was the last day of the MVC summit and it went out with a bang! We assembled at the convention centre and were treated to keynotes and question/answer sessions with Ray Ozzie and Steve Ballmer. The Canadians were assembled en-masse and we definitely made our presence known. This was the first time I'd heard Ray Ozzie speak, and although he'd definitely not the rah-rah guy that Steve is, he has the same thoughtful demeanour that Bill Gates has. ...
Sourced from: The official Microsoft ASP.Net site New features are being added to ASP.NET and ADO.NET this year that increase the power of the .NET Framework 3.5. These enhancements target: Enabling high-productivity data scenarios by using the ADO.NET Entity Framework, ADO.NET Data Services, ASP.NET MVC, and ASP.NET Dynamic Data. Supporting test-driven development by using a powerful and extensible ASP.NET MVC framework. Creating the best server for rich clients by using AJAX history support and ...
Schott Hanselman twittered tonight about a tool he came across called Ivanna. It's a unit-testing tool for web forms...not the MVC framework based stuff but the 'old school' front-controller based ones that are still obviously in the majority of aspx applications. As this blog post shows, the idea is that you create an instance of the page in your unit test, populate the controls via code, execute a postback, and then assert that the values in the controls are what you expected. The example used ...
Today was extremely busy and exhausting as well. The routine here is to wake up early, grab a boxed breakfast and coffee in the huge ballroom at the hotel and then run off to where the buses are parked to take you to the Redmond Microsoft campus. I scheduled meetings with some Microsoft personnel today along with poking my head into some of the sessions that were going on at the Conference Center. I continued to evangelize computer science education and spoke with interested people about the concerns ...
Microsoft has released a training kit for .NET Framework 3.5 Enhancements. It includes labs, demos, and Power Point files for the following technologies: ASP.NET MVC ASP.NET Dynamic Data ASP.NET AJAX History ASP.NET Silverlight controls ADO.NET Data Services ADO.NET Entity Framework ...
I'm here in the MVC Framework talk with Phil Haack and Scott Hanselman. Here we go... - Pie chart showing influence...part Hanselman, part Haack, the rest MVP's...where is Conery on the chart?! - Scott is talking about the solid foundation that Web Forms have...he mentions something and Oren starts waving his hand and yelling "No its not!". They're going to meet at the Microsoft playground after the session. - The key message coming out is that MVC is *not* a replacement to Web Forms...Car vs. Motorcycle ...
A comment was just made in the session today about preventing developers from doing something. The response was, in a nutshell, "Well, tell them not to do it." I've noticed this in a few sessions/discussions that I've been part of at the MVP summit. Yesterday in our ASP.NET open space, we talked a lot about the MVC framework and the challenges coming up between MVC and Webforms. Alot of the discussion revolved around what this means for developers and learning, knowing what is the best practice, ...
Wow...what a day. My last post covered the early parts: we had a lunch provided, then into the keynote. Sean O'Driscoll was the keynote presenter and did a fantastic job as usual. Sean has actually announced his leaving from Microsoft, and they gave him a great tribute as part of the entire presentation. Very kewl. After the keynote it was off to the open spaces sessions. I attended one on ASP.NET and discussing the MVC framework. We had alot of good discussion, but what I really got out of it was ...
There's no denying that the MVP summit is a great time of socializing and partying...everyone gets together with their peer group and has a good time. I'm hoping though that through this week there will also be some time to "get work done". I have some things I'd like to raise with other ASP.NET MVP's and also community leaders on a whole (most MVP's happen to be community champions). How do we inject good coding practices for existing ASP.NET webform dev? I was talking with someone after my TCCC ...