MIX 10 – First Impressions

Once of the interesting elements of this year’s MIX is the complete domination of Twitter as a medium for distributing updates. If you have been following me on Twitter (I’m @LACanuck), then you will already have heard a lot about the Windows Phone 7 development announcements. However, as useful as Twitter is, it’s not really a place for opinion. Unless your opinions fit into <140 characters. Mine don’t

Windows Phone

There is no question that there is a lot of buzz around developing apps for the Windows Phone 7. This is completely understandable, as WP7 allows Silverlight developers the ability to create applications for the phone. According to Scott Gu’s keynote, there is only “one Silverlight”. That is to say that applications that run on the browser should also be able to run on WP7.

Now there is going to be a little bit of a reality check for that statement, especially as we hit Silverlight 4. I’m not sure, for example, if Silverlight as running on WP7 has the concept of a trusted application. I suspect that it doesn’t, although I’m open to correction if my assumption is misplaced.

But working solely within the security sandbox is not the only real difference. Specifically, the design of a WP7 application is very different than a Web application. The size of the design surface is, naturally, much smaller on the WP7. And the UI needs to consider that main UI gesture is touching, a paradigm that doesn’t apply to Web applications. All of this is to say that while, theoretically, the same application could run on both platforms, it’s much more likely that different views will be used by the different targets. If nothing else screams that you should be using MVVM as a design pattern for Silverlight, this will.

Deployment

Once you see what’s possible in the WP7 environment, the excitement regarding creating applications is easy to understand. And not only are the apps exciting, so too is the ability to monetize your application. Microsoft will be making a Marketplace available so that you can sell your apps on-line. Given how well Microsoft has done with community driven marketplaces, I have no doubt this will be successful.

But what about your own personal applications? What if you want to develop a WP7 application that is used by your mobile sales force? At the moment, the answer seems to be that you’re out of luck. This might change before it goes live, but the word that I’m hearing is that the only way to get apps onto your phone is through the Marketplace.

Now, that’s not completely accurate. If you have Visual Studio 2010, you can deploy your application to a physically connected phone. However, the time to live for applications which have been deployed in such a matter is limited, To, approximately, a month. After which the app would need to be redeployed.

I’m not a fan of this. In fact, in my mind ,it drops the collection of Silverlight developers who might write WP7 apps by 50%. At least. I can take guesses at the reason why this limitation is the case, but still, it’s not what I was hoping for. The term for what I’m looking for is ‘siloed’ deployment’ (that is, deployment only for people in a particular silo) and I’m hoping that it becomes part of the released version of WP7 before it goes live with the first version.

While there is more of interest that is being revealed here, this is probably a decent start. And I’ll be both blogging and tweeting as much as I can while I’m here at MIX ‘10

Consuming WCF in Silverlight 3 Session at MIX ‘09

This session covers three separate scenarios for Silverlight and WCF interactions. The basic functionality of adding a service reference, creating proxy class and calling method hasn’t changed. However, they are trying to address some of the common pain points related to WCF

It’s now possible to remove the network traffic associated with ‘fat’ SOAP/XML messages by using a binary XML format to send the message. The demo reduced message size by 30%. But size was not the main design goal for binary XML. While compression is possible at the HTTP level, apparently binary XML reduces effort on the client and server as messages are compressed and decompressed. Binary XML is intended to improve speed. And while not every message is affected significantly (small messages and strings don’t really benefit), there is no case that MS is aware of where it gets worse. So binary XML becomes an appropriate default formatting standard.

Also included in this section was a description of why server-side error information is not accessible from within Silverlight. Specifically, if you have a server-side HTTP 500 code, the information related to the error does not get pushed to Silverlight. This is a fairly hard limitation related to how browsers pass HTTP information to plug-ins. And Silverlight is really a plug-in. The solution is an HTTP hack, there internal server errors get returned as HTTP 200 codes. And Silverlight 3 is built to pull the error information off of the response and surface it through the normal SOAP faulting mechanism.

