Profil von ScottScott's "SiteExperts" Pl...FotosBlogListen Extras Hilfe
    01.08.2006

    Talking about Gadget devs, come out and play!

    I know it has been awhile since I posted.  Tonight we have big news!  MSN Spaces is now Windows Live Spaces. The Windows Live vision is taking shape! In addition to tons of cool improvements (themes, social networking, and more), now Gadgets can be built for Spaces as well as Live.com.  Stay on top of developing for Spaces at the Spaces Platform blog.

    One of the best aspects of Gadgets on Spaces is their viral nature.  See a cool gadget on someones space - just click on the + sign and you can quickly add it to your Space. Let the fun begin!

    Quote

    Gadget devs, come out and play!
     
    Admit it. 
     
    You've always thought MSN Spaces was pretty cool -- that we did some things right and would work hard to smooth out any rough edges over time.  But, you weren't sure if the Spaces team would ever let developers outside the company party in someone else's space.  Well, a big part of joining the Windows Live family today is support for web gadgets written by anyone including YOU!  Thanks to the great work done on Gadgets to date, you can now write a gadget that works both in Live.com (personalized portal) and Spaces (online expression/identity).  And, it only takes one person adding it to their space for your gadget to become popular -- visitors to that space can choose "Add to your space" or "Add to Live.com" right from the header of the gadget, then visitors to that space can add to their spaces, and it's off to the races!
     

    What kind of gadget makes sense in a space?
     
    Remember that the Live.com portal is about YOU catching up on the world.   Spaces is about the world (however big or small you define it with the permissions you set) catching up on YOU.  Users will decide which gadgets are worthy of adding to their space or not, and given our experience with Spaces features to date, the ones that will be the most successfull will be:
    Customizable -- let the space author personalize the gadget so their instance of it is different than another Spaces user's instance.  This could be as simple as letting the space author select the city they want to show weather for OR as complicated as pulling the user's account data in from another service (ie, his/her Netflix queue). 
     
    Reflective of the author's personality -- a gadget that helps the author to be creative with little or no work is more relevant than one that lets a visitor come to a space and check their mail account or convert their currency.  All of those gadgets are killer apps; it's just the ones that are more like sharing your photos or music tastes will probably be more popular. 

    Adaptive to our rich themes/layouts -- after adding your gadget to your own space for testing, try selecting a bunch of dark and light themes AND moving the gadget between our narrowest and widest columns to make sure it works well in all scenarios.  You want that puppy to shine!
     
    How do I get started?

    1.  Build a Windows Live web gadget according to the SDK available at the Windows Live Dev site
     
    2.  If your gadget has any settings/edit UI that visitors shouldn't see, then use the following code to detect whether Spaces is running the gadget in author mode and show/hide the UI accordingly.  There is a p_args argument outlined in the gadgets SDK and we've added a new method off of that called getMode().  You can do a simple comparison of the value returned from that method call to determine author vs. visitor mode.  
    Something like the following:
              
             foo = function(p_elSource, p_args, p_namespace)
             p_args.module.getMode() == Web.Gadget.Mode.author
    3.  Add the gadget to your own space using the following Spaces API: 
     
    Switch between "Edit your space" and "View your space" to see how it behaves in both author and visitor modes.  If your manifest file, Javascript, and CSS are hosted anywhere but Windows Live Gallery (gallery.live.com), the gadget can only be added for editing/viewing by the space owner.  It will be hidden to visitors.    
    4.  Zip up your manifest file and supporting Javascript/CSS files and submit that gadget package to the Windows Live Gallery so other visitors can add it to their space by going to Customize --> Modules --> "Add gadgets from Windows Live Gallery".  Once it has been verified to work in each service, it will appear in the Gallery for users to add to Live.com or Spaces.  Make sure you use relative URLs (mygadget.css instead of http://foogadgetdeveloper.com/mygadget.css) in your manifest XML to point to the scripts/CSS or the gadget will be rejected during verification.    
     
    5.  If you upload a cool gadget to Gallery that you think will be a hit with Spaces users, comment on this post or send mail to spgadget@microsoft.com.   Same thing applies if you have feedback or feature requests for making gadget development for Spaces better.
    We'll be updating the Gadgets SDK and sample code on dev.live.com very soon to reflect the additional Spaces items.  In the meantime, you have everything you need above.
     
    Good luck stormin' the castle!