March 2010 - Posts
In my previous blog entry , I explored two ways of inserting a database record using jQuery. We added a new Movie to the Movie database table by using a generic handler and by using a WCF service. In this blog entry, I want to take a brief look at how you can insert a database record using OData. Introduction to OData The Open Data Protocol (OData) was developed by Microsoft to be an open standard for communicating data across the Internet. Because the protocol is compatible with standards such as REST and JSON, the protocol is particularly well suited for Ajax. OData has undergone several name changes. It was previously referred to as Astoria and ADO.NET Data Services. OData is used by Sharepoint Server 2010, Azure Storage Services, Excel 2010...
The goal of this blog entry is to explore the easiest way of inserting a new record into a database using jQuery and .NET. I’m going to explore two approaches: using Generic Handlers and using a WCF service (In a future blog entry I’ll take a look at OData and WCF Data Services). Create the ASP.NET Project I’ll start by creating a new empty ASP.NET application with Visual Studio 2010. Select the menu option File, New Project and select the ASP.NET Empty Web Application project template. Setup the Database and Data Model I’ll use my standard MoviesDB.mdf movies database. This database contains one table named Movies that looks like this: I’ll use the ADO.NET Entity Framework to represent my database data: Select the menu option Project, Add New...
Piles of interesting stuff going on at Mix 10 this week. Here's a link rollup with all the details and downloads that you might care about. (As well as a few blatant plugs for my own sessions.) First: Watch Day 1 and Day 2 keynotes on demand. See recorded sessions here. Silverlight 4 Release Candidate - If you want to develop with the SL4 RC, you'll need the latest Visual Studio 2010 or Visual Web Developer Express 2010 installed and Silverlight 4 Tools for Visual Studio 2010 . All the deep details are on Silverlight.net . You can also get the Expression Blend 4 Beta . It was announced that Blend 4 will be a free upgrade from Blend 3. Silverlight for Windows Phone - Windows Phone 7 Series uses Silverlight and/or XNA for development....
About two months ago, John Resig and I met at Café Algiers in Harvard square to discuss how Microsoft can contribute to the jQuery project. Today, Scott Guthrie announced in his second-day MIX keynote that Microsoft is throwing its weight behind jQuery and making it the primary way to develop client-side Ajax applications using Microsoft technologies. What does this announcement mean? It means that Microsoft is shifting its resources to invest in jQuery. Developers on the ASP.NET team are now working full-time to contribute features to the core jQuery library. Furthermore, we are working with other teams at Microsoft to ensure that our technologies work great with jQuery. We are contributing to the open-source jQuery project in the exact same...
ASP.NET MVC 2 is out. This means, it's released . It's final. Use it. Love it. You can download it directly , or install it (and whatever else you like) with the Web Platform Installer: ScottGu has many details in his post . There's lots of resources to check out: What's new in ASP.NET MVC Whitepaper ASP.NET MVC 2 adds a bunch of new capabilities and features. ScottGu has a blog series about some of the new features, and will be covering them in more depth in the weeks ahead. Some of the new features and capabilities include: New Strongly Typed HTML Helpers Enhanced Model Validation support across both server and client Auto-Scaffold UI Helpers with Template Customization Support for splitting up large applications...
This last week over a 7 day period, I went to Munich, Cairo and Dubai. I presented in three keynotes and did a total of 10 sessions. I crossed 12 time zones and missed my kids. I talked to/with/at about 3000 people. I'm utterly shattered. I took some video while I was travelling with my Creative Vado HD and slapped it into Windows Live Movie Maker just now. Here's my trip montage. You could call this either "The Glamourous Life of a Technical Speaker" or "If this is Tuesday, this must be Cairo" or "Scott needs to learn to say No." It was great fun, I spoke at VSOne in Munich. I talked about .NET 4 and ASP.NET MVC. We also had a nice Nerd Dinnner . Then I headed over to Cairo Code Camp and the turnout was...
We updated the browser definitions files included with ASP.NET 4 to include information on recent browsers and devices such as Google Chrome and the iPhone. You can use these browser definition files with earlier versions of ASP.NET such as ASP.NET 3.5. The updated browser definition files, and instructions for installing them, can be found here: http://aspnet.codeplex.com/releases/view/41420 The changes in the browser definition files can cause backwards compatibility issues when you upgrade an ASP.NET 3.5 web application to ASP.NET 4. If you encounter compatibility issues, you can install the old browser definition files in your ASP.NET 4 application. The old browser definition files are included in the download file referenced above. What...
You can learn a lot by reading other people's source code. That's the idea behind this series, " The Weekly Source Code ." You can certainly become a better programmer by writing code but I think good writers become better by reading as much as they can. I was poking around in the WebFormsMVP project's code and noticed an interesting pattern . You've seen code to get data from a database and retrieve it as an object, like this: public Widget Find(int id) { Widget widget = null; widget = (from w in _db.Widgets where w.Id == id select w).SingleOrDefault(); return widget; } This code is synchronous, meaning basically that it'll happen on the same thread and we'll wait around until it's finished. Now, here's...
More Posts