When it comes to security WCF calls in Silverlight 3, there are two choices: browser-based and manual. The browser-based approach depends on cookies and Forms authentication at the browser level. This is easy to implement, but is open to cross-domain threats IF you have enable cross-domain access for every Web site. The manual approach has identity managed by Silverlight. When the credentials are added by Silverlight (instead of the browser), the cross-domain thread is eliminated. SL3 provides an out-of-the-box mechanism for creating the SOAP headers associated with the manual mechanism. It’s the ‘out-of-the-box’ that is new in SL3, not the technique itself.

The big gotcha in the manual mode is found in the method that WCF uses to prevent replay attacks. There is the concept of a MaxClockSkew. In indicates how far apart the client and server clocks can be. The default value if 5 minutes. which is to say that if the server system has a time of 11:05 and the client system has a time of 11:11, all messages will be rejected. This is the kind of situation that I’m sure will bedevil developers. MS is still trying to decide what the default value of MaxClockSkew will be when SL3 is released.

The second scenario covered in this session involved pushing messages to Silverlight. It was possible in SL2 to push message to the Silverlight application, but the knowledge required by the developer to implement it has been reduced. Because I’m very familiar with WCF, the technique does not seem advanced. Basically, the idea is to have the SL3 client make a one-way WCF call with a callback contract. The OneWay mode means that there is no calling context hanging around on the client. The callback allows the service to call back to the Silverlight application. In the Silverlight application, there is an event raised when the callback method is invoked from the service.

The third and final scenario talked about REST in Silverlight 3. As it turns out, SL3 doesn’t have much added in this area. Mostly because “the REST story in SL2 was pretty complete” This is actually pretty true about WCF in Silverlight in general. It’s not that there aren’t things that people would like to do with WCF in Silverlight (different bindings, for example). But the reality is that the limiting factor for most new feature requests is the HTTP stack from within the browser. It was mentioned that it’s possible to roll your own HTTP stack by going out to JavaScript through the HTTP DOM, but that technique will probably not work if the Silverlight application is running on off-browser mode.

Having an Out-of-Browser Silverlight Experience

The fundamental philosophy used to develop the off-browser functionality for Silverlight applications was to reduce the friction surrounding the moving of the application from in-browser to out-of-browser. Specifically, there is no separate download that is required to take a Silverlight application off-line. As a developer, you need to make a change to the manifest to support installation, but nothing more than that. And because the off-browser application runs in the same sandbox as the in-browser application, there are also no security warning messages on installation.

From the user’s perspective, there are two methods to take the application off-browser. The first is the right click on the application. A second option (besides the Silverlight Configuration that has always been there) is visible to indicates that the application to be installed. Also, it is possible to place a button on the application that will install the application.

The manifest is where most of the information used in the installation exists. The name, description and icons related to the application are stored there, along with the flag indicating whether the application can be taken off-browser.

Updating the Silverlight application is exactly the same as the traditional Silverlight application. Which is to say that updates are downloaded and installed automatically. This keeps it consistent with the Silverlight model, where new versions are automatically picked up. The biggest difference is that once a new version is detected and downloaded, the Silverlight application does not automatically terminate and start running the new version. It waits until the next time that the application starts before launching the new version.

Warning – in the beta version, there appears to be a bug associated with updating from your localhost. In the words of the Silverlight PM, it’s a little flaky.

In terms of interacting with the client, an off-browser Silverlight app still has access to the Insolated store. And through the OpenFile and SaveFile dialogs, access to the local file system. There is  a quota on isolated storage, but it is increased to 25MB from it’s current size of 1MB. That’s nice and probably sufficient for most applications.

There are still a number of open questions about off-browser Silverlight applications. Is there an event raised when the application is closed (this is done through Javascript in normal Silverlight applications)? Is there a mechanism that simplifies serialization and synchronization? Should there be a way to uninstall the application other than by right-clicking on it (what if the app can’t load)? I’m sure time and the need to make this work in the real world will provide answers.

Go Beyond Best Practices Session at MIX ‘09

Because I already had some exposure to Silverlight 3 at the MVP Summit, I thought I’d start off with a session directed at creating user experiences. Not to mention that I was interested in the idea of going beyond the superlative of ‘best’ :)

The basic premise of the talk revolves around the idea that companies that succeed find ways to get customers to engage with them. The experience of using the customer transcends the details of the product or service being offered. He mentioned a book called “Firms of Endearment” which describes companies that arouse passion from the people involved. The authors of the book determined that companies that fit this model, exhibit a number of characteristics. One is described by the SPICE model.

