代码改变世界

Book List Gadget for Windows Live Spaces - Usage Instructions

2006-10-08 16:30 Jeffrey Zhao 阅读(...) 评论(...) 编辑 收藏
Click here to add the gadget to your Windows Live Space

Click here to view the sample of the gadget




Book List Gadget for Windows Live Spaces - Usage Instruction


Contents at a Glance

  1. Introduction
  2. Features
  3. Preference Storage for Windows Live Spaces
  4. Author Mode Instruction
  5. Contact me
  6. Appendix I - Introduction to Book List Manifest
  7. Appendix II - DISCLAIMER
  8. Appendix III - Q & A

Introduction

    Thanks for paying attention to Book List Gadget for Windows Live Spaces.

    It's my first shippable gadget for Spaces. At first, building a book list for Windows Live Space is just for the purpose of providing the missing function for China market (The Spaces for China market has not a book list with images. Unluckily, my passort was registered from China but I'm a crazy reader and most of my books are brought from Amazon!). But during my work, a desire to make it better increased stronger and stronger in my mind. It's just my style. At last, I built a book list which can be customized and the gadgets will display by the owner's settings. Basicly, it will use the information from the owner. The details from Amazon will be shown if the ower provides the ISBN and something is missing. Want to have a list in the most convenient way? Just provide a list of ISBNs and the gadget will automatically get all the information you need.

    Well, let's begin.



Features

    Please see Figure 1-3. You can possibly gain a proper impression what the gadget look like. As you can see it, it's similar with the book list of Windows Live Spaces. Here're the basic functions of the gadget: It shows the authors, the title and the publisher.
  • The text to show can be given by the owner or from Amazon if ISBNs are provided.
  • All the texts will link to some place - if you need them to do so.
  • The format of texts can be defined by the ower by 'template'.
  • The owner can give a title to the book list.
  • The owner can set the position of images - left or right.
  • The details can be show/close by a switch for each book. The details are definitely from Amazon when the gadget is loaded.
  • The color of background, plain texts, anchor links and separate line can be defined by owner. It means the gadget can be configured to work with almost all the themes.


Preference Storage for Windows Live Spaces

    All the gadgets need saving and loading preferences. Unfortunately, Windows Live Spaces Gadgets haven't build-in function of preferences preserving (It's unlike gadgets for Windows Live since there's a huge difference between them and it will cause serious security and perf issues).
 
    For the reason of that, I wrote a simple storage for saving preferences. It's really simple, not fully stress tested and actually I've no idea whether it's reliable or not (I've tried my best but who knows the host service). So please DO NOT try to break the storage. It seems I've accepted the issues which should be assumed by Windows Live - it's not interesting - wish my service can work properly longer.
 
    Please click here to visit the sign up page (Figure 4) and sign up your space name with password (Your password will be hashed and store into database and will never exist in clear text). And, you can change your password in change password page (Figure 5). Please be careful that you must only register the name of your own space WITHOUT 'space.live.com' (e.g. I should register 'jeffz-test' as my space name for my test space). Any mistake could cause another user's being not able to register. If you find that your space name has been registered by others, please contact me ASAP.



Author Mode Instructions

    After you add the book list gadget into your space, a control panel like Figure 3 will occurred.
 
    Manifest Url is the url of book list manifest provided by the owner. The manifest is an xml in a specific schema. The schema will be described in Appendix I.
 
    Title...seems it's self-explanatory enough.
 
    Template is the format to show a single book's title, author and publisher. A template is a case-sensitive string contains '{Title}', '{Author}' and '{Publisher}'. They will be replaced by the corresponding information of book. Template is an optional section. If the user leave it blank, the gadget will use '{Author}: {Title} - {Publisher}' as template by default.
 
    Image's Position - left or right.
 
    And then, there're four colors for the owner to input. You can just use "Black" or "White" to indicated a color (All the colors can be found here). Also, a standard #RRGGBB color format can be used.
 
    At last, fill in the password and click Save button to the save your settings. Please register the storage for you space before your saving.



Contact me

    If you found any bugs or you have any suggests, please feel free to contact me via E-mail. Also, you can just reply the entry and leave any message here.
 
    I'm always waiting for your feedback.




Appendix I - Introduction to Book List Manifest:

    A manifest is an Xml file contains a list of book. The gadget will prase it and display the information in it. Let's begin with a simple example.
 
The Simplest Example
    This example is the manifest of Figure 1. Here's the content:
<?xml version="1.0" encoding="utf-8" ?>
<Books>
    <Book ISBN="0735621632" />
    <Book ISBN="0735619670" />
    <Book ISBN="0201799405" />
</Books>
    The first line (<?xml version="1.0" encoding="utf-8" ?>) of content should be preserved in the manifest. The document element is '<Books />'. There're sub elements '<Book />' in the document element. Each of them indicates a single book. You can simply provide the ISBN for each book like above and all the information will be taken from Amazon.
 
Customize the books
    If you want to show a book which can't be found in Amazon or you just want to show your own information, you can omit ISBN and give something you want to show in manifest:
<?xml version="1.0" encoding="utf-8" ?>
<Books>
    <Book ISBN="0735619670" />
    <Book>
        <Title url="http://www.samplebook.com">Sample Book</Title>
        <Author url="http://www.author1.com">Author 1</Author>
        <Author url="http://www.author2.com">Author 2</Author>
        <Publisher url="http://www.samplepublisher.com">Sample Publisher</Publisher>
    </Book>
</Books>
     Now gadget will show the infomation in manifest. All the texts and links will follow the manifest. Please notice that you can provide more than one authors for a single book.
 
What if...
    Please see the manifest below:
<?xml version="1.0" encoding="utf-8" ?>
<Books>
    <Book ISBN="0735619670" />
    <Book ISBN="0201799405">
        <Title>Sample Book</Title>
        <Author url="http://www.author1.com">Author 1</Author>
        <Author url="http://www.author2.com">Author 2</Author>
    </Book>
</Books>
    If a valid ISBN is assigned to a book, gadget will look up Amazon for details. In the example above, the gadget will display the title without a hyperlink, two authors given by the manifest and the publisher information with link from Amazon.
 
    For some reasons, if a valid ISBN is assigned to a book, a detail page will always be shown. The user can click View details/Close details to switch between breif information and details from Amazon (Figure 2).



Appendix II - DISCLAIMER:

PLEASE KEEP IN MIND THAT SOME OF THE CONTENT THAT WE MAKE AVAILABLE TO YOU THROUGH THIS APPLICATION COMES FROM AMAZON WEB SERVICES. ALL SUCH CONTENT IS PROVIDED TO YOU "AS IS." THIS CONTENT AND YOUR USE OF IT ARE SUBJECT TO CHANGE AND/OR REMOVAL AT ANY TIME.


Appendix III - Q & A:

TBD





Figure 1

 


Figure 2


Figure 3


Figure 4


Figure 5