Tag | MVC Posts

Let's try a simple in-place edit with jquery. For demonstration purpose I am using the plain old HTML file. However, if you, wish you could apply the same technique to asp.net, asp.net mvc or php or any other web application as well. Here is the html that we will be using for the demo. <body> <div style="line-height:3xm;back... Double Click the below paragraph to edit. </div> </br></br> <div class="edit"> Lorem ipsum dolor sit amet, consectetur ...

I am typically starting this blog with the "Hello World" kind of post.  Just to give an brief summary to the curious out there this blog will be a place where I will be putting down my experience with technologies specifically asp.net mvc, jquery, sql server, sharepoint, tdd, design patterns et el.

Also, I plan to record my learnings with developing an asp.net mvc project.

 

Hey all. Just wanted to let you know that the interview that I did with Javier Lozano (lozanotek.com) is now available on DotNetRadio! This was a pretty hefty interview so I had to cut it in half. In the first half of the interview we discussed the following points. How and why was ASP.NET MVC created? What are the pain points of ASP.NET Webforms? What can a WebForms developer expect when moving to ASP.NET MVC? MVC is like BizTalk – it can do anything – it just can’t do anything out of the box! What ...
This post is a follow-up on my series about validating business objects throughout different layers of a software system - domain, persistence, and (ASP.NET MVC) GUI. It demonstrates how a self-written validation can be incorporated into a web page (using a bit of JavaScript) and how this can be mapped to a custom validation on the domain side. A short recap In the first part of the above mentioned series, we developed a simple, custom validation aspect that checks if a value really is a member of ...
We look to learn the Silverlight, WPF and ASP.NET MVC 2 over the next few months. We’ll start developing a data driven application to explore each one of these. I am now in the process of finding a sample database for use. We will start our tutorials from next week. Stay tuned until then. Technorati Tags: ASP.NET,MVC,Silverlight,WPF ...
Today I saw interesting behavior in VS2008: when you try to edit any View in the ASP.NET MVC project, main window of VS is not responding. Effect is like a some “invisible” modal dialog window is shown, and you can’t close it by Space or Enter. When you try to click in any part of VS’s window, you get an error beep. I tried to unload all of add-ins, uninstall Resharper, reset VS settings – it’s useless. Solution is here (big thank you, guys :)): uninstall “Microsoft Visual Studio Web Authoring Component” ...
I was asked a little while back to pull together the best training resources for .NET development to feed into a MSDN UK site. I thought it would be useful to share here as well. By no means everything is listed but sometimes less is more :-). Enjoy: Top Tip: Watch out – these are sometimes big downloads. For instance I just downloaded a high def PDC2009 session at 600MB! I recommend you check out Free Download Manager – it is a great open source tool for working with large files. Offline Training ...
This series of posts discusses the use of an Aspect-oriented programming approach for implementing the validation part of a business domain, using the ValidationAspects aspect library, that sits on top of the PostSharp aspect weaver and allows for placing Design by Contract - style attributes on properties and method arguments, as well as for easy runtime validation of an object's state. This is the third post of a three-part series that discusses the use of these validation aspects throughout the ...
At the recent Calgary Tech Days event I did a presentation on building composite applications with WPF and Silverlight. One question that I get asked frequently when I get to the part of explaining MVVM is how its different from patterns that seem too similar or identical, with MVC and MVP typically being the two common ones raised. Usually my answer is that MVVM is very similar to the others, but it implies *stuff* that’s specific to Silverlight and WPF (how binding works, commanding, etc.). Unfortunately ...
[This is the second in a series of posts on getting started with the new features in Entity Framework 4 based on the demos I did in my session at TechEd Europe in Berlin last week (Nov 2009).] Code generation from the Entity Data Model (EDM) has changed significantly in version 4 of the Entity Framework. The product does retain a backwardly compatible model of code generation but also now includes T4 templates for code generation. This is a fantastic addition to the Entity Framework as many developers ...
Today I had a twittersation about build servers, and how closely they should match the development and production environments. Damian’s position was that the build server should match the development environment, while I held that the build environment should be as close to production as possible. Martin Fowler’s Continuous Integration article says: Test in a Clone of the Production Environment The point of testing is to flush out, under controlled conditions, any problem that the system will have ...
Recently my company just released the first version of a new MVC web site: AlbumCredits.com. This project, led by Oskar Austegard, is was I consider a highly successful real-world implementation of MVC. In a time when most music these days is downloaded, the production and performance engineers, and recording professionals that work on the music don’t always get credit because there is no CD booklet to look through. Album Credits is almost like a LinkedIn for recording professionals. From the about ...
Dictionary<TKey, TValue> is a generic type that stores collections of KeyValuePair<TKey, TValue>. It is used heavily (actually the IDictionary<TKey, TValue> interface) in Asp.Net Mvc as a parameter to view helper methods. I am writing this post because I have a tendency to forget the collection initializer syntax for this type of collection, so here it is: IDictionary<string, int> collection = new Dictionary<string, int>() { { "rows", 7 }, { "columns", 2} } The nice ...
Gil Zilberfeld from TypeMock: As you may know by now (from my tweeting or by looking on the DotNetRadio schedule listed on the site) there is an upcoming interview with Gil Zilberfeld from TypeMock. He will be on the show at 5am PST. Please send in your TypeMock and unit testing questions for him. The submitters of any questions that I use on the show will get some DotNetRadio swag! Jeffrey Palermo from Headspring Systems: What you may not know is that I am scheduling an interview (possibly tomorrow) ...
The Windows Azure team announced availability of the November 2009 CTP of Windows Azure along with new Tooling for Visual studio and an improved Development Fabric as well as samples. The official announcement is given below, straight from the horses’ mouth. Today we released several new features for Windows Azure through the Windows Azure Tools and SDK. This release adds support for Visual Studio 2010 Beta 2 and VWD Express 2010 Beta 2. What’s New · Service Model UI:A redesigned and significantly ...
Going into the whole podcasting adventure was something that I didn’t know if I was ready for or not. I won’t lie, it has taken a LOT more time than I had initially estimated. But getting the opportunity to meet and interact with the people that I have has been wonderful. I thought setting up interviews, given that the site is new, would be difficult. As it turns out getting people to come on the show has worked out quite well. So much so that people are now asking to come on the show directly. Wonderful. ...
It is Friday 13th Nov 2009 - which means it is the last day of TechEd Europe in Berlin. Overall I have had a good week – high quality sessions, lots of time with customers and colleagues and a very smooth conference throughout. I spent the week doing a bunch of things. 9am Monday I was presenting on Entity Framework 4 after 4 hours of sleep and using a brand new VPC after my original failed to load following yet another blue screen from the host (the machine will be flattened next week – perhaps ...

The N2 MVC example updated for MVC2/.NET 4.0

It's on a SkyDrive so follow the link, don't right click and Save

Link

Microsoft has released a new Facebook SDK Version 3.0 (other than their old not-so-great one) and it looks to have not just updated APIs but also wide range of features supported in many application types. Quoting a related blog post from c|net “The web services report” blog: http://news.cnet.com/8301-1... Microsoft on Monday released a software development kit for Facebook that allows developers to create Facebook applications for Silverlight and Windows Presentation Foundation. ...
This Friday, I’ll may have to stop a project due to limited funding. This web project is for a client who ran into a budget freeze (assumed) and haven’t been able to financially support the project until further notice. But that’s ok, most of the project is completed and they’ll have a very nice website with a web-based intranet all built in ASP.NET MVC 2 Preview 2. So, until funds start flowing, I’ve decided to start a new rebuild of Glacsy.com. Yes, another rebuild. But this time, it’ll be built ...
In the first post in this series, I provided a little info on the HandleError attribute in MVC 1. In case you don’t want to flip back, the HandleError attribute can decorate a method or a class and will push your users to a generic errors view provided customErrors is “On” or “RemoteOnly”. There’s a little more to it, but that’s all the background we need for this post. The out-of-the-box HandleError attribute works well, until you’re in a scenario where you need to do more than hide your errors. ...
In an effort to continually improve as a developer, one of the things I do is read lots of books. Recently I read ASP.NET MVC in Action by Jeffrey Palermo, Ben Scheirman, and Jimmy Bogard. In short, I consider this a “must read” for anyone who is serious about developing with the ASP.NET MVC framework. I’ve heard some people say that this should not be your first MVC book because it is more advanced than other MVC books available. While I can understand that logic to a degree, I think it would be ...
I’ve been using ASP.NET MVC Release 1 for a bit now, and while it’s definitely not for every application, I happen to like it quite a bit. There has been a lot of activity on MS-centric blogs regarding MVC, but there are still some really mundane tasks that there could be more information on. So, this series of posts isn’t going to be anything crazy; it will, however, illustrate what options you have to do centralized error-handling using MVC 1. We’ll start at the beginning… The System.Web.Mvc.dll ...
I recently sat down with Ben Scheirman (co-author of ASP.NET MVC in Action) for my first interview on my new show DotNetRadio. It was quite a talk! We covered the following points: An introduction to Ben Scheirman and how he got into web development Bens path through various web technologies such as ColdFusion, PHP, Ruby, and ASP.NET A brief discussion on code testability Working with ASP.NET web forms using the model view presenter pattern How ASP.NET MVC simplifies the testing process Ben informs ...
I am practicing Test Driven Development (TDD) now for some two years or so, and soon this technique of writing software felt so natural, that I hardly could imagine doing it another way or even imagine a reason why I should do so. But on the other hand, I know that not questioning something anymore and not being self-critical from time to time is a certain recipe for running into a disaster sooner or later. So I asked myself: What makes TDD such a natural way of writing software? and What are your ...
I love Test Driven Development. I use this development approach wherever I can. It makes my code a lot better and gives me the confidence that I indeed have crafted a good and reliable piece of code. However, some things are quite hard to test-drive, simply because they have so many dependencies that you would need to make extensive use of a mocking framework (and probably inspecting some things via Reflector...). In such a case, you usually decide to not have unit tests, because the time and amount ...

I’ll be giving a presentation on C# 4.0 New Language Features this Tuesday at the CMAP Main Meeting.

Also I’ll be presenting MVC in the Real World this Saturday at CMAP Code Camp.

Hope to see you there!

I’m sure by now you know that the Visual Studio 2010 and .NET Framework 4 Beta has been released. If not, get it here. There are also some great training resources already available! The Visual Studio 2010 and .NET Framework 4 Training Kit includes presentations, hands-on labs, and demos. This content is designed to help you learn how to utilize the Visual Studio 2010 features and a variety of framework technologies including: C# 4.0 Visual Basic 10 F# Parallel Extensions Windows Communication Foundation ...
[Source: http://geekswithblogs.net/E... We had a fiddly issue with date validation in an ASP.NET MVC page failing for a valid date in Chrome, but passing in Firefox, IE etc. Tracing through our own code and xVal, the issue was narrowed down to the jQuery validation plugin (jquery.validate.js). For simple date validation, the library instantiates a date object from the given text value and lets JavaScript raise errors for invalid dates: date: function(value, element) { return this.optional(element) ...
The traditional, Paul Graham style of technology start-up is: Someone has an idea They try to validate their idea The idea is implemented The idea is communicated to the market While the importance of step 2 has always been emphasized the weakness of the above remains that the product may not gain significant visibility to the market. The products never reach critical mass and so they fade gradually into obscurity. Recently I have noticed a new model emerging that promises far less risk at the tail ...
Since MVC has been released I have observed much confusion about how best to construct view models. Sometimes this confusion is not without good reason since there does not seem to be a ton of information out there on best practice recommendations. Additionally, there is not a “one size fits all” solution that acts as the silver bullet. In this post, I’ll describe a few of the main patterns that have emerged and the pros/cons of each. It is important to note that many of these patterns have emerged ...
This morning, Channel 9 launched the new Channel 9 Learning Center. From Channel 9, here’s a description of what the Learning Center is: “The Channel 9 Learning Center is the destination for free technical training on emerging Microsoft products and technologies. The Learning Center consists of a set of courses with each course including a set of videos, hands-on labs, and source code samples to get you up-to-speed quickly.” I’m pleased to say that Visual Studio 2010 is one of the first Training ...
The Beta 2 version of DPE’s Visual Studio 2010 Training Kit is now live (you can find it at http://tinyurl.com/Beta2Tra... A training kit includes presentations, hands-on labs, and demos. This content is designed to help you learn how to utilize a variety of Visual Studio 2010 and .NET Framework 4 technologies. The Beta 2 release of the Training Kit contains 15 presentations, 19 hands-on labs, and 13 demos. Many technologies are covered in this release, including: C# 4, VB 10, F#, Parallel Extensions, ...
This morning I had the chance to speak with Ben Scheirman. We chatted for roughly an hour or so discussing how he entered into the web development industry, going on the road to teach ASP.NET MVC in its early days, his book ASP.NET MVC in Action, and his thoughts on the use of the MVC framework. We discussed some patterns and tools for testing, tools for development in general such as ReSharper, and the use of the Spark View Engine. Watch for this podcast to be posted within the next couple of days. ...
iPhone Development: Random Thoughts I've been working on the iPhone for month or so....maybe a bit longer. I was interested in doing some iPhone dev ever since I got mine. I love the device (much more than WinMo, sorry) and wanted to create my own apps for it. I was also asked to work with Carbonated Comics (www.carbonatedcomics.com) on an iPhone version of their software, so I joined the team. Great bunch of folks and I really like their product. Anyway, I thought I'd share some random thoughts ...
If you’re a web developer using Microsoft technologies then, unless you’ve been hiding under a rock somewhere, you’ve probably heard of ASP.NET MVC. If you’re not sure what it is, how it works, or why you would want to consider using it, you’ll find three videos on the ASP.NET MVC page that will answer most, if not all, of your questions. Video #1, titled “Why Use ASP.NET MVC?”, is a 3 minute video which provides a high-level overview of ASP.NET MVC for decision-makers. I especially like the motor ...
What is something that is longer than a magazine article and shorter than a book chapter? Give up? It's a Wrox-Blox that Wiley has available online with some going for less than $10.00. Written by the best programmers in the their fields, Wrox Blox are short informational pieces and code that will help get you up-to-speed and keep you up-to-date. Build the knowledge you need quickly on a wide variety of topics. In the DotNetNuke world, there are several of these available for you to review and stay ...
This podcast accompanies the October 8th edition of the MSDN Flash newsletter. It is an interview with Paul Jackson which is meant to be about the article he wrote on Memory Mapped Files in .NET Framework 4.0 but tends to go off in different directions – but we both certainly enjoyed doing it :-) I was interested to hear how he was getting on with Oslo and why he was revisiting ASP.NET after many years of focus on XAML. Show Notes: WebsiteSpark Program Microsoft Ajax CDN Web Platform Installer Version ...
.NET University has a variety of presentations available for download, including code examples and videos. Use the materials to learn or to present at your next DNUG meeting ;) The presentations cover a variety of different topics, so if you’ve already got a presentation planned and you just want to compare, be sure to check’em out. All the popular topics like Silverlight, WPF, WCF, LINQ, and ASP.NET MVC are covered. Instant presentations, just add presenter. http://www.dotnet-u.com Technorati Tags: ...
There's a post title that'll screw with Google results. My fortune cookie from Panda reads: Avoid unchallenging occupations - they waste your talents. This is followed by what appears to be a little ad for Panda Express and Panda Inn (I guess those are the occupations that wouldn't waste my talents). Overall, I agree with the cookie, but I could use a little less challenge for a while. I haven't posted in a bit largely because of the challenge. Writing your own MVC framework from scratch is not something ...
If you dont want to use strings but instead use strongly typed expression syntax in ASP.NET MVC, you can use the HtmlHelper<TModel> and AjaxHelper<TModel> types that are exposed on the ViewPage<TModel> base class. You can then write syntax like <ul> <%foreach (Product p in ViewData.Model.Products) { %> <li> <%=Html.ActionLink<Ca... %> </li> <%} %> </ul> instead of <ul> <%foreach ...
This Saturday (October 3) I’ll be presenting at Richmond Code Camp. Registration is still open. I will be presenting “MVC in the Real World” – Move beyond MVC 101 and dive into aspects of building robust, real-world MVC applications. This demo-heavy presentation will show how to fully unit test the presentation layer with mocking and Dependency Injection. This session will show the benefits of using Inversion of Control (IoC) containers to create controllers with a custom controller factory. In addition ...
Wrzuta.pl, this is a polish site similar to youtube. It allows to watch movies and listen to music, but does not allow direct downloading them to disk. In this post I would like to show how to achieve that using Ext JS and MVC. Create a new ASP.NET MVC project and add there a Ext JS library. I have written here how to do that. First step is create a form where user can paste the url. Ext.onReady(function() { Ext.QuickTips.init(); var form = new Ext.form.FormPanel({ frame: true, renderTo: 'form', ...
Previously I talked about Motivations for Dependency Injection and how we should keep our objects simple. Let’s talk about how we keep our objects simple… I immediately think of one design principle that can be used to keep your objects simple: Single Responsibility Principle (SRP) A class should have one, and only one, reason to change. Shocking…isn’t it? Following that will lead you to use interfaces and keep your classes small and focused. There are a bazillion resources on SRP – have a look around ...
ASP.NET MVC Reports in ASP.NET MVC Integrating OpenID in an ASP.NET MVC Application using DotNetOpenAuth Microsoft Chart Controls to PDF with iTextSharp and ASP.NET MVC Setting Up ASP.NET MVC with NUnit for Visual Studio 2008 Standard Edition ASP.NET MVC ExtJS using LINQ Using ExtJS Grid with ASP.NET Ajax WCF WebServices & C# How To Get Started With Selenium Core And ASP.NET MVC ASP.NET MVC Cheat Sheets ASP.NET How to Implement Trackback Handler in ASP.NET How to Implement Pingback Handler in ...
I tend to always have side projects going on. I think many developers are like this, either because we want to learn new things or have the opportunity to work on things that directly interest us or to make a little extra cash. Two of my side projects are the Pathfinder Project and Zombie Apocalypse. Pathfinder Project There are two kinds of companies in the world: the ones that listen to what consumers want and give it to them, and the ones that shove what they want to give you down your thoat and ...
I was having an discussion with my wife on things to come in computer software and silverlight. below is a brief snippet: My wife holds an computer engineering degree and is passionate about new innovations. She is a prolific programmer though she ONLY codes when she feels like(or finds a problem worth her attention) and thus is NOT a regular coder like mortals like me who are ... well, just coders, who codes for money:D Wife: What is this buzz around Silverlight? Subodh: Because we need smarter ...
I have been developing asp code for quite some time now. I started out with interdev 1.0 way back when. From what I can see we have seen 3 major revisions of ASP. Classic ASP Archiac to say the least but hindsight is always 20-20. Great intro into web development, we started n-tier development here, most sights were done in a 2 tier environment, and at the end of its lifetime we started developing 3 tier environments with SOAP. ASP.Net in all its flavors (1.0,2.0,3.0,3.5) What can we say asp.net ...
One of my friends read my last post and, after an analogy involving candy stores and Japanese wrappers (or was it Japanese rappers? I think both would have worked), I decided it might be a good idea to put up some sample code to demonstrate some of the things I was talking about. I'm going to use some test code from the MVC module - mostly because I'm the most deeply into that code right now, but also because writing my own MVC framework makes me look like a total stud. At least to people who consider ...
All right, so it may have been a day or two since my last post. I was hoping I'd have the option to post-date to make it look like I was a much more diligent blogger than I really am, but oh well. Apart from just wanting to look like I blog more regularly than once a quarter, there's actually a lot of material to cover. I'm not sure exactly how I want to accomplish this, so there might be a spate of blogs close together just to cover all the things I've worked on so far and the challenges involved. ...