Consider the following categories.

  • Society
  • Partners
  • Investors
  • Customers
  • Employees

The value created by the companies in Firms of Endearment was equally important across all of these constituencies. Experience is about the effects that we create for these constituencies.

But experience is becoming a buzzword. That is to say, it’s a phrase that businesses use to think that

For most businesses, process is more important that effect. People follow the ‘process’ without a thought to what the effect on others might be. Experiences are a combination of behaviors, attitudes and emotions. For most companies, the emotional side is what’s lacking.

For example, Fed Ex doesn’t believe that it’s in the delivery business. It thinks it’s in the ‘peace of mind’ business. This is really about engineering the experience that people have when they use your product/service. It’s about creating clues as to how important you consider your constituents to be. These clues are frequently small and subtle. And the effort to perform them is also small. But a focus on ROI has obscured the the need to actually follow through. The suggestion is that instead, there should be some concentration on ROY. As in Y not provide the clues necessary to make customers/employees/etc realize that you are as passionate about the business they they are.

I found the presentation interesting. At a minimum, it gave me pause to think about how ObjectSharp delivers to this constituencies. While I think we do a decent job, there are certainly areas where we can improve. And we probably need to pay closer attention to the details of the experience that our customers have. And, in many cases, it’s the details that are more important than anything else.

MIX ‘09 Keynote – Part 3

Some additional Silverlight 3 improvements that are being announced.

  • Data Binding improvements, specifically element-to-element bindings
  • Validation error templates, although there is no support for the IDataErrorInfo interface
  • improvements on the ability to push data from the server to the client. Conceptually, this is similar to callback functionality in WCF.
  • Introduction of a DomainServices class that is used to generate a proxy class on the client. The proxy class has the ability to track and marshal changes between the client and server.
  • Validation logic can be declaratively defined on the DomainServices derived class. The generated proxy class will contain the same validation, triggering the error template within Silverlight.

And now, the big news.

Silverlight 3 will be able to run outside of the browser on both Windows and the Mac. Security is the same sandbox model used from within the browser. There is built-in support for automatic updates. And the application can be aware of its off-line/on-line situation. There will be more about this later in the week, I’m sure.

MIX ‘09 Keynote – Part 2

More stuff on the Web server side of the equation. There is a new version of the Web Platform Installer. This doesn’t have any impact on me, at least not in the past. But there is now a gallery of community-based applications, such as DotNetNuke, DasBlog and WordPress that can be automatically installed onto a web server through the Platform Installer. Not useful to me, but nice to people who are trying to streamline the build-out of a Web server. You can see a list of these applications here.

Silverlight 3.0 has some new functionality to improve functionality. There will be hardware-based acceleration for compositing, where available. And there are a number of features aimed at improving the media experience. A gentleman from NBC came out and showed some stats on the Beijing Olympics and Silverlight. As well, NBC will do the same for the Vancouver Olympics. Forgive me for not caring, as none of this is available in Canada.

