Jeroen 的个人资料Jeroen Bransen's Space日志列表网络 工具 帮助

Spaces Maps

正在加载...

Jeroen Bransen's Space

a.k.a. J-Thread
2006/8/13

Developing Bots for Messenger

As I already posted in my previous post, I am busy developing Bots for Messenger. My first Bot, the Gwaam Bot, has been online since a month, and it is quite popular at the moment. It was "finished" when I submitted it to the Robot Invaders gallery, but in the meanwhile I've changed several things to make it nicer and better! When you play in August you can win a nice price, so make sure you try it! But I'm not blogging to advertize for my bot.

In the Bot Contest you can choose between 3 SDK's: Akonix L7 Builder, the Incesoft Bot Platform and the Colloquis Buddyscript SDK (previously called Conversagent Buddyscript SDK). I have tried them all, and I will give a review together with some hints and code samples for all the SDK's.

Akonix L7 Builder

The Akonix platform is a large platform, with some interesting features. You can choose between Java, C++ and C# to develop your bots. I've used C# (one of my favorite languages) to develop bots, but I assume the other 2 languages have the same features.

When I tried to set up the first "Echo Bot" example, I miserably failed. I spent a lot of hours trying to get my bot online, but it just didn't work. I didn't try it, untill I read the review on Messenger-Blog about this platform. You need a license file to be able to run this platform! I sent an e-mail and got my license the next day. The text in the e-mail was a bit weird, I couldn't really understand it, but I got my license file and it worked.

The Akonix platform supports welcome messages, responses to incoming messages, sending messages and activity's. The last one is nice, I'm not sure if it is also supported in Java / C++. The weird thing (this platform has a lot of weird things) is that the platform can send an invite for an application, but it cannot respond to one! But when the bot sends the invite, the users accepts, you can send messages between the bot and the activity.

As I promised, I will give a code sample for this platform. First the code for a welcome message (the first message in the conversation). I'm adding functionality to the EchoBot sample, so the variable names etc are all the same. The code:

/// <summary>
/// Called when the application provider has been invited to join a session.
/// </summary>
/// <param name="sCurrent">The session.</param>
/// <param name="pInvitor">The participant who initiated the invite.</param>
public void SessionInvite(Session sCurrent, Participant pInvitor)
{
   // Accept all sessions
   try
   {
       this.m_apiBot.AcceptSession(sCurrent);
       
       // Send a welcome message to all the participants in this session
       this.m_apiBot.SendMessageToAllParticipants(sCurrent, "Hi, I am the Echo bot!");
   }
   catch (APIException e)
   {
       sm_logger.Error("Error accepting session '" + sCurrent.GetID() + "'.", e);
   }
}

It's so easy, just send a message right after you've accepted the session!

