Category Archives: web authoring

Expression Blend 2.5 problems with Silverlight 2.0 Beta 2

I hit a worrying error in Expression Blend 2.5 June 2008 preview. In search of a good screenshot, I opened the new Clock sample, and got this result:

The same XAML compiles and runs fine in Visual Studio 2008 with the latest Silverlight 2.0 Beta 2 tools.

Note that if Expression can’t render the XAML, none of its design tools can be used at all.

So what is going on here? Don’t Expression Blend and Visual Studio share the same parser? This kind of problem would soon torpedo any notion of designers and developers working seamlessly on the same code.

I got my screenshot by temporarily modifying the offending code.

Fixing a Silverlight 2.0 WCF reference in a VB application

Another in my recent series on getting Silverlight 2.0 beta 2 working.

If you create a WCF web service for Silverlight, it’s well known that on the server side you have to change the binding to basicHttpBinding (or use the new Silverlight-enabled WCF service). Then you can use the Add Reference wizard in your Silverlight application and code against the generated ServiceClient.

This works in C#, but in VB you may hit this error at runtime:

The error is “Could not find endpoint element” etc, and it refers to your “client configuration section”.

I fixed this by comparing the ServiceReferences.ClientConfig file generated in a VB project with that for a C# project. Check the Contract attribute of the endpoint element. It should be qualified with the full namespace, by default the name of your app. In this example, it would be:

contract="RegSilverlightDemoApp.RegService.IRegService"

However, the VB wizard omits the first part of the namespace; then at runtime, it can’t find the service.

Evidence, perhaps, that C# is the language of choice in Microsoft’s developer division.

Upgrading to Silverlight 2.0 Beta 2? Proceed with care

I dived straight into the Silverlight 2.0 Beta 2 download, and soon hit this dialog:

I discovered that I should have read this guide to installation by Microsoft’s Bradley Bartz. It is a little arduous: remove KB949325 (which requires the Visual Studio installation media) as well as any previous Silverlight SDK and tools, apply Visual Studio 2008 SP1 Beta if you have not yet done so, then install Silverlight. Otherwise you may get an error relating to silverlight_uninstallrtmpatches.exe as I did.

I’m grateful to BradleyB. I admit, the issue is also noted on the download page:

If you have previously installed Silverlight Tools Beta 1, you must uninstall KB949325 before installing Visual Studio 2008 SP1 Beta.

I should have read it more carefully.

Update

In my case, it was worse than that. I could not find KB949325 in the list of installed programs, but the Visual Studio SP1 Beta install still failed. I found this post by Heath Stewart. I had to follow the manual steps with reg.exe; the utility did not work for me. I also found that KB945140, which is the SP1 Beta, was actually listed as installed in Programs in Control Panel, but only for the Visual Studio 2008 Shell (Integrated mode). I removed that too. Eventually, SP1 Beta installed successfully, following which the Silverlight SDK and Blend 2.5 installed without further issue.

Stewart has not responded to Will Dean’s comment on his post:

It sometimes feels that VS + .NET FX are in a death-spiral of an ever-increasing prevalence of this sort of issue.   

For more evidence, see Aaron Stebner’s worrying posts about problems with the installation of .NET Framework 3.5 Client Profile. Apparently this beta, once installed, makes it hard to install other versions of .NET or applications which depend on them; and uninstall is a multi-step process that has to be done in a certain order.

The only positive thought I can muster from all these complications is that this is the kind of issue that running apps in the browser avoids, at least for users rather than developers. That assumes that the install for the Silverlight runtime is bulletproof; I’ve been impressed with it so far, though I’ve heard of some users having problems. The Flash runtime isn’t immune either; I’ve had issues installing the latest security update and resorted to Adobe’s Flash uninstaller.

By the way, your website is down

Ever had that, in an email or phone call, and thought: if only I’d known earlier?

There are plenty of ways to monitor a web site’s availability, but I thought it should be simple to do a custom monitoring application in Visual Basic. Here it is, as described in the August 2008 Personal Computer World. One advantage of this approach is that you can write your own rules for what counts as available. For example, you can set the acceptable response time; or check the content of a page.

