Home Interviews Developers Our View Blogs We Like The List

This Blog

Syndication

Quick Apps

LiveSide - Developer Blog

October 2007 - Posts

  • Windows Live Developer Event In The UK

    If you're in the UK and interested in developing using the Windows Live Platform, then Microsoft are going to be hosting a developer event next Tuesday (6th November) at their Reading HQ.

    From the event page:

    Overview:

    Windows Live defines a set of services and components that can be used in your web applications, whether or not you use Microsoft's server platform.  In this event we'll show how to use some of those services in your own applications.

    1. The Platform for the Web

    In this session we look at a selection of Windows Live services and build them into an application.  We'll look at the Windows Live Contacts API - really useful for social networking functionality but also a great example of what's possible using the Windows Live Data service.  We'll build maps into an application using the Virtual Earth map control.  We'll let our users browse their photos using the Windows Live Spaces Photos control, and we'll enable authentication in our app using Windows Live ID.

    2. Silverlight Streaming, and Windows Live Search

    Silverlight Streaming by Windows Live is an innovative service that allows you to host your Silverlight applications, including rich media content, for delivery to various client platforms.  In this session we'll show you how to build a simple Silverlight application, encode some media content, and host it all with Windows Live.  We'll extend the sample application to show you how you can leverage the Windows Live Search functionality too.

    The speakers for the event are Mike Ormond and Martin Parry, so it promises to be quite good and informative. Unfortunately, due to prior engagements I will be unable to attend, but if you do attend, please let us know how you found it.

    SL

  • Easy Way To Upload Silverlight Apps To Windows Live

    image Back when I wrote about adding a Silverlight Streaming app to your blog, I showed you how to add the Silverlight app to your SLS account at http://silverlight.live.com/. Well, now there is an addon for Expression Encoder (thanks Angus) that will allow you to upload your app straight to your account from within Encoder itself.

    Simply download the addon from Microsoft Downloads and install it. Go through the steps as stated before but this time, you will see an extra section in Encoder:

    image

    Fill in the details of your Account number and Key code (these can be found at http://silverlight.live.com/account/manage.aspx), and then you're good to go, and just press Publish.

    Once that has done, to get the iframe code (if you need that), then click on the down arrow, this will allow you to get the applications that you already have uploaded (including the new one you just did):

    image

    Now you can simply copy the code into your blog entry or website.

    SL

  • Overview: Professional Windows Live Programming

    Wrox is about to release a book by Jon Arking titled "Professional Windows Live Programming". As a Microsoft MVP, I was fortunate to get a pre-release copy.

    The book does a good job highlighting the many services that makeup Windows Live, including:

    While much of this information is already available on the web at dev.live.com (Microsoft's developer site for everything Windows Live), the information presented in the book offers the reader a good "get your feet wet" understanding of each of the topics covered.

    Even with this exhaustive list of Windows Live topics, there are some Windows Live technologies not covered in this book, including:

    As a gadget developer, I would have liked to see an expanded section on Live Gadgets. However, the information that is present is concise and accurate. The book goes into some depth describing how to setup IIS on your local machine to develop gadgets locally.

    If you are a developer looking to incorporate Windows Live services into your application, this book is for you. You will need a good working knowledge of DHTML, JavaScript, C# and Web Services.

    Be aware that, as with any web technology, changes are happening almost every day; many times faster than print books can keep up. For example, Virtual Earth recently released version 6, but the book states the lastest version is version 5. Even so, this book makes a good read now and should make a handy quick reference tool for some time to come.

    If you are interested in a sneak peak, Wrox has the following excerpts from the book in PDF format:

    The book doesn't officially go on sale until November 5th (at least here in the US), but you can pre-order the book from Amazon.com (who is offering a 5% discount on pre-order sales). You can also pre-order the book directly from the publisher.

  • Writing Windows Live Writer Plugins - A Recap

    There was a comment left on my most recent plugin guide:

    "I would love to see a guide on how to code Plugins for Writer.  That would be really cool :D"

    Well, that guide already exists and were some of my first posts on LiveSide, so I thought I would give a quick recap, just going through the posts that I have done and explaining what each one was for.

    1. Writing Plugins For Windows Live Writer - Getting Started - This was the first post in the series that talked about how to get started, configuring Visual Studio and writing a very basic plugin that just inserted some text into your blog entry. Source code.

    2. Writing Plugins For Windows Live Writer - Adding An Icon - This post showed you how to add an icon to your plugin so that you have something to show in the Insert menu. Source code.

    3. Writing Plugins For Windows Live Writer - Working With Forms - Most, but not all, plugins have some kind of window open when you click the insert link for the plugin, this entry showed you what you needed to do to use a form in your plugin. Source code.

    4. Writing Plugins For Windows Live Writer - Using Settings In Your Plugin - Your plugin may require settings that a user can use to make their experience with your plugin more customizable, here is how you use settings when creating your plugin. Source code.

    5. Writing Plugins For Windows Live Writer - Using PluginHttpRequest Instead of HttpWebRequest - This was my latest entry where I showed the benefits of using PluginHttpRequest instead of the normal .NET HttpWebRequest. Source code.

    6. Windows Live Writer Amazon Starter Plugin - This was Colin's post that went through making a "real world" plugin that used Amazon's SOAP service.

    Hopefully, this will give people a good reference for starting out with creating Live Writer plugins.

    SL

  • Writing Plugins For Windows Live Writer - Using PluginHttpRequest Instead of HttpWebRequest

    In a few of my plugins, I often find myself using System.Net.HttpWebRequest to get some data from a website, whether from a service or to access a specific part of a website. This is all very well and good, but what happens if you're trying to use Windows Live Writer behind a proxy? Well with Writer itself, that's not a problem, you just use the proxy settings to bypass it:
    image

    The only trouble is, although Writer is using those proxy settings, your plugin isn't. Unless you do more work to set the proxy in the WebRequest, but that means hard coding the details into your plugin, which won't really work, or creating a seperate set of settings for it, which again is a but cumbersome. Fortunately though, the Writer team have given us an answer for this. Embedded deep in the Writer APIs is a little class called PluginHttpRequest. What this class does is use the settings that are already configured in Writer. How cool is that!

    Now, one important thing to note about this class: it is not exactly the same as HttpWebRequest, more like a very good substitute. If you have built a plugin that uses HttpWebRequest, you will still have to modify some of the code. To demonstrate this, I created a test plugin that will show the HttpWebRequest method, and the PluginHttpRequest method.

    I created the basics of a quick plugin, and used the following UI:

    image

    The code behind the Test 1 button looks like this:

            private void button1_Click(object sender, EventArgs e)
            {
                string s = "";
                try
                {
                    // Create the HttpWebRequest
                    HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
                    WebResponse resp = req.GetResponse();
                    Stream st = resp.GetResponseStream();
                    StreamReader sr = new StreamReader(st);
                    s = sr.ReadToEnd();
                }
                catch (Exception ex)
                {
                    s = "Failed to get information: \n" + ex.Message;
                }
                textBox1.Text = s;
            }

    The code behind the Test 2 button looks like this:

            private void button2_Click(object sender, EventArgs e)
            {
                string p = "";
                try
                {
                    PluginHttpRequest prequest = new PluginHttpRequest(url);
                    Stream presp = prequest.GetResponse();
                    StreamReader sr = new StreamReader(presp);
                    p = sr.ReadToEnd();
                }
                catch (Exception ex)
                {
                    p = "Failed to get information: \n" + ex.Message;
                }
                textBox2.Text = p;
            }

    As you can see, there is one step that is missed out when using the PluginHttpRequest, and that's getting the WebResponse and getting the stream from that. This is where the PluginHttpRequest differs, in that the GetResponse() returns a Stream, not a WebResponse.

    The results of these tests are as follows:

    image

    This is for me at home, not behind a proxy, see how they both work, now if I was behind a proxy, Test 1 will give a failure message in the textbox, but Test 2 (assuming you have Writer configured for your proxy), will show the same as it does above, the source code for www.microsoft.com.

    Now, this is only a basic example of how to use the PluginHttpRequest, and there are other properties to this class that can be levied. But if your plugin uses the methods described in Test 1, I would recommend migrating over to Writer's native class, as it means your plugins will not only work for Joe Public, but also for those who are behind a corporate proxy, for example.

    Test project source code: http://cid-fabdddc5cad93494.skydrive.live.com/self.aspx/LiveSide%20-%20Public/SourceCode/HttpRequestTest.zip

    SL

  • Virtual Earth SDK 6 Released

    image The Virtual Earth blog today announced the release of version 6 of its VE SDK. The new SDK is available online on MSDN as well as the interactive SDK on http://dev.live.com/. To get the new version, all you need to is change your ashx link from http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=5 to http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6, it's as simple as that.

    So what are some of the highlights of the new version?

    • Safari support
    • Localization
    • Bird’s eye pushpin accuracy
    • Multipoint routing
    • Plus lots more.

    I would really recommend heading over to the VE Blog as they have a very extensive write up about all of the new features in this release. Don't forget how easy it is to use the interactive SDK. And for those who really want to get deeper into VE, I would always suggest ViaVirtualEarth or the MSDN Forums.

    SL

 

Copyright (c) 2006-2007-2008 Liveside
Listed on the Offical CS Listings Powered by Community Server, by Telligent Systems Themed By nb development Logo By pxb Designed By Mark Sutherland