BusinessRx Community

Dedicated to the advancement of software, technology and the people who devote their lives to it.

Welcome to BusinessRx Community Sign in | Join | Help
in Search

BusinessRx Reading List

These blog entries are written by industry experts and leaders. We consider this content to be a good read for any software developer or web technologist.

February 2008 - Posts

  • First Look at Using Expression Blend with Silverlight 2

    Last week I did a First Look at Silverlight 2 post that talked about the upcoming Silverlight 2 Beta1 release.  In the post I linked to some end-to-end tutorials I've written that walk through some of the fundamental programming concepts behind Silverlight and WPF, and demonstrate how to use them to build a "Digg Search Client" application using Silverlight:

    In this first set of Silverlight tutorials I didn't use a visual design tool to build the UI, and instead focused on showing the underlying XAML UI markup (which I think helps to explain the core programming concepts better).  Now that we've finished covering the basics - let's explore some of the tools we can use to be even more productive.

    Expression Blend Support for Silverlight

    In addition to releasing the upcoming Beta1 of Silverlight 2, we are also going to ship Visual Studio 2008 and Expression Studio tool support for targeting it.  These tools will offer a ton of power for building great RIA solutions, and are designed to enable developers and designers to easily work on projects together.

    In today's post I'm going to introduce some of the features in the upcoming Expression Blend 2.5 March preview for Silverlight 2.  After demonstrating some of the basics of how Blend works, we are going to use it to build a cross-platform, cross-browser Silverlight IM chat client:

    The above screen-shot shows what the application looks like at runtime on a Mac.  Below is a screen-shot of what it looks like at design-time within Expression Blend:

    We'll use Expression Blend to graphically construct all of the UI for the application, as well as use it to cleanly data-bind the UI to .NET classes that represent our chat session and chat messages.

    All of the controls we'll use to build the chat application are built into Beta1 of Silverlight 2.

    Disclaimer: I am not a designer (nor am I cool)

    Let me say up front that I am a developer and not a designer.  I'm also not very cool.  While I understand the techniques to create UI, I sometimes choose bad colors and fonts when putting it together (only after I did all the screen-shots for this post did a co-worker helpfully point out that there is actually a site dedicated to banning some of the fonts and colors I used. Ouch).

    For those of you with artistic skill out there - please be gentle with me and focus your attention on the features and techniques I demonstrate below, rather than on the font and color choices I use. :-)

    Getting Started: Creating a new Silverlight 2 Project

    Expression Blend and Visual Studio 2008 share the same solution/project file format, which means that you can create a new Silverlight project in VS 2008 and then open it in Expression Blend, or you can create a new Silverlight project in Expression Blend and open it in VS.  You can also have both Expression Blend and VS 2008 open and editing the same project as the same time.

    Since in my previous Silverlight tutorial series I already showed how to create a new Silverlight project using VS 2008, let's use this post to show how to create a new Silverlight application using Expression Blend.  To do this, simply choose File->New Project in Expression Blend, select the "Silverlight 2 Application" icon, and click ok:

    This will create a new (VS-compatible) solution file and Silverlight application project:

    Blend includes a full WYSIWYG designer for Silverlight 2 applications.  When opening Silverlight pages and controls you can switch the design-surface to be in design view, a XAML source view, or a split-view that shows both the design view and XAML source view at the same time (and which supports live edits of both).  Above we are using the split-view option.

    Understanding Some Basics: Adding Controls to the Surface

    Expression Blend has a slightly different tool palette then Visual Studio (it more closely resembles what you'd find in a design tool like Photoshop).  It supports vector graphic editing:

    It also supports adding controls.  There is a special icon on the Toolbox for layout controls (Grid, Stack, Canvas, Border, ScrollViewer, etc), text controls (TextBox, TextBlock, etc), and an icon that displays the controls you've recently used:

    Clicking on the final ">>" icon on the tool palette displays all of the controls that are available to be used:

    Make sure to click the "Show All" checkbox in the top-right hand corner of the Asset Library if you don't see the control you are looking for.  You can also use the "search" textbox to filter the controls by name.

    Important: Blend supports a design experience for all controls (both the built-in ones as well as any 3rd party control or user control that your application references).

    Once you select a control from the toolbox, you can click and drag on the design-surface and draw out the control.  You can also drag controls from the asset tool onto the artboard.  By default you get automatic rules and positioning placement markers when you add and interact with the controls on the design-surface (below is a form with the built-in button, calendar and slider control on it):

    Understanding More Basics: Working with Control Properties

    You can select any object on the design-surface and then click on the "properties" panel on the right-hand side of the screen to customize its properties:

     

    Above I'm changing the "Background" brush of the button to be a deeper blue gradient (the third tab circled in red under the "Brushes" node allows us to configure the gradient brush). 

    Useful Tip: The properties window includes a search box near the top that you can optionally use to filter the visible property names:

    Because all UI objects in Silverlight and WPF are composed using vector graphics, we can shape/stylize/transform controls however we want.  For example, we could either set the "Transform" properties on our Button control or click on the corner edges of it to rotate/skew/scale it:

    This gives us a lot of power and flexibility to quickly and easily customize the experience however we want:

    Useful Tip: You can zoom in and out of the design surface by holding down the ctrl key and then use the wheel of your mouse to control the zoom depth.  You can then move the viewable region of the design surface by holding down the space bar, which will cause a hand-cursor to display, and then you can hold down the mouse and use it to drag the currently visible region around the screen.  This later tip is useful when you are zoomed way in and want to easily move the visible content around.

    Building our Chat Application: Defining the Layout

    In Part 2: Using Layout Management of my previous Silverlight tutorial series I talked about the layout management system within Silverlight and WPF, and how we can use layout panels to easily control application layout and flow.  Expression Blend makes defining layout rules easy, and includes built-in tool support for using these layout panels.

    Remember that our goal in building our chat application is to have UI that looks like this:

    To do this we'll start by defining a three row <grid> layout on our page.  We'll do this by hovering the mouse over the left margin of the design-surface and then click where we want to establish a new row definition (below I've already setup a top row definition - the cursor location circled in red indicates where I'll click to add a second row definition):

    Clicking on the top-left corner of the design surface (circled in red below) allows us to toggle whether the design surface is in Canvas layout mode or Grid layout mode. 

    When in Grid layout mode Blend will show us whether a particular row or column has a fixed width, or whether it is proportional to the size of the control.  Above the "empty locks" indicates that the three rows are currently proportional to each other (meaning they will all increase proportionally if we resize the browser to get bigger):

    If we click the top and bottom locks we can set those rows to have a fixed height instead, and leave the middle row to fill the remaining height. 

    One last step we can take is to click on the top margin and define a right-hand column as well - which we'll set to have a fixed width (and leave the left column to dynamically resize):

    Once we do the steps above, our XAML file with have a Grid defined like so:

    Useful Tip: Above we have a fixed width and height set for our Silverlight application (notice the Width and Height attributes on the root <UserControl> element).  We can cause the application to instead have a dynamic size and automatically flow and size to fit the containing HTML element or browser window size by removing the Width and Height attributes completely (I talk about this at the end of my layout tutorial here).  If we want to set a design-time width and height on our application, we can do that by setting a d:DesignWidth="640" and d:DesignHeight="476" attribute on the root UserControl element.  This will cause the designer to default to that size dimension when using the designer on the application.

    Building our Chat Application: Adding Controls and Colors

    Now that we have the core layout of our chat application defined, let's add some controls to it and start to customize how it looks.

    We'll start by selecting the root Grid layout panel and customize its background color to be a blue gradient.  One easy approach we can use to select a particular control is to use the "Interaction" panel and then click the control we want to select within it:

    We can then use the "Brushes" property panel to customize a blue LinearGradient brush for the background of our Grid:

    Once we have this set we'll work on the bottom of our chat window, and add a "Send" button to it:

    For our chat message textbox we'll use a standard textbox.  But to add a little more pizzazz we'll first add a border control with a "RoundRadius" of 5 and a Background and BorderBrush like so:

    We'll then embed our TextBox within the Border control. 

    Important Tip: To nest the TextBox within the Border control using the design-surface, we'll want to double-click the Border control within the interaction window.  This will set it as the active insertion control in the design surface, and highlight it in yellow like below:

    We can then use the control toolbox to select a TextBox control and add it into the Border control.  We'll set the TextBox's background and border brush to pick up the nice curved look from the parent Border control:

     

    The XAML markup generated by Blend will look like below (notice how the TextBox is nested under the Border control - it wouldn't have been if the Border hadn't been the active insertion control):

    We can repeat the above process for the header row as well, and embed a TextBlock within a Border control and add a image control to the right column to create UI like so:

     

    The XAML markup generated by Blend looks like below:

    Last but by no means least, we'll add another Border control in our center row and add a ListBox control inside it.  We'll configure the Border control to stretch across both columns in our Grid, and customize its background and foreground colors.  We'll then put some test message inside the ListBox as placeholder text (we'll customize the UI and databind real values later):

    The XAML markup generated by Blend looks like below:

     

    And now when we run the application we have a basic chat IM client (with hard coded values) running in the browser.  As we resize the browser the application will automatically flow and resize to fit the window.

    We still have a bunch of UI work to-do to make our IM client look less lame, but at least we now have something up and running.

    Building our Chat Application: Adding "ChatMessage" and "ChatSession" classes

    Now that we have created our initial UI within Expression Blend, let's open up the same project in Visual Studio and add some chat classes that we can use to bind our UI against.

    We can open up the project in Visual Studio either by selecting File->Open Project inside VS 2008 and selecting the project file for our project, or within Expression Blend we can right-click on the project node and choose the "Edit in Visual Studio" menu item to launch VS 2008 with the project open:

    VS 2008's Silverlight support in Beta1 has project management support for Silverlight 2 solutions, full intellisense and event-wireup support, and support for debugging Silverlight applications running both on Windows and the Mac.  VS 2008 also has split-view editing support for Silverlight .xaml files.  For example, here it the same Page.xaml file we built above in Blend open inside VS 2008:

    The VS 2008 design-view in Beta1 isn't interactive (meaning it is still read-only).  Changes you make in source-view, though, are updated immediately in design-view - which gives you a nice XAML-pad experience (and VS 2008 supports full XAML source intellisense with Silverlight 2 Beta1).

    For this blog post we aren't going to be using the Visual Studio XAML editor.  Instead we are going to create some classes that we'll use to represent a ChatSession and associated chat messages.  We'll then use Expression Blend to bind our UI controls against these.

    We'll start by adding a new class called "ChatMessage" that defines two public properties:

    We'll then create a class called "ChatSession" that represents a chat session.

    The ChatSession class above has three public properties.  The first two properties represent the remote user name and avatar on the other end of the chat. 

    The third property is a collection of the past chat messages.  Notice that its type is not a List<ChatMessage> collection - but rather an ObservableCollection<ChatMessage> collection.  ObservableCollection might not be a familiar class to you if you are coming from an ASP.NET background - but those coming from a Windows Forms or WPF background are probably familiar with it.  Basically it is a generic collection class that raises change notification events when items are added/removed from it (or when items that implement INotifyPropertyChanged within it have their properties changed).  This comes in very handy when doing data-binding - since UI controls can use these notifications to know to automatically refresh their values without a developer having to write any code to explicitly do so.

    The ChatSession class then has two public methods - one whose job it is to connect to a chat server, and another whose job it is to send messages to the chat server.  For the sake of simplicity (and because I don't have a chat server) I've just faked out these methods.  In real-life we would probably use the network sockets implementation built-into Silverlight to connect to a remote chat server.

    The ChatSession class implements the INotifyPropertyChanged interface - which means it exposes a public "PropertyChanged" event.  We'll raise this event within our class when we change the properties on it.  This will enable listeners (for example: controls data-binding against it) to be notified when changes in the property values occur - which allows them them to rebind the values.

    Implementing Fake Data for Design-time Databinding

    From a purely functional perspective, the above code is all we need in order to implement our chat client.  To help improve the design-time experience in Blend, though, we'll also add a constructor that checks whether we are in runtime or design-time mode, and loads up our ChatSession object with "fake data" if it is being hosted in a designer:

    We'll see in a moment how this helps make it easier to visualize data-bound data in the designer.

    Building our Chat Application: Wiring up UI using DataBinding in Expression Blend

    Now that we have the ChatMessage and ChatSession objects defined, we can use them within Expression Blend to databind our UI controls. 

    I introduced how data-binding in Silverlight and WPF work in my Tutorial 5: Using Databinding and the ListBox control to display list data post from last week.  In today's post we'll be using Expression Blend to wire-up the databinding expressions instead of manually typing them.  We'll start by using the "Data" panel under the "Project" panel inside Blend:

    We'll click the "+ CLR Object" link in the "Data" panel to pull up a dialog that allows us to pick any .NET object to databind our UI controls against.  We'll use it to select the "ChatSession" object we just created:

    This will cause the ChatSession object to be added to our Data tray, and expose its properties (and sub-properties) in a tree-view:

    We can then bind any of our UI controls in the design-view to these properties by selecting them in the "Data" tray and dragging/dropping them onto the UI controls in the design-surface.  For example, we could replace the static "ScottGu" label with a {Binding RemoteUserName} databinding expression by dragging the RemoteUserName property from the Data tray on top of it:

    When we drop the "RemoteUserName" property onto the TextBlock, Blend will prompt us like above to either Bind the property to the existing TextBlock, or create a new Control to represent the property.  If we choose the default (bind to the existing control), Blend will then ask us what type of binding expression we want:

    We'll indicate we want a "OneWay" binding to the TextBlock's "Text" property.  When we click ok our control will be updated with a {Binding RemoteUserName} expression for its "Text" property. 

    We can repeat this drag/drop interaction for the Image control (with the RemoteAvatarUrl property) as well as the ListBox (with the MessageHistory collection property).  When we are done Blend will show our "dummy" data within the design-view surface like so:

    You might be wondering about the contents of the ListBox - why do the items show up as "ChatClient.ChatMessage"?  Well, right now the ListBox is binding to a collection of custom .NET objects and the "ChatClient.ChatMessage" string is the value being returned by calling "ToString()" on the ChatMessage instances.

    We can modify this to look better by adding a <DataTemplate> to the ListBox like so:

    Note: For the Blend 2.5 March preview release of Blend you have to define datatemplates in source-view.  In future preview releases you'll be able to use the designer to define them as well.  This feature is already available for WPF projects if you want to play with it: As a designer, you can interactively create the look of data with a full WYSIWYG experience. Just create a WPF project to try it out.  

    Doing this will then cause our UI to look like below at design-time:

    The benefit of having this "dummy data" show up at design-time is that it enables us to get a much better sense of what the UI experience will be like at runtime, and allow a designer (or a developer) to easily work on the UI without having to wait on the rest of the application to be built.

    Building our Chat Application: Updating our Button and ListBox UI using Styles and Control Templates

    One of the things I talked about in my Part 7: Using Control Templates to Customize a Control's Look and Feel Digg tutorial was about how Silverlight and WPF allow developers and designers to completely customize the look and feel of controls.  This provides a tremendous amount of flexibility to sculpt the UI of an application and create exactly the user experience desired.

    We could use the Control Template feature of Silverlight and WPF to customize the Send button and the ListBox structure in our chat application above to have a little more of a polished look and feel.  We could do this by creating "MessageHistory" and "SendButton" style resources that we store within the App.xaml file of our project.  Each of these style objects would then have a Control Template that overrides the look and feel of the control and changes its visual structure.

    Note: the Blend 2.5 March preview release of Blend you have to define control templates in source-view.  In future preview releases you'll be able to use the designer to define them as well.  This feature is already available for WPF projects if you want to play with it - just create a WPF project to try it out.  

    For example, the below ListBox Control Template could be used to remove the outer double border around the ListBox control and define a "flat" look with just a scroll-bar for the list container:

     

    Applying this template to our ListBox would then cause it to render with a much flatter look around the edges:

    We could get even fancier with our Button control template, and not only define a custom button shape - but also define various story-board animations to apply to the shape to provide custom UI behavior when it is in "MouseOver", "Pressed", or "Normal" states (these can all be encapsulated within the Style definition - meaning the page developer never has to-do anything to enable them):

    Once we have our "MessageHistory" and "SendButton" style objects defined, it is easy to use Expression Blend to apply them to controls on the design-surface.  

    Clicking on the "Resources" tool Window within Expression Blend lists all of the resource locations within our project:

    We can expand the "App.xaml" node to see the styles that are available for us to use within it.  To apply a particular style to a control on the page, we can simply drag/drop it onto the control.  For example, here is what our send button control looks like before we apply the "SendButton" Style:

    Dragging/dropping the SendButton style onto it will change it to our custom Control Template shape/structure:

    Because our "SendButton" style has state animations defined within it, the button will change at runtime depending on how the end user interacts with it. 

    By default the button will look like this:

    When an end user moves the mouse over it the balloon will subtlety change to a lighter color:

    When in the push down state the button will depress and its shadow will disappear:

    When released the button will pop back up.

    These subtle animations and interactivity gestures can add some really nice polish to an application.  Best of all, a designer can build and customize this functionality entirely themselves - the developer implementing the page functionality does not have to be involved nor write any code to enable it.

    In future preview releases of Expression Blend 2.5 designers will be able to not only define the shape/structure of this button - but also define all of the animation transitions for it - entirely using the design surface (no source editing or coding required).

    Implementing our our Chat functionality

    Now that our we've used Expression Blend to databind our control UI, and to tweak and polish the interactivity of the UI, let's go back to Visual Studio and write the code that implements the UI chat behavior functionality.

    Specifically, we'll add the below code to our Page constructor to initiate a ChatSession with a remote user, and then handle the scenario where the "Send" button is clicked to send a message to the remote user.

    When we add the above code and re-run the application we'll see that our UI now databinds to a ChatSession with "ScottGu" as the RemoteUserName (instead of the fake design-time data we defined earlier).  When we type text in the message TextBox and click the customized Send button our Listbox is automatically updated with the chat history:

     

    Why did the ListBox automatically update you might wonder?  It did this because the ListBox was data-bound to the ChatSession.MessageHistory property - which is of type ObservableCollection<ChatMessage>.  This means the collection automatically raises change notifications when a new ChatMessage object is added to it, which the ListBox then detects and uses to update itself with the new data. 

    No explicit code was required by us to have the ListBox reflect these changes.  The clean view/model binding architecture of our application automatically handled it for us.

    Summary

    I've only shown a few of the features supported with Expression Blend.  All of these features work for both Silverlight and WPF projects.  All of them will also ship in the upcoming Expression Blend 2.5 March preview - which will be available to download (for free) shortly. 

    I think you'll find that Visual Studio 2008 and Expression Studio bring a tremendous amount of productivity and power for building great RIA solutions.  Developers and designers can use them together when working on the same projects (and avoid accidentally stepping on each other).  You can also easily have both open together on one machine and edit a single application with them at the same time.

    I'll be blogging more about Expression Blend (and a bunch of features in it that I haven't covered yet) once it is available for download.  I'll also post the above simple chat example for download once Silverlight 2 Beta1 ships so that you can open and run the code yourself.

    Hope this helps,

    Scott

  • Five New Security Tutorials Now Available

    As I blogged about earlier, I've been working on some tutorials for the www.asp.net site on the topics of forms authentication, authorization, membership, and roles. The first set of tutorials covered security basics and examined forms authentication in detail. The second set of tutorials are now available online and focus on the Membership framework and the SqlMembershipProvider.

    • Creating the Membership Schema in SQL Server [VB | C#] - explores the Membership framework and its goals. Looks at configuring and setting up the SqlMembershipProvider, which stores user account information in a Microsoft SQL Server database.
    • Creating User Accounts [VB | C#] - examines creating user accounts using the CreateUserWizard control as well as using the Membership class's CreateUser method.
    • Validating User Credentials Against the Membership User Store [VB | C#] - shows how to validate a user's supplied credentials and log them on (and off) the site. Looks at using both the Login Web control and the Membership.ValidateUser method.
    • User-Based Authorization [VB | C#] - examines how to restrict access to pages or functionality within a page based on the logged in user.
    • Storing Additional User Information [VB | C#] - the Membership framework only stores a handful of user attributes, but oftentimes additional, application-specific user information needs to be tracked. This tutorial looks at how to accomplish this.

    Like with the Working with Data tutorials, all tutorials are available in C# and VB versions, include a complete, working source code download, and are available to download as PDF. The next batch of tutorials will examine the Roles framework (and the SqlRoleProvider).

    Enjoy! - http://asp.net/learn/security/

  • New 22books Features and Blogs

    I have been busy pushing out features for 22books and I wanted to talk about a couple of them. I don't want to just pimp my projects on this blog, I want to talk about why I did certain things and the rational behind the decisions and features.

    The first new feature that I think is pretty interesting is that we are now allowing users to enter their own Amazon Associates ID and have that ID used on their lists. Any books bought through Amazon from your lists will credit your Amazon account and not ours. The idea for this came from Kevin Fricovsky and when he first suggested it to me I thought it was crazy. My only source of revenue for 22books is through Amazon Associates and this feature seems to short circuit that source of revenue. Then I started to think about it. The people who normally have Amazon Associates IDs are the influentials and bloggers whose support could help 22books tremendously. I know that the majority of 22books users probably won't enter an associates ID, and I am perfectly willing to trade the revenue of the lists created by those influentials for their work and support. I think this is similar to the approach Jason Calacanis takes, reward your top contributors and they will reward you.

    The second big feature is the ability to easily share a list on your blog or site. This is a feature that I have high hopes for as I feel it really increases the usefulness of 22books and should also help to lead more people to 22books. While developing this feature I wanted to make it as easy as possible to share a list, so I ripped off the site that did it the best in my opinion: youtube. Youtube took off because it was so easy to take a video and embed it with your site or blog and I wanted to make it just as easy to embed a book list (although I don't have any delusions that people will want to share book lists as much as youtube videos). Here is the simple UI I went with:

    A user can copy and paste the code from the embed textbox and be ready to go. Users can also click customize and change some settings and see a live preview. I was also on the fence on how to do the actual sharing, I decided to go with javascript but I might re-visit that in the future and offer a flash version as well. Here is a small sample of an embedded list (the books I have read so far this year):

     

    I have also deployed a new 22books blog (using simplelog!) that includes an rss feed where I will blog about interesting new lists and new site features. Check it out here.

    -James

  • March (Launch) MSDN Magazine Online

    The last of the three MSDN Toolbox columns I wrote is now online. I had a good time writing these and hopefully helped a couple people find some helpful open source and agile oriented tools. While looking for tools for this last article Steve Harman made two great suggestions in SqlAssist and VisualSVN.

    • SqlAssist - This is an excellent Visual Studio addin that once and for all lets you effectively work with SQL in Visual Studio.
    • VisualSVN - A Visual Studio addin that lets you work with Subversion from the IDE.
    • SubSonic - Everyone knows what Subsonic is right? Its a nice little framework to make working with .NET a little bit more like working with Rails.
    • Visual Studio Team System: Better Software Development for Agile Teams - If you are using Team System and want to use an agile methodology definitely check this one out.

    -James

  • Blog Move, redesign, and refocus

    I spent most of the weekend moving my blog from subText over to Graffiti and moving it from my old domain of dotavery to infozerk, including writing a full-featured Graffiti redirect plugin so all the permalinks still work. (that I am going to release at some point). I still love subText and hate to move away from it, but Graffiti gives me the ability to run the infozerk.com site and my blog in the same application. I think more and more blogging engines are going to focus on both CMS and blogging.

    With this move I also want to re-focus my blog. In the past this blog has been largely focused on .NET, but going forward I want to change that. I want to focus my blog on the general development of software, and the business of software. I am sure there will still be the occasional post on a .NET topic or Ruby topic, but for the most part I want to make it much more technology independent. I am working on a number of projects and I think it would be interesting to blog about those projects, how they are doing, what I am doing to try and market them, if they are making money, etc. etc. I will also focus on design decisions, usability, and development practices for future projects.

    I am excited to start fresh and hope you will stick around to see how this experiment works out.

    -James

     

     

  • First Look at Silverlight 2

    Last September we shipped Silverlight 1.0 for Mac and Windows, and announced our plans to deliver Silverlight on Linux.  Silverlight 1.0 is focused on enabling rich media scenarios in a browser, and supports a JavaScript/AJAX programming model.

    We are shortly going to release the first public beta of Silverlight 2, which will be a major update of Silverlight that focuses on enabling Rich Internet Application (RIA) development.  This is the first of several blog posts I'll be doing over the weeks and months ahead that talk in more depth about it.

    Cross Platform / Cross Browser .NET Development

    Silverlight 2 includes a cross-platform, cross-browser version of the .NET Framework, and enables a rich .NET development platform that runs in the browser.  Developers can write Silverlight applications using any .NET language (including VB, C#, JavaScript, IronPython and IronRuby).  We will ship Visual Studio 2008 and Expression Studio tool support that enables great developer / designer workflow and integration when building Silverlight solutions.

    This upcoming Beta1 release of Silverlight 2 provides a rich set of features that enable great RIA application development.  These include:

    • WPF UI Framework: Silverlight 2 includes a rich WPF-based UI framework that makes building rich Web applications much easier.  In includes a powerful graphics and animation engine, as well as rich support for higher-level UI capabilities like controls, layout management, data-binding, styles, and template skinning.  The WPF UI Framework in Silverlight is a compatible subset of the WPF UI Framework features in the full .NET Framework, and enables developers to re-use skills, controls, code and content to build both rich cross browser web applications, as well as rich desktop Windows applications.
    • Rich Controls: Silverlight 2 includes a rich set of built-in controls that developers and designers can use to quickly build applications.  This upcoming Beta1 release includes core form controls (TextBox, CheckBox, RadioButton, etc), built-in layout management panels (StackPanel, Grid, Panel, etc), common functionality controls (Slider, ScrollViewer, Calendar, DatePicker, etc), and data manipulation controls (DataGrid, ListBox, etc).  The built-in controls support a rich control templating model, which enables developers and designers to collaborate together to build highly polished solutions.
    • Rich Networking Support: Silverlight 2 includes rich networking support.  It includes out of the box support for calling REST, WS*/SOAP, POX, RSS, and standard HTTP services.  It supports cross domain network access (enabling Silverlight clients to directly access resources and data from resources on the web).  Beta1 also includes built-in sockets networking support.

    • Rich Base Class Library: Silverlight 2 includes a rich .NET base class library of functionality (collections, IO, generics, threading, globalization, XML, local storage, etc).  It includes rich APIs that enable HTML DOM/JavaScript integration with .NET code.  It also includes LINQ and LINQ to XML library support (enabling easy transformation and querying of data), as well as local data caching and storage support.  The .NET APIs in Silverlight are a compatible subset of the full .NET Framework.

    Silverlight 2 does not require the .NET Framework to be installed on a computer in order to run.  The Silverlight setup download includes everything necessary to enable all the above features (and more we'll be talking about shortly) on a vanilla Mac OSX or Windows machine. 

    The Beta1 release of Silverlight 2 is 4.3MB in size, and takes 4-10 seconds to install on a machine that doesn't already have it.  Once Silverlight 2 is installed you can browse the Web and automatically run rich Silverlight applications within your browser of choice (IE, FireFox, Safari, etc).

    Silverlight 2 In Action: Building A Simple Digg Client

    To help people come up to speed with Silverlight 2, I decided it might be fun to build a Silverlight application and then write a series of step by step tutorials that drill into and explain the different programming concepts behind it (controls, layout management, networking, data-binding, styles, user controls, templates, etc). I also added a tutorial post that demonstrates how to migrate the application outside of the browser and make it a desktop application using WPF and the full .NET Framework.

    Below are some screen-shots of the Silverlight application I built.  It is a simple search front end to the popular Digg.com site, and allows users to type in search topics and browse Digg stories that match them.

    All of the UI in the application is built using Silverlight's WPF framework.  The application uses the Silverlight networking stack and cross-domain access support to query the Digg REST API directly, and uses LINQ and LINQ to XML to query/transform the returned data into DiggStory objects that I databind the UI against:

    The application supports a master/details data interaction model that allows users to select stories from the search list and quickly drill into more details about them.  A user can jump to the Digg article directly from the details form, or close it and pick another story to drill into:

    The entire application is implemented in about 35 lines of C# code and 75 lines of XAML page/user-control markup.  It only uses controls and libraries built-into Silverlight.

    My Silverlight Tutorials

    You can learn how I built the Digg application by reading the 8 tutorials I've put together below:

    The tutorials are designed to be read in-order, and walk through building the Digg application step-by-step (starting with File->New Project in VS 2008).  I have tried to use each tutorial to explain one or more programming concepts.

    If you have used WPF before the UI concepts I discuss will all be very familiar.  If you haven't used WPF before, the tutorials should provide a good overview of the fundamental programming concepts in it, and hopefully provide you with the basic knowledge necessary to start building Silverlight 2 applications with VS 2008 when Beta1 comes out.

    I'll post details on my blog once Beta1 is available for download.  I'll also upload the final Digg application to my site (along with the code + project file to open and edit it in VS 2008) once Beta1 has shipped.

    Hope this helps,

    Scott

  • .NET 3.5 Client Product Roadmap

    A few months ago I did a .NET Web Product Roadmap blog post where I outlined some of the product plans we have to build on top of the web development features we’ve shipped with Visual Studio 2008 and .NET 3.5.

    Over the next few months we will also be releasing a number of enhancements specific to client development as well.  We have put a lot of effort into addressing some of the biggest areas of customer feedback, while also trying to really push the envelope on the capabilities developers have when building Windows applications. All of these improvements build on top of VS 2008 and .NET 3.5, and will make .NET client development even better going forward. Below is a roadmap of some of the upcoming releases we have planned for the months ahead:

    Improved .NET Framework Setup for Client Applications

    One of the biggest asks we’ve had over the years from customers and ISVs building client applications is to make the setup and installation of the .NET Framework easier and faster.

    This summer we are going to ship a new setup framework for .NET that makes it easier to build optimized setup packages for client applications. This setup framework can be integrated with existing installation frameworks (for example: products like InstallShield), and enables a smaller and faster end-user setup experience of the .NET Framework.

    Windows Forms and WPF client applications will be able to use this setup framework to cleanly “bootstrap” getting the .NET Framework installed onto machines. The setup “bootstrap” utility will support automatically downloading the minimal set of .NET Framework packages needed to enable .NET 3.5 client applications on a machine. For example, if a user already has .NET 2.0 installed on their machine, setup will be smart enough to automatically download only the upgrade patches necessary to update .NET 2.0 to 3.5 (and not have to re-download the components already provided by .NET 2.0). This will significantly shrink the payload size of client setup programs, and speed up the installation experience.

    We’ll also be delivering improvements that enable a more integrated application install experience for both MSI and ClickOnce based solutions, and support a more consumer friendly user experience that is easy to build.

    Improved Working Set and Startup Improvements for .NET Client Applications

    One of the other common asks we receive is to enable .NET client applications to launch faster in “cold startup” scenarios. “Cold startup” scenarios occur when no other .NET client applications are running (or have recently run) on a machine, and require the OS to load lots of pages (code, static data, registry, etc) from disk. If you are loading a large .NET client application or library, or are using a slow disk, these cold startup scenarios can require many seconds for your application to start.

    This summer we are going to ship a servicing update to the CLR that makes some significant internal optimizations in how we optimize our data structures to cut down on disk IO and improve memory layout when loading and running applications. Among many other benefits, this work will significantly improve the working set and cold startup performance of .NET 2.0, 3.0 and 3.5 applications and will dramatically improve end-user experiences with .NET-based client applications.

    Depending on the size of the application, we expect .NET applications to realize a cold startup performance improvement of between 25-40%. Applications do not need to change any code, nor be recompiled, in order to take advantage of these improvements so the benefits are automatic.

    WPF Performance Improvements

    This summer we are also planning to release a servicing update to WPF that includes a bunch of performance optimizations that improve its text, graphics, media and data stack. These include:

    - Moving the DropShadow and Blur bitmap effects, which are currently software rendered, to be hardware accelerated (making them many times faster). The APIs for these effects will stay the same as they are today (which means you do not need to change any code nor recompile your apps to take advantage of these improvements).

    - Text scenarios, especially when used in Visual and DrawingBrush scenarios, will be substantially faster. The APIs for these scenarios also stay the same (which means you do not need to change any code nor recompile to take advantage of the performance improvements).

    - Media and video performance scenarios will also be much faster (also no need to change any code nor recompile to take advantage of the improvements).

    - We’ll be including a new WriteableBitmap API that enables real-time bitmap updates from a software surface. We’ll also be adding support for a powerful new effects API that enables you to build richer graphics scenarios.

    - We’ll also be including new data scalability improvements that can be leveraged for data editing scenarios. These include container recycling and data virtualization support that make it easier to build richer data visualization controls.

    WPF Control Improvements

    Later this year we are also planning to release a number of new controls for WPF.  Included in the list we are working on are DataGrid, Ribbon, and Calendar/DatePicker controls.

    VS 2008 WPF Designer Improvements

    We are also planning to release a servicing update of VS 2008 that includes a number of feature additions to its WPF designer. These include event tab support within the property grid for control events, toolbox support within source mode, and a variety of other common asks and improvements.

    Summary

    The above improvements should make it easier to build great desktop applications. Because these improvements are built on top of VS 2008 and .NET 3.5, they will also be easy to take advantage of (and in most scenarios not require any code changes to take advantage of them). Stay tuned to my blog for more details about each of the above improvements in the weeks ahead.

    Hope this helps,

    Scott

  • February MSDN Magazine Online

    I am a little late on this, but the February MSDN Magazine is now available online and includes the second of three toolbox columns that I wrote (filling in for Scott Mitchell). In this column I feature:

    • E Text Editor - The closest thing to my beloved TextMate on Windows. (did you ever think you would see TextMate mentioned in MSDN?)
    • Watin and Watin Test Recorder - Most people know I am huge fan of these tools.
    • Xunit.NET - I wanted to give some props to this new framework which I think its doing a great job at questioning established conventions.
    • Pragmatic Unit Testing - Great book that does a good job covering what to test not just how to test.

    -James

  • Upcoming Speaking Engagements and Training

    I have a few speaking engagements and training events coming up in the next few days and months here in beautiful San Diego.

    Local User Group Talk: Storing Binary Data in an ASP.NET Web Application - Tuesday, February 19th, 2008
    I'll be speaking at the ASP.NET SIG here in San Diego. The meeting, held at Microsoft's office in UTC on La Jolla Village Drive starts at 6:30 PM with announcements and free pizza and soft drinks!!! My talk begins at 7:00 PM. My talk looks at storing binary data in an ASP.NET web application, examining the pros and cons and comparing and contrasting the necessary steps of storing data in the web server's file system vs. storing it directly in the database.

    Training: ASP.NET Programming II - Thursday, February 21st through March 27th
    This 27 hour course spread over six weeks covers a gamut of ASP.NET programming topics, from working with data, to building an application architecture, to creating a custom site map provider, and examining the Membership and Roles features. This course is through the University of California - San Diego University Extension.

    Training: ASP.NET In Depth: Forms Authentication, Authorization, Membership, and Roles - Saturday, April 12, 8:00 AM to 12:00 PM
    This four hour class offers an in depth look at ASP.NET's forms authentication, authorization, membership, and roles systems. See how to accomplish common user account-related tasks, like building a login page, registering new user accounts, showing different data based on the currently logged in user, and populating grids and other data controls with users and user account information.

    Training: ASP.NET In Depth: Networking Functions - Email, HTTP Requests, Screen Scrapes, and RSS - Saturday, April 12, 1:00 PM to 5:00 PM
    Any network function you can perform from your desktop can be accomplished from an ASP.NET page. This includes sending and downloading email, making HTTP requests, screen scraping, and publishing and consuming RSS feeds. This four hour class looks at using classes in the .NET Framework as well as open source and affordable third-party components to: send email using SMTP; download email from a POP3 server; download, parse, and display the HTML from another website; consume and display remote RSS feeds; and generate RSS feeds for your website.

    Training: ASP.NET In Depth: Building AJAX-Enabled Web Applications - Saturday, May 10, 8:00 AM to 12:00 PM
    AJAX-enabled web applications offer a highly interactive user interface whose responsiveness rivals that of desktop applications. Popular web applications like the social networking news site Digg and GMail are prime examples of AJAX techniques in action. Microsoft’s ASP.NET AJAX Framework and AJAX Control Toolkit makes building AJAX-enabled ASP.NET web applications remarkably fast, easy, and fun. This four hour class examines key AJAX concepts and techniques and then explores the ASP.NET AJAX Framework and AJAX Control Toolkit, illustrating how to build highly responsive, real-world user interfaces.

    Training: ASP.NET In Depth: Website Performance and Scalability - Saturday, May 10, 1:00 PM to 5:00 PM
    As a website's use and popularity grows, performance and scalability become two key concerns. Performance issues in ASP.NET applications typically arise from excessive page markup and inefficient data access. This four hour class starts by looking at tools for measuring a site’s performance and identifying potential bottlenecks. It then looks at common performance and scalability pitfalls along with tips for achieving optimal performance.

  • Feb 17th Links: ASP.NET, ASP.NET AJAX, Visual Studio, .NET

    Here is the latest in my link-listing series.  Also check out my ASP.NET Tips, Tricks and Tutorials page for links to popular articles I've done myself in the past.

    ASP.NET

    ASP.NET AJAX

    • ASP.NET AJAX History Tutorials: Jonathan Carter has published a good series of tutorials that demonstrate how to use the new ASP.NET AJAX History support that we'll be shipping later this year (it is currently available in the ASP.NET Extensions CTP download).  This enables you to add forward/back button navigation support within AJAX applications.

    • Using JQuery with VS 2008 JavaScript Intellisense: One of the improvements we shipped in our recent VS 2008 Hotfix Roll-Up last week was to address issues with JavaScript intellisense support for JQuery (another popular AJAX framework).  Brennan Stehling, James Hart, and Lance Fisher have done blog posts recently that discuss how to enable even richer JQuery intellisense inside VS 2008 using intellisense-friendly JQuery libraries that are referenced while coding (and then swapped out for the real library at runtime).  You can read their blog posts about how this works here and here and here.

    • ASP.NET MVC Tip: Submitting an AJAX Form with JQuery: While on the subject of JQuery, I thought I'd link to a post in Mike Bosch's ASP.NET MVC series that shows how you can integrate JQuery in the browser on the client with the ASP.NET MVC framework on the server.

    Visual Studio

    • Visual Studio Programmer Themes Gallery: Visual Studio enables you to customize the color settings of the text editor and IDE, as well as to export and import the settings (use the Tools->Import and Export Settings menu to do this).  Scott Hanselman has a great post that provides previews of a bunch of cool pre-built themes that people have published that you can download and use for free.

    • Code Profiler Analysis in VS 2008: Maarten Balliauw has a nice post that describes how to use the code profiling features in the Developer edition of Visual Studio Team System to analyze code performance.

    .NET

    • Using the Expression Tree Visualizer: Charlie Calvert has a nice post that talks about one of the very useful debugging tools in the LINQ samples package provided with VS 2008.  It enables you to easily visualize expression tree variables within the debugger - which can be incredibly useful when you are trying to write your own custom LINQ provider (like the ones above).  To learn more about Expression Trees and some of the underlying concepts that make LINQ possible, also check out Charlie's earlier post on them here.

    Hope this helps,

    Scott

  • Do .NET 2.0 SP1 Binaries Fail Without SP1?

    Do .net 2.0 service pack 1 compiled binaries fail when ran on machines without that service pack?  Developers automatically get force-fed .net 2.0 sp1 when we install VS 2008, which doesn't sound like it should be a big concern typically.  But what about the next time you compile an existing VS 2005 app and deploy on machines without sp1, which would of course be the case for most non-dev machines right now?  I believe I have found a case where this is indeed happening, at least that's the only explanation I can find so far, and it looks like there are a few others reporting things too -- but the details so far are sketchy at best.

    I've got an existing .net 2.0 app (written in C#) that calls a 3rd party web service that has always ran just fine.  I needed to make a couple of small updates to my app which did not change anything related to the calling of this web service at all.  Everything works flawlessly on my development pc, which has service pack 1 for .net 2.0, but fails when deployed on my qa server, which does not have service pack 1.  Here are the exception details:

    Error type = System.InvalidOperationException
    Error Message: There is an error in XML document (5, 2).
    Stacktrace:    at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
       at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle)
       at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
       at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
       at ...

    I am able to confirm that the 3rd party does receive my call to this web service, and it is sending the expected response, which I have also confirmed with TcpTrace.  So the problem seems to be that the xml deserialization that is needed to parse the web service response is no longer working the same, and code compiled with sp1 cannot be executed without it.

    Can anyone confirm this?  Are there any work-arounds, short of compiling without sp1 or deploying sp1?  By the way, I am in the process of setting up a virtual machine that will just have VS 2005 without sp1 to confirm this if no one else can, and assuming I can confirm this then I'll have to determine if I want to start requiring sp1.

    Here's a couple related links, which may or may not be the same problem I'm experiencing:

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2668654
    http://weblogs.asp.net/grobinson/archive/2008/02/13/net-2-0-sp1-shipped.aspx
    http://channel9.msdn.com/ShowPost.aspx?PostID=363583
    http://blog.jalil.org/2008/01/27/dep-nxcompat-and-changes-in-net-framework-20-sp1

  • Exploring the Code for the New .NET 3.5 Classes

    I often use the free and awesome decompiler Reflector to peer into the source code of Microsoft's .NET Framework. It's an indispensable tool. However, I had a little difficulty viewing the underlying source code for some of the new .NET 3.5 classes. In particular, for a recent article I was interested in looking at what was happening underneath the covers when the DataPager control was rendered. The DataPager is a new control in ASP.NET 3.5 used to render a paging interface for the ListView control (also new to 3.5).

    By default, Reflector had the v2.0 assemblies loaded. “No problem,” I thought, “I'll just navigate to the 3.5 assemblies in the %WINDIR%\Microsoft.NET\Framework folder and open the System.Web assemby from there. While there is a 3.5 subfolder there, it only includes a sprinkling of assemblies, and none of the 3.5 assemblies I was interested in. The .NET 3.5-specific classes are installed in the GAC in the System.Web.Extensions.dll assembly. Reflector, it appears, can't locate this assembly and I couldn't reach it through Windows Explorer.

    I was able to use Reflector to dig into this assembly, but I'm sure there's an easier way to do it. I'm going to share my approach, but I invite anyone who knows of a simpler technique to post instructions in the comments. One possible solution would be to update Visual Studio 2008 so that the .NET Framework code can be stepped into during debugging. I tried applying the hotfix a while back and got an error, and have not yet taken the time to investigate the error further. With the .NET Framework source code integration can you view the source code through VS 2008 like with Reflector, or is the code only accessible when debugging?

    To open the System.Web.Extensions.dllfrom Reflector, perform the following steps:

    • Drop to the command line (Start / Run / cmd.exe)
    • Navigate to the appropriate GAC folder, %WINDIR%\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35\
    • Copy the System.Web.Extensions.dll to another location on my hard drive (such as C:\MyAssemblies\).
    • Once the assembly is “freed” from the GAC, you can open it in Reflector as you would any assembly

    Hope this helps!

  • ASP.NET MVC Framework Road-Map Update

    This past December we released the first preview of a new ASP.NET MVC Framework as part of the ASP.NET 3.5 Extensions CTP Release. I also wrote a number of blog posts that provide more detail on what the ASP.NET MVC framework is and how you can optionally use it:

    We've had great feedback on the framework since then, and had a ton of downloads and excitement around it.  One of the common questions people have asked me recently is "when will a new build be released and what will be in it?".

    The below post provides a few updates on what the ASP.NET MVC feature team has been working on, and some of the new features that will be available soon.  I'm going to do a separate blog post in the future that will cover the new ASP.NET Dynamic Data and ASP.NET AJAX feature work that is progressing along nicely as well. 

    All of these features (ASP.NET MVC, ASP.NET Dynamic Data, and the new ASP.NET AJAX improvements) will ship later this year and work with VS 2008 and .NET 3.5.

    Upcoming ASP.NET MVC MIX Preview Release

    We are planning to release the next public preview of ASP.NET MVC at the MIX 08 conference in a few weeks.  This build will be available for anyone on the web to download (you do not need to attend MIX to get it).  We have incorporated a lot of early adopter feedback into this release.  Below are some of the improvements that will appear with this next preview release:

    1) The ASP.NET MVC Framework can be deployed in the \bin directory of an app and work in partial trust

    The first ASP.NET MVC preview release required a setup program to be run on machines in order for the System.Web.Mvc.dll assembly to be registered in the machine's GAC (global assembly cache).

    Starting with this upcoming preview release we will enable applications to instead directly reference the System.Web.Mvc.dll assembly from the application's \bin directory.  This means that no setup programs need to be run on a sever to use the ASP.NET MVC Framework - you can instead just copy your application onto a remote ASP.NET server and have it run (no registration or extra configuration steps required).

    We are also doing work to enable the ASP.NET MVC framework to run in "partial/medium trust" hosting scenarios.  This will enable you to use it with low-cost shared hosting accounts - without requiring the hosting provider to-do anything to enable it (just FTP your application up and and it will be good to run - they don't need to install anything).

    2) Significantly enhanced routing features and infrastructure

    One of the most powerful features of the ASP.NET MVC framework is its URL routing engine (I covered some of these features here).

    This upcoming ASP.NET MVC preview release contains even more URL routing features and enhancements.  You can now use named routes (enabling explicit referencing of route rules), use flexible routing wildcard rules (enabling custom CMS based urls), and derive and declare custom route rules (enabling scenarios like REST resources mappings, etc).

    We have also factored out the URL routing infrastructure from the rest of the MVC framework with this preview, which enables us to use it for other non-MVC features in ASP.NET (including ASP.NET Dynamic Data and ASP.NET Web Forms).

    3) Improved VS 2008 Tool Support

    The first ASP.NET MVC preview had only minimal VS 2008 support (basically just simple project template support).

    This upcoming ASP.NET MVC preview release will ship with improved VS 2008 integration.  This includes better project item templates, automatic project default settings, etc.  We are also adding a built-in "Test Framework" wizard that will automatically run when you create a new ASP.NET MVC Project via the File->New Project dialog.  This will enable you to easily name and wire-up a unit test project for your ASP.NET MVC application. 

    The ASP.NET MVC test framework wizard is pluggable and will enable custom unit test project templates to be added to its list of supported test options:

    This will enable developers to easily choose whichever unit testing framework (and associated mocking and dependency injection options) they prefer to use.

    4) [ControllerAction] Attribute No Longer Required on Controller Action Methods

    The first ASP.NET MVC preview release required action methods on Controller classes to be explicitly marked with a [ControllerAction] attribute to be callable:

    Based on early-adopter feedback, the upcoming ASP.NET MVC release removes this requirement.  Instead by default all public methods on a Controller will now be considered Action methods:

    Note: You can optionally add attributes to block public methods on your Controller from being callable as actions if you want/need to add a public non-action method on it.

    5) New Filter Attribute Support for Controllers and Action Methods

    One of the new extensibility features enabled with this next ASP.NET MVC release is a feature called "Filter Attributes".  These enable you to inject code interceptors into the request of a MVC controller that can execute before and after a Controller or its Action methods execute.  This capability enables some nice encapsulation scenarios where you can package-up and re-use functionality in a clean declarative way.

    For example, I could use an [OutputCache] filter attribute to output cache my product listing page for 30 seconds at a time:

    Or use an [Authorization] filter attribute to ensure that only people within a specific security role are allowed to Edit a product:

    The filter mechanism is extensible, and you can easily create your own custom filter attributes for Controller classes or Action methods with it.  Filters (and controllers/actions that use filters) can be fully unit tested.

    6) HTML Helpers Built-in

    The first ASP.NET MVC preview had only a few HTML UI helper methods built-into the core assembly.  We then shipped a separate download that included a bunch of additional HTML helper methods you could optionally use.

    This upcoming ASP.NET MVC preview now has these HTML helper methods built-in (no separate download required).  Next month we are also going to start to talk about some of the new enhancements to the client-side ASP.NET AJAX libraries we are making, as well as some of the AJAX helper methods we will build to enable it to easily integrate with ASP.NET MVC.

    7) Lots of Refactoring and Design Improvements

    This upcoming ASP.NET MVC preview includes several refactoring and design improvements that make the MVC framework more extensible and testable.  In general the team has followed a philosophy where for all features you have three options:

    1. Use the built-in features/implementations "as-is" out of the box
    2. Slightly customize the built-in features/implementations without having to write much code
    3. Completely swap out the built-in features/implementations for custom ones

    For example: you can now override the ViewEngine locator logic without having to override the ViewEngine execution logic (and vice-versa) - or alternatively swap out ViewEngines entirely.  The Controller Factory support has been extended to make it even easier to integrated with dependency injection frameworks.  Route rules are now fully extensible.  Controllers are more easily testable, etc.

    8) Downloadable ASP.NET MVC Framework Source that can be Built and Patched

    Last month I announced that the .NET Framework source code can now be downloaded and debugged.  Ultimately once it ships the ASP.NET MVC framework will be available via this mechanism as well (just like the rest of the ASP.NET source code).

    Starting with this next preview, we are also going to make the ASP.NET MVC Framework source code downloadable as a buildable VS project solution.  This will enable you to easily view and debug the ASP.NET MVC Framework source code.  We are also going to include a license that permits you to optionally make patches to the ASP.NET MVC Framework source code in the event that you run into a bug in an application you are developing with it. 

    The license won't enable you to redistribute your patched version of ASP.NET MVC (we want to avoid having multiple incompatible ASP.NET MVC versions floating around and colliding with each other).  But it will enable developers who want to get started building ASP.NET MVC applications immediately to make progress - and not have to worry about getting blocked by an interim bug that they can't work around.

    Summary

    There are a bunch of other changes that will show up with the next ASP.NET MVC Preview (including a number of helper properties/methods/objects).  Hopefully the above list provides some insight into a few of the bigger improvements that will appear shortly.  I'll do a blog post around MIX with a pointer to the updated preview once it is available for download.

    Hope this helps,

    Scott

  • User Group Talk: Storing Binary Data in an ASP.NET Web Application

    Next Tuesday, February 19th, I'll be speaking at the ASP.NET SIG here in San Diego. The meeting, held at Microsoft's office in UTC on La Jolla Village Drive starts at 6:30 PM with announcements and free pizza and soft drinks!!! My talk begins at 7:00 PM.

    My talk looks at storing binary data in an ASP.NET web application, examining the pros and cons and comparing and contrasting the necessary steps of storing data in the web server's file system vs. storing it directly in the database.

    If you can't make the talk, you can download the PowerPoint slides and code demos at http://datawebcontrols.com/classes/BinaryData.zip.

    <