It’s very basic. For example, the alert just calls the FlashWindow API. You’d probably want to change it, maybe fire off an email or two. I may improve it over time, but no promises.

Technorati tags: , ,

Ruby on Rails on .NET

Microsoft’s John Lam reports:

IronRuby dispatched some simple requests through an unmodified copy of Rails a few days ago. Today, we’re going to show off our progress live at RailsConf.

He adds that performance is terrible; so you might not want to migrate your project just yet. Why bother? Mainly, to get Rails productivity plus access to .NET libraries – in other words, integration with Microsoft’s platform.

Technorati tags: , , , ,

Google Gears support in WordPress – is this the road to plug-in hell?

Interesting to see Gears support in WordPress 2.6:

The patch adds all static files used in the admin interface to a single offline storage. That speeds up page loading a lot, as it serves virtually all requests for static files from the computer’s HD instead of the network. So instead of 50-60 requests to the server on some pages, there are only 2-3.

Very simple, very effective. A user blogs the experience here.

So is Gears taking off? Maybe. There’s Zoho; there’s Google itself, there’s MySpace, which uses Gears for searching and sorting messages. Note that Gears is still in beta; it’s curious that major sites are willing to use it in that state, but that’s the Internet for you.

I have reservations about Gears. There’s the security angle. More seriously, there’s the question about whether this is the right way to extend the browser. Google is doing its own thing; so is Yahoo with BrowserPlus; so is Adobe with Flash, and Microsoft with Silverlight. All of them swear that they love browser standards, and in some cases (like local storage) there may be consolidation towards a standard API – see here for a good discussion – but there is real danger of plug-in hell.

Security is bound to be an issue as well, since the more browsers and their plug-ins interact with the client (which is the purpose of these extensions), the more potential there is for compromising the client.

Danny Thorpe back at Microsoft

Danny Thorpe, best known for his work on Delphi at Borland, is returning to Microsoft:

I will soon be jumping back into the Microsoft maelstrom, this time in the Visual Studio / Developer Division (devdiv) team. I will again be telecommuting from Santa Cruz. I’ll be part of a new incubation team composed of Chuck and a few other legendary devdiv veterans (I’m not sure I can say who yet) working on stuff to make accessing Windows Live services easier for developers.

I have had great respect for Thorpe ever since reading his book on Delphi Component Design, which despite its age is still a good read if you want to know how the Visual Component Library in Delphi hangs together. His career has been a bit butterfly of late – from Delphi to Google to work on Gears, then Microsoft developing Live Services, then working on browser plugins at cooliris (makers of PicLens); and now back to Microsoft.

If Microsoft is to bring its Live Services into wide use, strong Visual Studio integration is a must; I guess this may be what his new role is all about.

Adobe Creative Suite 4 in public beta

Adobe has released a public beta of key applications from its popular Creative Suite 4, including Dreamweaver, Fireworks, and Soundbooth. The company says, “Neither the quality nor the features are complete yet,” which makes them alpha releases in the usual terminology, but they are called beta anyway. A few highlights:

Dreamweaver integrates WebKit for a new Live View, has better support for Ajax and Javascript, and integrates Subversion:

Once you’ve defined Subversion as your version control system, you can update your site to get the latest versions of its pages directly from within Dreamweaver; no third-party utility or command-line interface is required.

Fireworks has greater scope, supporting CSS, and allowing export to HTML with CSS, PDF or AIR. Now includes Adobe Type Engine.

Adobe has also been polishing its “universal user interface” across its product range.

The beta is for Mac and Windows, and is intended for existing CS3 users; others will find the beta timing out after 48 hours.

Downloading now…

Mac users refusing to install Silverlight

The New York Times has run into a hail of criticism from Mac users over its use of Microsoft’s Silverlight plug-in for its offline reader, Times Reader, in its new Mac version, now in beta.

I took a careful look at the comments. There are 122 at the time of writing, of which around half are complaints about the choice of Silverlight. Here’s a few:

