Archives
-
WCF RIA Services DomainContext Abstraction Strategies–Say That 10 Times!
The DomainContext available with WCF RIA Services provides a lot of functionality that can help track object state and handle making calls from a Silverlight client to a DomainService. One of the questions I get quite often in our Silverlight training classes (and see often in various forums and other areas) is how the DomainContext can be abstracted out of ViewModel classes when using the MVVM pattern in Silverlight applications. It’s not something that’s super obvious at first especially if you don’t work with delegates a lot, but it can definitely be done. There are various techniques and strategies that can be used but I thought I’d share some of the core techniques I find useful.
-
The Challenge with HTML5 – In Pictures
I love working with Web technologies and am looking forward to the new functionality that HTML5 will ultimately bring to the table (some of which can be used today). Having been through the div versus layer battle back in the IE4 and Netscape 4 days I think we’re headed down that road again as a result of browsers implementing features differently. I’ve been spending a lot of time researching and playing around with HTML5 samples and features (mainly because we’re already seeing demand for training on HTML5) and there’s a lot of great stuff there that will truly revolutionize web applications as we know them. However, browsers just aren’t there yet and many people outside of the development world don’t really feel a need to upgrade their browser if it’s working reasonably well (Mom and Dad come to mind) so it’s going to be awhile.
-
Silverlight Firestarter Wrap Up and WCF RIA Services Talk Sample Code
-
Reducing Code by Using jQuery Templates
Nearly every language out there uses templates in some shape or form to minimize the amount of code that has to be written in an application. By using templates you can define a template structure once and use it to generate code, HTML or other formats. If you’ve created ASP.NET applications then you’re aware of how powerful and productive templates are when it comes to generating HTML output. However, what if you want to use templates on the client-side to generate HTML rather than writing a lot of JavaScript to manipulate the DOM?
-
Migrating a Silverlight Application to Windows Phone 7
I’m amazed at how quickly Windows Phone 7 applications can be developed. It’s really nice to leverage existing skills and apply them directly to phone development. In my previous post I provided a high-level look at what Windows Phone 7 has to offer and showed a few code samples to help get started. In this post I’m going to walk through the process of migrating an existing Silverlight application from Silverlight to Windows Phone 7. It’s an app that I built back in the WPF/e days (the very first app I tried out on the alpha framework actually) and something that I thought would be fun to convert to Windows Phone 7.
-
Getting Started with Windows Phone 7 Development
Mobile phone development has exploded over the past few years and with the release of Windows Phone 7 there's a new mobile platform available that offers an extremely productive way to build applications and games. With Windows Phone 7 you can build Silverlight or XNA applications and take advantage of languages and tools you already know. In fact, if you're already familiar with Silverlight then you can instantly be productive building Windows Phone 7 applications since the same overall concepts apply.
-
Getting the IE9 Beta to Play Well with Visual Studio 2010
-
Code and Slides from DevConnections Las Vegas Talks
-
Code From My Silverlight Workshop at DevConnections Las Vegas
-
Silverlight Firestarter Event on December 2nd–Streamed Live!
If you’re interested in getting started with Silverlight development or enhancing your existing skills check out the upcoming Silverlight Firestarter event running December 2, 2010. The event can be attended live in Redmond, WA or viewed online (both for free). Sign-up for the event here. I’m excited about the opportunity to speak at the event along with Scott Guthrie, John Papa, Tim Heuer, Jesse Liberty, Jaime Rodriguez, Yavor Georgiev and others.
-
Silverlight Sessions Coming to DevConnections Las Vegas November 1-4
-
Code and Slides from My LIDNUG Talk on Silverlight and MVVM
I had the opportunity to give an online presentation today (download it here) for the LinkedIn .NET User Group (LIDNUG) about how the MVVM pattern can be integrated into Silverlight applications. Thanks to everyone who attended! MVVM is one of those topics that I really enjoy talking about since we use it everyday at my company with the applications we’re building for customers. It’s one of those patterns that can really promote code re-use, enhance testability and minimize maintenance once you jump into it and take the time to learn how it works.
-
Maximizing Productivity with the Visual Studio 2010 Silverlight Designer
Developing Silverlight applications has always been something I've enjoyed. I'm a big fan of the data binding engine that the framework provides and like the flexibility that XAML provides for building user interfaces. With all of the benefits Silverlight provides, the process of developing Silverlight applications hasn't always been as smooth as it could be especially if you relied solely on Visual Studio in the past. Silverlight 2 provided a read-only Visual Studio designer that didn't provide much in the way of functionality while Silverlight 3 only allowed XAML to be edited directly in the editor. Developers using Expression Blend weren't affected by Visual Studio designer limitations much while those without it ended up creating a lot of XAML by hand.
-
Web Camp LA – September 10th, 2010 with Phil Haack, James Senior and Jon Galloway
If you’re in the Los Angeles, CA area and interested in different Web development technologies you’ll definitely want to check out the Web Camp LA event scheduled for September 10th, 2010 if you haven’t already. Phil Haack, James Senior and Jon Galloway (all extremely cool guys who know a lot about different Web technologies) will be presenting. Phil Haack is the Microsoft ASP.NET MVC PM responsible for pumping out all the cool new features in ASP.NET MVC 2 and the upcoming ASP.NET MVC 3 frameworks. James and Jon are Microsoft’s Web Evangelists.
-
Validating Data in Silverlight 4 Applications – IDataErrorInfo
Data validation is an important part of any application. If you've written code to validate data in Silverlight applications prior to the release of Silverlight 4, you've probably discovered that there isn't a great way to ensure that data is entered correctly and errors displayed properly by controls. The typical technique used for validating data was to throw exceptions within property setter blocks as data was found to be invalid. Controls bound to a property could be notified of a data validation exception by setting ValidatesOnExceptions to true in the data binding. Although this technique certainly works, there are some new options available in Silverlight 4 that can be used without resorting to throwing exceptions.
-
Understanding the Role of Commanding in Silverlight 4 Applications
I’ve had the opportunity to give a lot of presentations on the Model-View-ViewModel (MVVM) lately both publicly and internally for companies and wanted to put together a post that covers some of the frequent questions I get on commanding. MVVM relies on 4 main pillars of technology including Silverlight data binding, ViewModel classes, messaging and commanding. Although Silverlight 4 provides some built-in support for commanding, I’ve found that a lot of people new to MVVM want more details on how it works and how to use it in MVVM applications.
-
Silverlight 4 Code Demos from the Microsoft TechReady Workshop
I had the opportunity to give a 1-day workshop covering new Silverlight 4 features at the TechReady conference on Microsoft’s Redmond campus this weekend and wanted to post some of the sample code shown for the people who attended and anyone else who’s interested. The workshop was based on the free Silverlight LOB course Microsoft put together which has a lot of detailed lab exercises and videos available if you haven’t seen them. The demo code covers many of the topics detailed in the What’s New in Silverlight 4 whitepaper that John Papa put together.
-
Building Web Applications with ACT and jQuery
My second talk at TechEd is focused on integrating ASP.NET AJAX and jQuery features into websites (if you’re interested in Silverlight you can download code/slides for that talk here). The content starts out by discussing ScriptManager features available in ASP.NET 3.5 and ASP.NET 4 and provides details on why you should consider using a Content Delivery Network (CDN). If you’re running an external facing site then checking out the CDN features offered by Microsoft or Google is definitely recommended. The talk also goes into the process of contributing to the Ajax Control Toolkit as well as the new Ajax Minifier tool that’s available to crunch JavaScript and CSS files.
-
Tales from the Trenches – Building a Real-World Silverlight Line of Business Application
There's rarely a boring day working in the world of software development. Part of the fun associated with being a developer is that change is guaranteed and the more you learn about a particular technology the more you realize there's always a different or better way to perform a task.
-
Final Release of Silverlight Tools for Visual Studio 2010 Released
If you haven’t already heard the news, the final release of the Silverlight Tools for Visual Studio 2010 have been released! That’s great news for Silverlight developers and to top it off the crew up at Microsoft even snuck in a few new features including intellisense for styles (a big deal in my opinion) and the ability to easily manipulate Grid rows and columns. One of the most time consuming (and boring) tasks experienced by developers is also covered with the new “Go To Value Definition” feature that allows you to jump directly to style definitions with ease. That feature alone is worth the upgrade especially if you’re working with a large application that uses a lot of styles.
-
Integrating HTML into Silverlight Applications
Looking for a way to display HTML content within a Silverlight application? If you haven’t tried doing that before it can be challenging at first until you know a few tricks of the trade. Being able to display HTML is especially handy when you’re required to display RSS feeds (with embedded HTML), SQL Server Reporting Services reports, PDF files (not actually HTML – but the techniques discussed will work), or other HTML content. In this post I'll discuss three options for displaying HTML content in Silverlight applications and describe how my company is using these techniques in client applications.
-
Text Trimming in Silverlight 4
Silverlight 4 has a lot of great features that can be used to build consumer and Line of Business (LOB) applications. Although Webcam support, RichTextBox, MEF, WebBrowser and other new features are pretty exciting, I’m actually enjoying some of the more simple features that have been added such as text trimming, built-in wheel scrolling with ScrollViewer and data binding enhancements such as StringFormat. In this post I’ll give a quick introduction to a simple yet productive feature called text trimming and show how it eliminates a lot of code compared to Silverlight 3.
-
Silverlight TV with Myself, John Papa, Shawn Wildermuth and Ward Bell
I had the chance to go on a live episode of Channel 9 while at DevConnections and had a lot of fun chatting about various Silverlight topics and answering some fairly unique questions posted on Twitter. Here’s more info on the episode from John Papa’s blog:
-
Handling WCF Service Paths in Silverlight 4 – Relative Path Support
If you’re building Silverlight applications that consume data then you’re probably making calls to Web Services. We’ve been successfully using WCF along with Silverlight for several client Line of Business (LOB) applications and passing a lot of data back and forth. Due to the pain involved with updating the ServiceReferences.ClientConfig file generated by a Silverlight service proxy (see Tim Heuer’s post on that subject to see different ways to deal with it) we’ve been using our own technique to figure out the service URL. Going that route makes it a peace of cake to switch between development, staging and production environments.
-
Code from my DevConnections Talks and Workshop
Thanks to everyone who attended my sessions at DevConnections Las Vegas. I had a great time meeting new people, discussing business problems and solutions and interacting. Here’s the code and slides for the sessions. For those that came to the full-day Silverlight workshop I’ve included the slides that didn’t get printed plus a ton of code to help you get started with various Silverlight topics.
-
My Favorite iPad Apps….So Far
So I did it. I went out and bought an iPad a week ago after playing around with one at a local Apple store. The guy at the Apple store didn’t help my decision with his “stuffy” attitude but I’m going to give him the benefit of the doubt since there were a ton of people trying to get his attention that day.
-
Call for Abstracts for the Fall Silverlight Connections Conference
-
Slides and Code from my Silverlight MVVM Talk at DevConnections
-
Simplify Your Code with LINQ
I’m a big fan of LINQ and use it wherever I can to minimize code and make applications easier to maintain overall. I was going through a code file today refactoring it based on suggestions provided by Resharper and came across the following method:
-
Syncing Audio, Video and Animations in Silverlight
-
New Article – Getting Started with WCF RIA Services
Microsoft’s been hard at work on a new distributed data framework now called WCF RIA Services. I recently finished up a new article for Dr. Dobbs and Information Week that provides an overview of WCF RIA Services including the following topics:
-
Need a Little Help from My Developer Friends Out There!
UPDATE: Thanks to everyone who voted! It looks like I'll be presenting on Syncing Audio, Video and Animations in Silverlight Applications at MIX10.
-
Using Autofac as an IoC Container in Silverlight Applications
The subject of Dependency Injection (DI) and Inversion of Control (IoC) containers has received a lot of attention over the last few years. Building applications that are loosely coupled has become more and more popular (and for good reason) especially in applications that have a lot of dependencies that could break over time or need to handle the addition of new modules seamlessly. From a personal standpoint I fall somewhere in the middle of the overall DI argument. I definitely feel that DI has its place and personally use the general pattern in applications but also feel that some use DI in ways that seem to make applications overly complex and more difficult to maintain in the future. My opinion on the subject really doesn’t matter here though since this post is about using an IoC container framework in Silverlight applications.