You will probably hear that Silverlight has 3D functionality. A warning that it is not true 3D, but the ability to move a 2D image in three dimensions. The actual term is ‘perspective transform’. If you have to ask about the difference, then you probably don’t care. But for those that do, visualize a flat-screen image that can be rotated about the X-, Y-, or Z-axis so that it appears to be spinning. Hit testing works appropriately (you can only click on the image, regardless of how it is oriented.

Silverlight 3.0 will provide a better experience for SEO. This includes the capability of supporting deep linking and navigation.

Going back to the idea that support for a sketch-based workflow, Expression Blend 3 will have a features called SketchFlow. This feature allows for easy navigation through a collection of pages. The interface allows for quick and simple creation of the workflow through an application. Each state in the workflow corresponds to a page.

One of the things that is interesting about the creation of the pages in a workflow is the inclusion of Wiggly controls. These are controls that, through their appearance, will not be mistaken for a completed application. The borders on the controls take on the appearance of a hand-drawn image. Yet the controls are still real WPF controls, meaning that they work in the Blend and, indeed, when the applications is ‘run’ through the SketchFlow prototyping tool..

On the Road to MIX ‘09

I’m writing this particular blog post while in the air on the way to Las Vegas. For the next three days, I’m going to be at the MIX ‘09 conference. For regular readers of my blogs, that means you can expect a flurry of posts. I tend to live-blog the sessions that I’m in (particularly the keynotes) as a way of note taking, if nothing more. In this way, if nothing more, it is completely different than the MVP Summit I was at a couple of weeks ago.

Actually, there are some other differences. Where the MVP Summit is as much about giving information to Microsoft as it is about receiving, MIX is all about the receiving. While I have some inkling about some of the announcements that you’ll be hearing about, I also know that they have kept some under wraps. Which means that they were even held back from the NDA sessions at the MVP Summit. So, even though I already have some blog posts ready to go, I will still need to pay attention to what’s being discussed. And I’ll pass the good stuff on to you as soon as I can.

Bring Your Data to Life with WPF Session

The premise behind this session is the idea of separation of UI designers and developers. The UI people don't know how to code business rules. But the UI people need to be able to 'try out' the user interface and easily make changes. This is the designer/developer separation that is in the Web space, only in this case, it's for Windows Forms applications.

For those of you who aren't aware, one of the drawbacks of WPF is the lack of data binding support. This is a significant step back in functionality, if you're used to creating ASP.NET or Windows Forms apps. And it stopped me from using WPF to any great extent.

The session starts out slow, talking about the rationale behind data binding. This is something that I would expect most developers to be aware of, although if he's including designers in his target audience, then I can understand the digression.

Databinding in a WPF form can be done through the latest version of Expression Blend. A new Data pane allows for the selection of a data source (a class, for example). Once the data source has been specified, the property sheet for a control allow the mapping between the control's property and the data source's property to be made. This is a familiar process, although very new to WPF and Expression Blend.

WPF includes the concept of a value converter. This is a function that operates on a bound value with the result from the conversion being displayed. As well, the data binding appears to be hooked up to the property change notification mechanism, in that if a property is programmatically changed, the updated value appears in the form.

There is also a mechanism (INotifyCollectionChanged) which raises an event when the collection is changed. The idea of 'change' in a collection is the addition or removal of an item from the collection. WPF data binding is able to detect and respond to these events.

WPF has replaced the ObjectDataSource class with an ObjectDataProvider. Without seeing the details, I'm guessing there is a lot of similarity in terms of functionality, if not the details.

In the WPF itself, the binding notation looks like the following

<TextBox Test="{Binding Path=Sun.Name, Source={StaticResource solarSystem}}" />

This notation takes the Name property of the Sun object found in the ObjectDataProvider named solarSystem. A little cumbersome, but since it's definable through Expression Blend, that's only an issue for those of you who code in Notepad 2008.

As part of the data binding mechanism, there is the concept of a data template. This greatly resembles a template within ASP.NET, where different fields and controls are displayed based on the mode of the control. One twist is that WPF data templating can be defined based on the type of object being displayed. Within the same list box, a collection of Products will appear with different fields then a collection of Customers, even though the underlying WPF is the same.

The final reveal for the demo is a list box that displayed the information about a solar system not as a list of planet names, but as a graphical representation of the solar system orbit with the images of the planets and the positioning away from the sun based on properties from the object. The cool part is that there is no change to the underlying object necessary to change from a drop down list of properties to the graphical view. Only the XAML needs to be modified. But again, that is the power of WPF.

One word of warning. Not all of the advances in WPF are necessarily available in Silverlight. A concept called a CollectionView was explicitly called out as not being part of Silverlight 2. So if you are developing for the Silverlight market, make sure that the data binding techniques you use are supported before you spend time on it.

WPF provides support for a hierarchical data template. This template because useful when you are trying to create a tree view visualization for your data. It's similar to the list box data template in concept, but the level within the hierarchy becomes part of the mechanism for distinguishing between the different data fields and styles that are used.

It looks to me like data binding for WPF has finally moved towards the standards that we have been used to. The presentation didn't cover error providers and error notification, but a slide at the end suggests that it is, using the IDataErrorInfo interface.

Steve Ballmer Keynote - 2

Continuing from the previous post

Guy commented on how Microsoft is different. Responsive, helpful and a change from what Microsoft's image has been historically.

Some questions from the audience

On Adobe

They are a big competitor in some areas. Specifically in the Silverlight and .NET vs Flex and Flash arena. There is no expectation that they are going to "go away". Will continue to work with Adobe where it makes sense.

On Internet Explorer not moving at the speed of .NET

Many innovations, including the browser, were tied to the "next O/S after XP". Microsoft .NET was not. It was because they took dependencies on the O/S. That will not happen in the future. Future IE will incubate the innovations outside of the O/S and move them into the O/S once they have been proved out

On the PHP applications that Yahoo has

There will be some refactoring of the search, ad and email technologies when Yahoo and Microsoft get together. Some technology will come from Microsoft. Some will come from Yahoo.

On the Synergies between Microsoft and Yahoo

Scale is an advantage in the search game. More search = more ads = higher bids on ads. The more ads you have, the larger the number of ads that can be inserted into the results of a search. Google has more ads that either Yahoo or Microsoft. The merger will help scale out in this market.

On the Virtualization Server Licensing Scheme

The question was regarding the licensing cost for virtualization to be able to compete with Amazon's computing in a cloud (ECC or EC2, I can't remember the acronym). The answer was that Microsoft has plans to provide a similar service.