Because I'm using C# to build the bot, I can also use SOAP. I'll show you the code for using the MSN Search API to let your bot search the web for your. You will have to add the SOAP provider to your class first, see the MSDN for that. I've placed the code in a seperate class called "Utilities", but of course you can also place the code in the main class (will be a little bit easier, but this keeps my code clean). The code is explained in the comments, I think there is no need to say more. The Utilities class:

 class Utilities
 {
     /// <summary>
     /// Searches the web with MSN Search and displays the results in the conversation
     /// </summary>
     /// <param name="SearchFor">The Search Query</param>
     /// <param name="m_apiBot">A pointer to the BotAPI object</param>
     /// <param name="sCurrent">The session where the results should be sent to</param>
     public static void SearchMsn(string SearchFor, BotAPI m_apiBot, Session sCurrent)
     {
         // Code grabbed from the MSDN:

         // Create a new MSNSearchService object. MSNSearchService is the top-level
         // proxy class for accessing the service. MSNSearchService has one method: Search, which
         // takes a single SearchRequest object as an argument.
         MSNSearchService s = new MSNSearchService();
         // Create a new SearchRequest object that represents the search request.
         SearchRequest searchRequest = new SearchRequest();

         SourceRequest[] sr = new SourceRequest[2];
         
         // Of course search the web
         sr[0] = new SourceRequest();
         sr[0].Source = SourceType.Web;
         sr[0].ResultFields = ResultFieldMask.All;
         sr[0].Count = 5;
         sr[0].Offset = 0;

         // Look for spelling mistakes / suggestions
         sr[1] = new SourceRequest();
         sr[1].Source = SourceType.Spelling;
         sr[1].ResultFields = ResultFieldMask.Title;
         sr[1].Count = 1;
         sr[1].Offset = 0;

         // Add the fields to the request object
         searchRequest.Query = SearchFor;
         searchRequest.Requests = sr;

         // Some other options
         searchRequest.SafeSearch = SafeSearchOptions.Moderate;
         searchRequest.AppID = "PLACE YOU APP ID HERE";
         searchRequest.Flags = SearchFlags.DisableHostCollapsing;
         searchRequest.CultureInfo = "en-US";

         // Make a struct to pass my own parameters
         SearchStruct ss = new SearchStruct();
         ss.SearchFor = SearchFor;
         ss.sCurrent = sCurrent;
         ss.m_apiBot = m_apiBot;

         // Add the event handles
         s.SearchCompleted += new SearchCompletedEventHandler(s_SearchCompleted);

         // Do the Async request (this function will return immidiatly)
         s.SearchAsync(searchRequest, ss);
     }

     /// <summary>
     /// A structure for passing some parameters through the search object
     /// </summary>
     private struct SearchStruct
     {
         public BotAPI m_apiBot;
         public string SearchFor;
         public Session sCurrent;
     }

     /// <summary>
     /// The event handler when the search was completed
     /// </summary>
     /// <param name="sender">The sender object (not used)</param>
     /// <param name="e">The event args</param>
     private static void s_SearchCompleted(object sender, SearchCompletedEventArgs e)
     {
         // Get my SearchStruct back
         SearchStruct ss = (SearchStruct)e.UserState;
         // Instantiate a new string for the result
         string res = "Search results for \"" + ss.SearchFor + "\":\r\n";
         // Loop through the results and add them to res
         for(int i = 0; i < e.Result.Responses[0].Results.Length; i++) {
             res += "\r\n" + e.Result.Responses[0].Results[i].Title + ":\r\n" + e.Result.Responses[0].Results[i].Description;
         }
         // Is there a spelling suggestion?
         if (e.Result.Responses[1].Results.Length > 0)
             res += "\r\n\r\nDid you mean \"" + e.Result.Responses[1].Results[0].Title + "\"?";

         // Send the result to the conversation
         ss.m_apiBot.SendMessageToAllParticipants(ss.sCurrent, res);
     }
 }

And how the function is used (this is a part of the "SessionMessage" function):

if (strMessage.StartsWith("search: "))
{
    string searchfor = strMessage.Substring("search: ".Length);
    Utilities.SearchMsn(searchfor, this.m_apiBot, sCurrent);
    this.m_apiBot.SendMessageToAllParticipants(sCurrent, "Searching for \"" + searchfor + "\"...");
}

When a users says "search: window live messenger" the bot will respond with 'Searching for "windows live messenger"...' followed by the search results (a few moments later).

Another good part of the Akonix SDK is the fact that they can host the bot for you! And it is free! You will not need to have your own server. But the free trial license is quite limited. The most important parts:
- It replaces the beginning of you message with an X character
- The hosting will only last for 180 days
Besides that, the bot is very slow... It responds really late to your questions, compared with the 2 other platforms.