Nope. Not going to use *anything* from Microsoft. If reading the NYT requires MS products then, for this reader, goodbye NYT.

Silverlight? Why? I’m using Mac to escape Microsft’s crappy technology.
No thanks

PLEASE listen to your readers. Macs have a long, successful history of superior page layout, design, and rendering of published content. There is absolutely no reason to require a Microsoft plugin to display text and graphics on a Mac.

Silverlight will not install on Firefox on an Intel Mac (all versions current.) Why, O, why did you choose to go with a proprietary Microsoft technology with all the predictable Microsoft flaws and prejudices?

I was really looking forward to this, but I cannot support Microsoft’s Silverlight platform. Not only is it proprietary, but it runs more slowly than any alternative (Java, Flash) and it does not support end-user choice of browsers (Firefox, Safari not supported).

By way of balance, there are some dissenting voices:

Sometimes I find it hard to admit I’m a mac user. What a community of loud close-minded drama queens. “I’m canceling my subscription because you built an app that requires silverlight.” Please.

I took a look. My Mac is running Leopard (OS 10.5) and Safari is the default browser. I downloaded the beta and ran the installer. It duly invited me to install Silverlight:

Clicking the button took me to Microsoft’s download page, where I clicked the big button:

Downloaded, opened the download, and Silverlight installed:

Installation was quick, and at the end invited me to restart the browser – though it seemed to do so automatically. Microsoft’s web page now informed me that Silverlight was installed and showed an animation.

At this point, I was able to continue the Times Reader installation, which said “A suitable version of Silverlight has been found”. A couple of clicks later, I was up and running:

The application worked well in my brief test. The most obvious difference from the Windows version is that there are four fixed window sizes, rather than on-the-fly reflowing of text. It will be interesting to see if the more advanced Silverlight 2.0 can come closer to the full WPF (Windows Presentation Foundation) version; if it can, there would be a good case for implementing both versions in Silverlight. It is an interesting project, since it runs Silverlight within a desktop application, rather in the manner of Adobe’s AIR.

Maybe Flash would have been as good or better, though as I understand it the New York Times finds XAML, the layout language in Silverlight, an excellent fit for what it wants to achieve. Nevertheless, my experience suggests that blanket hostility to Silverlight on the Mac is hard to justify from a technical perspective. In fact, Microsoft has done a good job in respect of keeping the download size small and making installation smooth. Admin rights were requested, but no restart was needed.

Still, if Silverlight attracts so much bile from readers of the NY Times it suggests Microsoft has a considerable problem on its hands. I’d imagine it is off-putting to others who are considering the development of Silverlight apps, since Mac support is a critically important feature.

Who needs AIR? NY Times does desktop Silverlight app for Mac

The New York Times is porting its excellent Times Reader application to the Mac using Silverlight 1.0:

Times Reader for the Mac is a native Cocoa application, which uses the Safari toolkit and Silverlight to render the pages.

Follow the link for some screengrabs. Adobe’s AIR (which also uses the Safari toolkit) is the obvious choice for this kind of online app; it’s interesting to see the NY Times adapting Silverlight in a similar manner.

I spoke to developer Nick Thuesen about this at Mix07, so this is not news for readers of this blog; though I’d become sceptical about whether it would be delivered because of the delay. Now, I’m surprised that the NY Times is still using Silverlight 1.0 rather than waiting for 2.0.

The Silverlight version appears to have some compromises. In particular, it cannot flow text on the client:

We paginate the pages for the Mac version on our servers (the Windows version does this on the PC). When you sync, we send you pages for the four window and three font sizes described above.

Still, the screens look good and I look forward to trying it – especially as the public beta will be free, whereas you need a subscription for the full release.

There is a high level of hostility towards Silverlight in the comments to the post. Mostly these appear to be religious in nature – ie. Mac users hate all things Microsoft. It does illustrate the difficulty the company has in persuading the world to take its cross-platform ambitions seriously.

Thanks to Ryan Stewart for the link.