On Silverlight on the iPhone

Microsoft would love to get Silverlight on every mobile platform they can. There is currently no free runtime license for apps on the iPhone. Apple apparently wants 30% of all of the revenue generated through the iPhone. So while it would be nice to have, the expectation is that developers are unlikely to bite. And it was suggested that perhaps Apple is not being embracing of external developers.

On Silverlight and Microsoft applications

The question is whether Silverlight will become part of Microsoft apps, such as Hotmail. As the product cycle for the relevant products is appropriate, Silverlight will become part of the deliverable. But only on those technologies where appropriate. MSN Messenger was called out specifically as not a likely choice.

On HD DVD vs Blu Ray

Microsoft doesn't make peripherals. They support the devices where the demand is and will continue to do so. In the long term, the format isn't that important, as content is more likely to be delivered over the network.

On Enterprise adoption of social networking

The ways in which people interact with each other within the corporation is changing. Sharepoint provides collaboration services, so there is already some knowledge about how people interact. The key is to leverage these areas to provide more 'social-like' capabilities. This area is early technology, so there will be advances in the future.

Steve Ballmer Keynote - 1

The keynote is actually an interview between Guy Kawasaki (as interviewer) and Steve (as interviewee). A number of interesting points.

Regarding competing with Google

Of the four areas in which Microsoft is focused, Google is really only present in one of them (on-line ads). But the on-line ad space is expected to be the next big thing.

On why he keeps working

This is the answer that everyone should give. He:

  • Loves what he does
  • Works with smart and energetic people
  • Enjoys the challenge

From personal experience, this should be what everyone strives for.

On the place of XBox in the Microsoft world

Steve put it into perspective. XBox has 25 million users world wide who are passionate about the products that Microsoft creates. But there are 1 billion Office users. It makes sense to focus efforts on driving passions appropriately

On Web and Windows forms technologies

Microsoft is trying to blur the boundaries between Web and Forms, in terms of capabilities. Apparently 1.5 million Silverlight downloads per day. WPF currently has a broader reach because of Windows Update

On Apple's MacBook Air

"My laptop is lighter", "It's missing half the features of my laptop", "Where's the DVD?", "We'll get rid of this (the Air that Guy has) and get you a real machine"

On Vista

The number one issue for Vista is application compatibility and driver compatibility. Made choices to create a secure O/S. The result is that compatibility is hurt. As drivers and applications are updated, the compatibility issues have decreased. With SP1, the uptake in the business market will increase.

On Microsoft's Skill Set

Microsoft is trying to focus on two skill sets: consumer devices and business platforms. Most companies only attempt to create one. Microsoft is lucky enough to be able to focus on two, with a third and fourth still a possibility

On Social Networking

People will continue to use the Internet to keep in touch, to find friends, to connect with people. It is unlikely that any one company/website/technology will be able to stay on top forever.