What I like about this platform is:
- The ability of programming in a language you like (C# in my case)
- The hosting
- Be able to make changes to the code without starting the whole bot again! (you can stop your bot program, compile it and start it again, the bot will stay online on msn so this speeds up the testing)
- They offer extra money for winners of the Robot Invaders contest (but I assure you it will be hard to win something, there are some really nice bots coming up (no, I didn't only mean my bots))

What I don't like:
- The limits (you cannot even normally change the display name of the bot, and it doesn't support Display Pictures, Custom Emoticons, Nudges, Winks, Voice Clips etc!)
- The speed (or you can better say slowness)
- The watermark on each message for the free license
- Some other "weird things" (when you talk to the bot, you can see it has a webcam, but when you click it you get "I'm sorry, I don't support this action)
- The control panel, it should be possible to get your bot hosted there, but I couldn't get it working (all buttons are disabled, you can upload your files but then it says "we will inform you when it is ready" and I've never heard from them)

Conclusion: I think this is the worst of the 3 platforms... So personally I wouldn't go for the "free hosting" and "extra prizes" because I can make 5 bots with the other platforms before I have my Akonix bot online! But that's just my personal opinion, maybe I'm missing something...

Incesoft Bot Platform

The Incesoft platform is the one that is the most easy to use. To set up a bot, the idea is really simple:

1. You register at their site and login
2. Goto Msn account management and create an MSN account
You can sign it in already, the Incesoft servers will keep it online for you. The bot will be "Away" as long as you haven't written the code for the bot.
3. Dowload the SDK in the language you like (again it's C#, C++ or Java)
4. Open the Demo files and fill in your account settings
5. Start the application
5b. If you didn't sign in your account at step 2, do it now
6. The status of the bot will be changed to online, and it should work!

Easy right? I was really surprised by this, it all worked perfectly! The Incesoft platform has got a nice documentation also, so there not much to say about that either. I'll tell you what it supports:

- Welcome messages, responding to messages
- Change font, font style and font color of messages
- Receiving and sending Nudges
- Custom emoticons (the only platform that does it!)
- Display pictures (unfortunatly it is not possible to set the display picture from the code, but you can change it on the controll page)
- A limited way of activity's (is has a function called "sendActivity", so I thought it would support activity's, but it turns out that you can display a webpage in the activity window (in a Incesoft sandbox))

Sending and receiving messages is really straight-forward, so I'll skip that one. The custom emoticons took me a while to figure out, but that is because the second parameter is called "filename", so I thought I could point that to a emoticon file on my harddisk. My mistake, you should first upload your custom emoticon(s) to the server (in the control panel) and then you can use them as expected :-). The display picture should be uploaded there too, and you can choose it there, you will be able to figure that out for yourselve. Finally the activity's, just do: session.sendActivity("http://www.website.com") to show the website in the activity window!

Hint: You can of course give parameters to the url's... You could for example do:

if (msg.StartsWith("search "))
{
    session.sendActivity("http://search.msn.com/results.aspx?q=" + msg.Substring("search ".Length));
}

I don't think there's much more to say about this platform, you can use an adapted version of the MSN Search code above on this platform too, because it also supports C#. It's probably nicer to let the bot search and "chat" the results back to you, then open an activity every time you want to search. Finally the pro's and con's, first the pro's:

- Easy to use
- Well documented
- Supports different, well known languages
- Supports Custom Emoticons, Nudges and Display Pictures (extra points for that!)
- Ability to change the message style (font, font color, font style)

Con's:
- No real activity support (I hope they will add this in the future!)

Conclusion:
If you are starting with bot developing and you want to make a bot that doesn't need activity's, this is a really easy to use platform that you should definatly give a try, especially when you already know one of the languages!! But first take a look at my review for the Colloquis platform :-).

Colloquis Buddyscript SDK

Then last but not least the Buddyscript SDK. This is definatly the most powerfull of the 3 SDK's. It's also my favorite one, it is really a nice piece of software! Let me first mention the capabilities:

- Responding to messages in a very very smart way (see below) - Easily change the name and PSM of the bot - Receiving / sending nudges - Setting the display picture of the bot (in settings as well as in code) - Sending and receiving winks!! - Sending and receiving voice clips! (unfortunatly, when you receive one you will not have a wav-file with the voice clip, but you get an event when the user sends a voice clip with the creator name and filesize etc.) - Sharing backgrounds - Full activity support

As you can see, this list is bigger then the other 2 lists. I will discuss all the points and again give some hints / code samples. Let's start with the intelligent matching. The buddyscript SDK has it's own language which makes it possible to let the bot respond intelligent to the user. Instead of directly trying to match the user input on the bot code (for example if message == "hello" then say "hello") this SDK uses some semantics. I'll give you a code sample. Let's say I've got the following buddyscript code:

{editable = 1}
? Hi
  - Hello
  - Hi
  - Yo

It's really easy to understand, the "? hi" is the input and the 3 other lines are output, it will randomly choose one of those 3. You can also have more inputs if you like, but for this example I will keep it simple. Now look what conversation I had with the bot, only containing the above code:

me: hi
bot: Yo
me: hello
bot: Hi
me: yo
bot: Hello
me: hey
bot: Yo
me: hello there!
bot: Hi
me: hi there
bot: Hello
me: hi man
bot: Yo
me: helo
bot: Hi

As you can see, all those words (hi, hello, yo, hey, hello there, hi there, hi man, helo) match on "hi", because they mean the same!! Where the other SDK's will fail when you make typing mistakes (unless you program something for that yourselve) the Conversagent bot's will work perfectly!

Let's continue with the more advanced functions. This was only basic input / output matching. To be able to really "program" something for your bot, you will have to use the Buddyscript syntax. It doesn't really look like another programming language (at least none of the languages I know, which include C#, C++, VB.NET, VB6, Prolog, Java, Basic, and scripting languages, PHP, Javascript, VBScript and JScript). This is a negative point, because it will take some time to learn the language, but in my opinion it is worth it, because you can do so much with it.

To change the Name, PSM or Display picture of the bot, call the following functions:

ABMSNSetFriendlyName(FRIENDLY_NAME)
ABMSNSetPersonalMessage(MESSAGE)
ABMSNSetIcon(INTERNAL_FILENAME)

They are all declared in the Utilities/MSNUtilities.pkg file, together with the functions to send nudges, winks, voiceclips and sharing backgrounds. If you want to use one of those, take a look in that file for more info, shouldn't be too hard to figure out!

Finally the Activity's, take a look at the MSN_Activity sample. The basic idea of using activity's is:

1. Make a new file and add "package lib:/Utilities/MSNActivityUtilities" at the top.
2. Override the "MSNSLPGetAgentMainP4ApplicationName" and "MSNSLPGetAgentMainP4ApplicationId" functions:

   function overrides MSNSLPGetAgentMainP4ApplicationName()
     return "Tic Tac Toe Classic" // CHANGE ME!!!
   
   function overrides MSNSLPGetAgentMainP4ApplicationId()
     return "10331358" // CHANGE ME!!! (default app id for tests is usually 7, check your xml file)
3. Override the "MSNSLPHandleDataEvent" procedure to handle events when data is sent by the activity
3b. call "MSNSLPSendData" to send data to the activity
4. Call "TryToGetUserToOpenP4Window" somewhere in your bot to invite the user. The sample does that when you open a window, but you can also do it when the user says something, for example:

? game
? invite me for a game
? i would like to play the game
? invite me
   - Here is my invitation!
   call TryToGetUserToOpenP4Window()

Easy isn't it?

Let's continue to a more advanced output. The buddyscript SDK also supports the menu's that you've maybe seen in some bots. Take a look at this code:

{editable = 1}
? help
  - Help menu
    About {action Help()}
    Searching {action Search()}
    Another help item {action Another()}
  + about
  action Help()
    - This bot was build by Jeroen Bransen.
  + search
  + searching
  action Search()  
    - Say "search for searchterm" to search the internet!
  + another help item
  action Another()
    - Here is another help item

When you say "help", it will display:
Help menu
1 About
2 Searching
3 Another help item

When you say "1" or "about" then, you see "This bot was build by Jeroen Bransen.". "2", "search" or "searching" will display the search line and "3" or "another help item" will display the last line.

I'll give another code sample, this time for searching with MSN Search. It is a very nice and quite easy to use thing, and you will score extra points with it in the contest! Here is the code:

macro MSN_REGISTRATION_KEY "" // <-- Put your key here.
macro MSN_WEBSERVICE_TIMEOUT 1000

// The following function was posted on the Buddyscript forums by ABFrançois
// And was changed by J-Thread
function BuildSearchAPIPostData(SEARCH, TYPE, COUNT, CULTURE_INFO)
  POST_DATA =                         '<?xml version="1.0" encoding="UTF-8" standalone="no"?>\n'
  POST_DATA = StringConcat(POST_DATA, '<SOAP-ENV:Envelope xmlns:SOAP-ENV="http:/\/schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:tns="http://schemas.microsoft.com/MSNSearch/2005/09/fex" > <SOAP-ENV:Body>')
  POST_DATA = StringConcat(POST_DATA, ' <tns:Search xmlns:tns="http:/\/schemas.microsoft.com/MSNSearch/2005/09/fex"> <tns:Request>\n')
  POST_DATA = StringConcat(POST_DATA, '   <tns:AppID>', MACRO_MSN_REGISTRATION_KEY, '</tns:AppID>\n')
  POST_DATA = StringConcat(POST_DATA, '   <tns:Query>', SEARCH , '</tns:Query>\n')
  POST_DATA = StringConcat(POST_DATA, '   <tns:CultureInfo>', CULTURE_INFO, '</tns:CultureInfo> <tns:SafeSearch>Off</tns:SafeSearch> <tns:Flags>None</tns:Flags>')
  POST_DATA = StringConcat(POST_DATA, '   <tns:Requests> <tns:SourceRequest>\n')
  POST_DATA = StringConcat(POST_DATA, '     <tns:Source>', TYPE, '</tns:Source>\n') // Web / Ads / InlineAnswers / PhoneBook / WordBreaker / Spelling
  POST_DATA = StringConcat(POST_DATA, '     <tns:Offset>0</tns:Offset> <tns:Count>', COUNT, '</tns:Count> <tns:ResultFields>All</tns:ResultFields>\n')
  POST_DATA = StringConcat(POST_DATA, '   </tns:SourceRequest> </tns:Requests>\n')
  POST_DATA = StringConcat(POST_DATA, ' </tns:Request> </tns:Search>\n')
  POST_DATA = StringConcat(POST_DATA, '</SOAP-ENV:Body> </SOAP-ENV:Envelope>\n')
  return POST_DATA
 
datasource MSNSearchAPI(TYPE, SEARCH, COUNT, CULTURE_INFO) => Title, Description, Url {expire="in 1 hour" timeout="MACRO_MSN_WEBSERVICE_TIMEOUT"}
  preprocess
    POST_DATA = BuildSearchAPIPostData(SEARCH, TYPE, COUNT, CULTURE_INFO)
  http
    http://soap.search.msn.com:80/webservices.asmx
    header
      Accept: application/soap+xml
    postdata {encode=no}
      POST_DATA
  simple xml
    Envelope
      Body
        SearchResponse
          Response
            Responses
              SourceResponse
                Results
                  Result {loop=content}
                    Title
                    Description
                    Url

And to call it you do:

procedure DisplayResultsDetails(URL, TITLE, SUMMARY)
  - <a href="URL"><b>TITLE</b></a><hrefsummary> at URL</hrefsummary>
    Description: SUMMARY

procedure DoSearch(KEYWORDS)
  TITLE , DESC, URL = MSNSearchAPI("Web", KEYWORDS, 20, "en-US") show 5
    * Here are the Web search results from MSN Search for "lc(KEYWORDS)":
    - TITLE {call DisplayResultsDetails(URL, TITLE, DESC)}
    * <ifmore>Type "<b>more</b>" to see more items.</ifmore>
  else
    - No results for "lc(KEYWORDS)"!

{editable = 1}
? Search the web.
  - What would you like me to search the Web for?
  + STRONGKEYWORDS=AnythingStrong
    call DoSearch(STRONGKEYWORDS)
    
{editable = 1}
? Search for STRONGKEYWORDS=AnythingStrong
   call DoSearch(STRONGKEYWORDS)

Hint: Notice that I've used the {} menu function here also to display the results!

This may look a bit complicated, but when you use the buddyscript syntax for a while, you will understand it. The only complicated thing is the "BuildSearchAPIPostData" function, but that's because buddyscript does not support nested SOAP request yet. To use simple SOAP request, you can do something like:

datasource FunctionName() =< Name, Description
  soap {expire="now"}
    proxy     http://api.website.com/Services.asmx
    name      FunctionName
    namespace http://api.website.com/
    action    http://api.website.com/FunctionName
  simple xml
    Result
      InnerValue
        List{loop="content"}
          Name
          Description

This is of course not an existing SOAP server, but I think it shows how it works. Then a last hint for the Buddyscript SDK, you also need a license for this SDK, but that is automatically e-mailed to you when you request it on the site, so it takes only a few seconds. Follow the instructions and I think you will be able to figure it out, I didn't have problems with it! If your bot doesn't start, look at the error logs. The license has a limit of 50.000 messages session / month (they changed it from 500 to 50.000) so that will be enough for most bots! And don't forget, when you have questions, the forums are pretty active, so don't be afraid to ask your questions there!

The pro's:
- Support almost everything, exept file transfers and Custom Emoticons
- The intelligent matching of input
- No weird limits on the free license
- Good support for SOAP and other data sources
- Very detailed help pages

The con's: - You will have to learn a totally new language
- You have to use a windows server, because the linux variant of the server doesn't support MSN (I heard this, I've not tested it, so I could be wrong)
- To host it you will need to install a pretty large program on your server

Conclusion: As you might have noticed, this is really my favorite, I even made a bot in Akonix but I translated it to Buddyscript because I couldn't get it all working in Akonix. Buddyscript has so much functions, and also a really good support team (questions on the forums are usually answered in 1 or 2 days!). To go further, I'm almost sure the bot that wins the Bot Contest was made with the Buddyscript SDK! I don't think other SDK's can't beat it.

Final conclusion

I would choose the buddyscript SDK, unless you are sure you do not need all those functionality. The Incesoft platform also has some good points, and those bots are easier to host. I wouldn't choose the Akonix platform, just because I cannot figure it out... But as I already said, maybe it's my mistake! But in this post I'm telling you what I think about it.

I hope this post can help some people out, and I'm really looking forward to test all those nice bots! There are already a lot of nice bots out there, but I expect twice as much when the contest ends. You still have a month to go, so start to develop your bot now!

NB: The code I posted was all written by me (exept small parts of the MSN Search code, as stated in the comments), and therefore you can define it as "my code". Because my code doesn't belong in your bot, I hope you will not copy & paste the code into your bot and use it. It was posted as a sample, not to give the direct contents of your bot. So if you want to use the code, please make sure you do understand it, and at least change the input / output structure a bit, because else it isn't your bot, but mine!

2006/5/19

Windows Live Session London

First of all, welcome to my personal space. I'm not the kind of person that posts his whole life on the internet, but I will however post interesting things about my personal experiences with anything related to the Windows Live Platform. It will mainly be about the new Windows Live Messenger (Activities, Add-ins, Bots) but also about the rest of the Windows Live platform, from a developers point of view.
 
The reason I start this blog now, is because I went to a Windows Live session this week. Of course I had expected that it would be cool, but it was far better then that. I'm really impressed by all the things that were shown, so this is probably going to be a long post, because I have to let you all know about it. I'll start with the beginning...
 
I went to London with 2 of my friends, Yousef El-Dardiry (a.k.a. Juzzi, winner of the Worlds Best App contest and the Gadget Contest) and TheBlasphemer (we call him different in real life ;-)). Of course we first visited some nice places in London, but I will not talk about that too much. At 6.15 PM we met 3 people from the UK at Piccadilly Circus and the 6 of us started searching for the building. When we arrived there, there was a small door in the wall, with a "Windows Live Session" paper on it. Behind the door there were stairs going down, it looked a bit scary there. But it turned out to be a nice basement, with all the people from "Heaven" (the company that organized this session) and of course from Microsoft (the company that... well you know).
 
We were welcomed, we all got a notepad to write things down (I brought my own) and everybody started to talk with others. I immediately got some real life spam, from mister Mess.be (known as Dwergs). After about 15 minutes, the session started.
 
The first speaker was Phil Holden from Microsoft. He talked 15 minutes about the Windows Live products in common. He mentioned them all, and told us what they were planning to improve. He had some great plans, but he didn't mention any release date.
 
About Windows Live Mail he said there just was a major update. The most obvious change was that the ad-bar on the side was removed. Now there is more space for your e-mails, and from a advertisers point of view it was better, because people didn't have to choose what ad they should click, they just see 1 now.
 
Windows Live Messenger has now got 8 million users, in comparison with 210 million users of MSN Messenger 7.5 or earlier versions. They want to have more users on the WLM to have more feedback about the product. He seemed to be really proud about the fact that the latest version starts and signs in way faster than the last few versions.
 
About Live.com he said a lot, because that is at the moment a product that isn't as populair as expected. It turns out to be very difficult to use, especially for beginning computer users. The plan is to gather more users (maybe with advertisement campaigns) and make it easier to use. It should be more obvious how to add new Gadgets, the Drag & Drop will be improved, etc.
 
There's also good news about Windows Live Local, because the images of Europe will be updated very soon. He showed a couple of pictures of London, including a big picture of the London Eye. So it seems like we can finally zoom in very close here in Europe. If I'm correct he said it would start with the UK, and later some other European country's (I'm still hoping they will finally update the Dutch maps).
 
This was the first part by Phil (we will get back to him later) and now Koji Kato started his talk. He is a developer (and he's Japanese as his name implies) for the Windows Live team, and he showed us some demo's to show us how easy it is to integrate the Windows Live platform into your own application (or to integrate your own application into the Windows Live platform).
 
He started with a small talk about the Windows Live developer platform in common. There are developer SDK's available for almost every Windows Live service (Messenger, Spaces, Live.com, Search) and there will be even more in the future.
 
At this point, the really cool demo's started. Koji decided to not only show us the demo's, but also code them on the fly. He started programming a Gadget. It was a very simple gadget to show us the basic code of a gadget. There was pre-written code to speed up this demo, but he explained every line (ok, some lines were explained by: "Don't think about this, without this line it doesn't work, so just add this line") and we got a quick "gadget programming course".
 
The next thing he developed for us, was an activity. For those who don't know what activity's are: the games and other things you can do with your friend in MSN Messenger of Windows Live Messenger are called activity's. I already programmed activity's before (I even won a price in the Worlds Best App contest with it) so I didn't really hear anything new at this part, but I'll blog it down because not everybody might know it. The main activity is just a simple html file, with JavaScript or VBScript in it. To make it work with Messenger, you should make a certain XML file with the URL in it of your activity and some other details. Place that in the right directory, and it will work! When you want to inform the other pc about something, you can just call "SafeSendData(<data>)" and the string <data> will be sent to the other pc. On the other pc an event will be called, and that can do something with the data.
 
Koji also showed us what bots are. He had a nice conversation with the "YellowPages bot". The evening was too short to explain and show how bots are programmed, so he only told us about what you can do with bots. He made 1 big mistake here, by not mentioning the Bot Contest (http://www.robotinvaders.com)! Those who want to develop a bot should definatly take a look at that site! And all the other people too, because bots that have been submitted will be in the gallery on the site. I'm gonna compete for sure, and you might be able to test my first bot within a month or so. I'll post an update here when it is done.
 
After the bots, we went over to Visual Studio 2005 for an example about the Sqlserver and ASP.NET. Koji already had an ASP.NET website communicating with the Sqlserver, and during the session he started to improve that website. At the beginning, you could login with your own name, and upload some images in you photo albums. At the main page of the website a random image was shown. Then Koji started to add a Virtual Earth Map control to the page. The images that were uploaded were in their names already tagged with Longitude / Langitude and Koji used this information to show the pictures on the VE Map. After a few minutes of coding, the front page of the website showed a map of the earth, with al the images on the places were they were taken. A really nice example of the things you can do with the Virtual Earth maps and ASP.NET.
 
Now, Koji opened another program in Visual Studio 2005, a C# program this time. C# is my favorite programming language, I do a lot of things with it, so I didn't expect he would tell me anything that I didn't know (about the things above, I knew about the gadgets, activity's, bots and Virtual Earth). But, this turned out to be one of the most interesting things for me of this session! Koji integrated the MSN Search engine in his application, in about 10 lines of code!! It was a kind of a shock for me that I didn't know this before, and I will definatly use this in my applications! Koji's application was a standard Winforms control with a input text box, a button called "Search" and an output box. He entered "Koji Kato Microsoft" into the text box, and after he pressed search, the results immediately appeared in the output box.
 
Then, Koji did something very cool. He added a "Handwriting" object to his application. He made that before, probably because he used to be member of the Tablet PC team. He integrated that tool in his application very easily, and now he could hand-write the text that would be searched for! And another nice feature, he could move the words, and the words that he placed on top of the input screen were more important for the search then the ones below.
 
After this, we came to a break to eat and drink something. There were a lot of different kind of snacks, I don't know what it was, but it tasted good! I talked with Koji about his presentation and about other things related to the Windows Live platform, and I had nice conversations with other people.
 
Now it was time for Phil again to show us some really nice stuff this time. He introduced us to: Windows Live QnA. QnA (or Q&A) stands for Questions And Answers. People told me it is a bit like Yahoo Answers, but I don't know that service. It is in a very early stage at the moment, and we were one of the first to really see it. The idea is simple: You can ask a question, if the question has been asked before, you see the answer, else the question is posted on the site and other people can give their answers. You can also vote for the answers. After 3 days the question is "closed". You can earn "Kudos" for giving correct answers, and it should be able to use those in the future to get some nice "digital gadgets". The idea is nice, you can build up a giant knowledge base about the world with this, but I don't think it will be populair. It needs a lot of moderating, because I think spammers will find this system soon, and you should always rely on the knowledge of the community. However, we can give it a try and see where it goes, I'll definatly try it as soon as I can use it.
 
At this moment of the session, I thought it couldn't get better. We had so much nice demo's and we had seen so much things. But Phil had again something that surprised us! For most people the following things was the best of the session I think, for me it was one of the best. Phil showed us the new Windows Live Mobile Messenger (got those name from Mess.be, really don't know how they called it, but it's just Windows Live Messenger for your Mobile phone ;-)). The reason this wasn't the best thing for me is because my mobile phone cannot handle this (I've still got a Nokia 3310), but it was really cool to see however. Phil had his laptop (connected to the beamer so we could watch it) signed in on his first account, and he signed in with his mobile phone on his second account. He first typed some messages on his mobile phone, which were showed on the screen. Not very interesting so far. But, then he took a picture of us with his phone, which was immediately sent to the other user (after he clicked Accept on his laptop). It took a few seconds, but then we could see the picture!
 
The next thing he did was recording a sound, and that was sent to the other account as a voice clip, so the other user could play it. He mentioned it would be a nice feature for example when you're driving your car and can't type a whole message, you can always talk to your friends! Note from me: You can better not sign in to messenger when you are driving. The mobile phone doesn't support video yet, neither winks. Phil even discovered a nice feature: Yousef asked if it would vibrate if you sent a nudge and funny enough... it did!
 
The last thing we saw was something that's called "RSS Hub" or something. It hasn't really got a name, this is just how they call it. It is a system that combines different RSS feeds to show the news on 1 page. You can choose what things you want to see, based on Language, Category and Website. They showed us http://xbox360daily.fr/ that is basically the same idea, but then about the XBox360. I wasn't very interested in this, but it can be usefull for some people. I've never seen why RSS is so populair at all... A nice detail is, if you click on the title of an article, the original website is opened, so you will get your clicks and visitors when your RSS feed is in this system...
 
This was the end of the planned session, some questions were asked and everybody stand up to get some more drinks. Together with a few others, I took a closer look to the Windows Live Mobile Messenger. Phil showed us how it looked on his phone, and how he could do certain stuff. It all looks really good, the design and user interface are perfect! I cannot say anything bad about that!
 
There was also a camera to film the whole session, and I was interviewed by Romain Gilbert (from Heaven, the organizer, thanks again Romain!!). I don't know what they will do with the video, but we'll see. It was nice to be able to talk about it with him.
 
At the end of the evening, Phil also gave away 5 VoIP phones! I didn't win one unfortunatly, but I want to say congratulations to the winners ;-). After that, I had a really nice conversation with Koji, and it was really bad we had to leave. We were kind of kicked out the building, because it was too late (actually, it was 11 PM or so). After that, we visited the Big Ben by night, and some other nice London places. The next day we went back to the netherlands, thinking about the great evening we had.
 
I would like to thank Romain Gilbert again for organizing this, together with him the other people from Heaven involved with this (I don't know their names), Phil Holden for showing such cool things and giving away the VoIP phones, Koji Kato for his great demo's and besides that his great enthousiasm, all the other Windows Live developers for the nice conversations we had, Yousef for joining me on this trip, and last but for sure not least, TheBlasphemer for arranging the invitation for me and also joining me on the trip! Thanks to all!
 
If you can't get enough about this after you read this whole story, you can also look to the following websites:
 
 
Update: