April 2008 - Posts

WL Training at Bangkok | Day 02

09.50. Started to Write

All of us agreed to bring all of Windows Live knowledge to Indonesia at least for the next MSDN Day topic. I am interested to Windows Live Messenger Activity SDK that we can use to develop activity in MSN or Windows Live messenger. With the activity, we can develop applications (Games, Ads, etc) on top of Windows Live Messenger. Unfortunately we can't get the SDK inside downloadable Zip file from Microsoft. Something wrong with it :).

Act01 ISV_Messenger_2

Actually I expected to get deep understanding around WHY aspect of Windows Live and of course Silverlight 2.0. But due to time constraint (only 2 days), our trainer decided not to go deep (only level 100 training I guess). He only gave broad overview of Windows Live and not went deep into one specific technology (with some reasons it is okay for me). That is why I spent my time reading some materials during training session myself (OOT mode). I read about:

- Atom Syndication Format (Atom) : RFC 4287
- The Atom Publishing Protocol (AtomPub) : RFC 5023
- Representational State Transfer (REST) architectural style 

REST, as you may heard a lot while people talk about RIA/AJAX. It is an architectural style for designing scalable web apps. REST's proponents argue that the web's scalability and growth are a direct result of a few key design principles:

  • Application state and functionality are divided into resource
  • Every resource is uniquely addressable using a universal syntax for use in hypermedia links
  • All resources share a uniform interface for the transfer of state between client and resource, consisting of:
    • A constrained set of well-defined operations
    • A constrained set of content types and and optionally supporting code on demand.
  • A protocol which is:
    • Client-Server
    • Stateless
    • Cacheable
    • Layered

REST is introduced by Roy Fielding, founder of Apache HTTP Server Project, in his doctoral thesis. I do recommend you to read his thesis before using any of REST's implementation technologies. Fielding's thesis gave me the WHY aspect of some particular features in SL and WL. If you don't like reading 180 pages, you can read this ACM article, Principled Design of the Modern Web Architecture.

SL Archit  roy_fielding 

Our trainer is now explaining what is inside WLQuickApps. I tried that sample apps since the beginning, so nothing new for me! If you never try WLQuickApps, this is worth to invest your time on that. Just download it and try some applications on it (Tafiti, Contoso ISV, Contoso University, Adventure Works Resorts, etc).


14.04. Sleepy, need coffee.

 

Thx- Risman Adnan

Share this post: | | | |

GG Uses BITS

Hope you guys know what BITS (Background Intelligent Transfer Service ) is all about. It is a file transfer protocol that facilitates prioritized, throttled, and asynchronous transfer of files between machines using idle network bandwidth. BITS uses unused bandwidth to transfer data. BITS version 1.0 supports only downloads. From version 1.5, BITS supports both downloads and uploads. Uploads require the IIS web server, with BITS server extension. Last night, after read an email from my friend, I was thought that BITS and Microsoft Sync Framework can be utilized for Offline Web Application scenario like GG Google Gears.

 

G01

Today, I am happy to know from Wikipedia that Google Gears installer actually uses BITS !!

  • Google Gears Installer: Uses BITS to download gears data.
  •  

    09.34. Started Windows Live Training Day 02 at Bangkok.

     

    Ciao - Risman Adnan

    Share this post: | | | |

    WL Training at Bangkok | Day 01

    Today we start

    10.13. Started to write.

    Sleepy, but have new stuff to hack :). The trainer is Ben Williams, he is presenting overview of Windows Live now. Based on schedule, he will move to Silverlight Streaming (SLS) after the overview. I am not interesting with SLS for now. So, I downloaded Windows Live ID Client SDK (WLIDClientSDK) and play with it.

    Wl02 

    The scenario is simple. You have an Windows client application that want to utilize authentication service from WL ID Authentication Server, after authenticated, client application maybe consume other WL services.  The Windows Live ID service that receives credentials and responds by issuing an authentication ticket. This authentication ticket is used in subsequent requests to obtain service tickets for specific Windows Live ID sites and services, as necessary. This ticketing mechanism is common.

    Now lets look inside WLIDClientSDK. There are 2 DLLs :

    - Microsoft.WindowsLive.Id.Client.dll (we will play with it more)
    - msidcrl40.dll (COM object for Windows Live ID Login Screen)


    Ok, let see the main WLIDClientSDK DLL design. Basically it contains simple classes for identity management and authentication to WL ID Authentication Server. Microsoft.WindowsLive.Id.Client.dll has Identity and IdentityManager classes as its core. The IdentityManager class is used primarily to maintain a connection to the authentication server and to perform tasks necessary for the creation and maintenance of Identity objects. Use IdentityManager to manage your application name and create Identity objects. To initialize global instance of IdentityManager, you can use CreateInstance method and after initialized, IdentityManager object can be used to create identity objects. The Identity class represents an end-user of your application. Use CreateIdentity to create an instance of Identity to use in your application.

    ClassDiagram1

    Now lets look my simple codes below using WLIDClientSDK API:

    using System;
    using Microsoft.WindowsLive.Id.Client;  

    namespace WLClientID
    {
        class Program
        {

     

            [STAThread]  // Don't forget to use this as Sign-In dialog Window is Single Threat App
            static void Main(string[] args)
            {
                IdentityManager oIDManager = IdentityManager.CreateInstance("Risman123", "RismanConsole");
                Identity oID = oIDManager.CreateIdentity(); ;
                string currentUserName = "";
                if (!oID.IsAuthenticated)
                {
                    try
                    {
                        //Try to authenticate the user by showing the Sign-In dialog window.
                        if (oID.Authenticate())
                        {
                            currentUserName = oID.UserName;
                        }
                        else
                        {
                            Console.WriteLine("Authentication failed");
                        }
                    }
                    catch (WLLogOnException wlex)
                    {
                        //Check to see if FlowUrl is defined.
                        if (wlex.FlowUrl != null)
                        {
                            //If FlowUrl is defined, direct user to the web page to correct the error.
                            Console.WriteLine(wlex.ErrorString + "Please go to " + wlex.FlowUrl.AbsoluteUri + "to correct error");
                        }
                        else
                        {
                            //If FlowUrl is not defined, simply display the ErrorString.
                            Console.WriteLine(wlex.ErrorString);
                        }
                    }
                }
                else
                {
                    //If user is authenticated, they intended to Sign-Out. Try signing the user out.
                    try
                    {
                        oID.CloseIdentityHandle();
                        currentUserName = "";
                    }
                    catch (WLLogOnException wlex)
                    {
                        //Check to see if FlowUrl is defined.
                        if (wlex.FlowUrl != null)
                        {
                            //If FlowUrl is defined, direct user to the web page to correct the error.
                            Console.WriteLine(wlex.ErrorString + "Please go to " + wlex.FlowUrl.AbsoluteUri + "to correct error");
                        }
                        else
                        {
                            //If FlowUrl is not defined, simply display the ErrorString.
                            Console.WriteLine(wlex.ErrorString);
                        }
                    }
                }
            }
        }
    }

     

    If you see the codes, oID.Authenticate() method open Sign-In dialog Window from msidcrl40.dll (COM Object).  My question is, can we customize the sign-in windows? I don't really like its user experience and want to add more links in the form. I will find out how to do that later yaa (hope that is possible). I get very bad cold (flu and couch) today, hiks.


     WL01


    Hope this helps.

    11.50. Finished 1st Report from Bangkok :).


    Thx - Risman Adnan

    Share this post: | | | |

    Theoretical Physics is finished! Done!

    Software Architect and Astrophysicist Brian Beckman tell that in Channel9. He is now leading a very small team of "distinguished engineers" and "technical fellows" that seeks to create a new product for Microsoft, code named Quark. Brian and his big brained colleagues have produced a prototype quantum computing device that takes the notion of parallel computation to a whole new level !! The really interesting thing here is that Brian has determined that Theoretical Phyiscs is finished. It is DONE !!. Scientist should go home, go to sleep. Possibly learn Meta-Physics.

    Take a look here :).

    Thx - RAM

    Share this post: | | | |

    My Presentations at Hanoi, Vietnam

    I have to do three sessions. Two sessions at developer track in launch (April 9) and one more session at faculty workshop (April 10). It is not new for me to deliver three technology sessions (totally 2.5 hours) in two days because in Bina-ISV Training at LIPI, I often deliver three full day alone :). The most interesting part of my Vietnam presentations is we will use English-Vietnamese translator. As you guess, language problem here is bigger than Indonesia.

    So, here is my slides if you want to download:

    - LINQ to SQL and Entity Framework 
    - Better Software Quality with VSTS 2008
    - PLINQ and Singularity talks at Faculty workshop (slides is not ready yet)

    Big thanks for all my friends in Hanoi for this unique opportunity (talking to non bahasa people).

    Thx

    Share this post: | | | |