Jeffrey Zhao's profileJeffrey's Own BoxPhotosBlogListsMore Tools Help

Blog


    September 12

    有感Atlas的优点、缺点以及学习

    Atlas的优点是什么?
     
      仁者见仁,智者见智。在这种问题上每个优秀的技术人员应该总是有自己独特的见解。能得到一个能“服众”的结论固然好,但是支持百家争鸣更为重要。我始终认为Atlas的最大长处不在于其Ajax特性,不在于其提供了复杂JS才能实现的多样化功能。在我看来,Atlas是很了不起的,而它的了不起体现在三个地方:
     
    1. Declarative Syntax:
      应该有不少人有过在HTML Element中嵌入浏览器无法识别的属性,而在某个地方通过自己编写的Javascript方法读出并加以一些功能。其实我在数年前总觉得这样的方法是tricky solution。我不喜欢tricky的方法,特别是无条理性的tricky solution。这样的方法的确可以work,但是可读性一般比较差。在大多数时刻,我始终把代码的可维护性放在第一位。后来由于在项目中需要开发一个Rich Client,给用户以大量的操作自由度(描述不当,不过估计无法用三句两句话说清了),于是不得不使用了这个方法。在进行了大量尝试后,发现如果合理使用,这的确是一个非常灵活有效,并且易于维护的方法。ASP.NET强大的客户端Element模型又可以说对这种方法合作的几乎天衣无缝。

      Atlas的Declarative Scripts可以说将上面提到的这个方法进行了极大的升华。将一个从一开始似乎十分Tricky的方法变成了另一种开发方式,将程序设计和XML结合在了一起。事实上,这给了许多项目设计一个参考。将客户端代码的结构化也大大地提高了可维护性。

      原来,代码还可以这么写。
     
     
    2. Extendable Behavior, Extender, etc.
      它们所作的贡献是提供了良好的设计。能让程序员轻松地写出符合良好设计的代码。

      一个良好设计的代码,其中一个非常基础的特点就是“high cohesion”,也就是“高内聚”。高内聚的组件与外界的依赖很少,这样大大方便了开发,调试,测试,发布和部署。

      就拿开发一个Extender来说,需要的就是写一个Class Library,并编译成一个程序集。使用时只需简单的引入,并像使用普通控件一般即可。在开发时需要的也仅仅是Atlas的基础结构,少得不能再少的一个程序集。

      还是一个典范,还是一个示例。
     
     
    3. Powerful Foundational Framework
      这里不提Atlas提供了一个完全面向对象的编成框架,提供了一个Compat层来兼容多个浏览器等。现在来思考一个问题:如何写出高性能的Web应用程序?

      或者换个角度想一下,一个网站的性能是从什么方面体现出来的?这不光是要服务器端的努力,特别是现在客户端越来越Rich,客户端的Load也越来越多。优化PLT(Page Load Time)也是一个越来越重要的议题。这需要对于浏览器,HTML以及HTTP标准有相当完整的认识。通过分析Page Load来优化一个页面能够达到非常了得的效果,经过PLT优化的网页往往能将一张页面的打开时间缩短3-5秒甚至更多,并且往往也能减少服务器端的运算以及流量。

      Atlas的基础代码框架的每一步都是尽量地符合优化PLT的Best Practice。所以使用Declarative Script和Atlas框架所提供的JS类往往效率会比较高。打个比方,浏览器对于相同域名只会并行地使用两个端口进行加载,因此将不同资源从不同域名加载是优化PLT的一个常用方式。但是由于可能JS中任何部分的代码都可能会改变的页面的DOM或者Render出不同的内容(例如使用document.write),因此浏览器在下载JS文件时是会Block住其他任何的资源加载,无论其是否在同一个域名中。加上现在JS文件越写越大,数量越来越多,因此浏览器的加载能力就被削弱了。在Atlas中,Binding机制能比较好地处理JS加载问题,以优化页面的PLT以及Perceived Performance。
     
     
     
    Atlas的缺点?
     
      其实我有时候总是会想,Atlas代码是不是写的太庞大了,使用起来方便吗?比如其OO特性,使用起来似乎不是很方便,代码量和代码体积颇高,而且对于没有接触过Atlas的人不是很容易看懂。外界不少提供面向对象机制的JS框架似乎就精炼许多。我也因为某些需要为JS写了一套面向对象机制的扩展,很简单,使用方便,OO机制使用方式也是尽可能地向Java代码靠拢。继承,虚函数等必须的功能也一个不缺。

      不得不说,这个似乎是Atlas的一个瑕疵。但是瑕不掩瑜,Atlas依旧是一套优秀的JS框架。它实现的Ajax,却又远远超越了Ajax本身。冲着Ajax or .NET来接触Atlas的程序员往往总是能从它身上得到惊喜。
     
      另外,有人向我抱怨过Atlas调试非常的不方便。说实话,的确不太容易,需要一些小技巧,不过一般来说,还是可以接受的。
     
     

    学习Atlas……
     
      我经常在我身边的开发人员中推荐.NET,虽然无偿,但是冲得就是对这一技术的喜爱。我是技术人员。当然对于Atlas也向别人进行过介绍,也看到不少人学习Atlas的情况。

      似乎Atlas进入了.NET相同的情况,大家纷纷在使用,感觉很爽,而去了解它是如何做的人却很少。知道在什么情况下如何使用的人也很少。而且能够灵活使用的人,往往也对其机理有了相当认识。可能的确只有从一个特定的层次以及角度去看它,才能对它有更好的掌握能力。“使用论”和“深入论”的争锋似乎依旧存在。

      其实我也是“使用论”的支持者,但是我仅仅支持良好的使用方式。这都不是一朝一夕能够炼成,也不是仅仅靠了解一门技术就能做到的。要成为一个优秀的技术人员,所需的技术覆盖之广,其实远超过普通技术人员的想象。

     
    August 30

    Foundation of Atlas

      大约花了三天时间,粗粗地看完了这本书。这本书出来也有一段时间了,我却第一次开始阅读,可以说比较落伍。
     
      说实话,我不喜欢这本书,要我打分的话,我只会给三颗星。这本书没有让我有什么收获。
     
      首先,这本书的的确是讲Foundation,因此几乎所有的内容都是和http://atlas.asp.net的内容非常的相像。书中的大部分例子几乎就是对于网站文档的拷贝。其次,由于我在看此书之前,已经看过了Atlas的文档,并且使用了一段不算短的时间,因此我深深觉得,Atlas并不是一个“大书特书”的东西。这并不是说Atlas不好,事实上,我觉得它应该可以算是Best Ajax Solution for ASP.NET 2.0,而且,它继承并超越了一个Ajax框架本身,是一个包含Ajax的Javascript框架。我只是觉得,就Atlas本身来说,它是个相当易于接受的东西。我始终觉得,如果要对于这样的技术写书的话,应该更着重于应用该技术的层次,而不是讲解该技术本身。如果的确想着眼于技术层面,那么可以讲一下如何对原有内容进行扩展。最后,就是版本的问题。Ajax本身还只是处于CTP的阶段,很多东西都在进一步的补充和修改。
     
      诚然,要写好这样一本书很困难,再加上众口难调,即使满足了我的口味,可能也难以让别人满意,甚至反而让别人敬而远之。
     
    P.S.
     
      本书目前已经由Dflying兄翻译并即将出版。另外他目前正在努力写一本原创的Atlas书籍,拭目以待。
    August 29

    Windows Live的产品越来越稳定,越来越快速了

    换上了Windows Live Mail Dogfood。
     
    界面更加美观,愈发迅速,愈发方便了……
     
    Windows Live Spaces经过了大半个月的运行,一切也趋于稳定。
    August 24

    Book List Gadget for Windows Live Spaces - Usage Instruction

    Figure 1
     
    Picture 1
    Figure 2
     
    Figure 3
     
    Figure 4
     
    Figure 5
    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 'jeffreyzhao1985' as my space name). 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 Instruction
     
        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. My E-mail address is jeffreyzhao1985@hotmail.com. 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
     
     
    August 21

    Book List Gadget Internal Version Released!

    Check out the Internal Version!
     
     
      此版本为内部测试版,目的是在正式发布之前由更多的用户对其进行测试和评价,并于最后阶段修补出现的Bug。
     
      这个Gadget是一个图书列表,其作用是弥补Windows Live Spaces对于中国市场功能的不足。该图书列表可读取用户指定的XML并根据XML中的信息进行显示。如果用户指定的ISBN,Gadget还会从Amazon上获取书籍的详细信息,并在书籍描述一侧显示图片(注1)。
     
      如果您是中国市场用户,想在自己的Space上放置Windows Live Spaces不提供的的书籍列表;如果您是国外市场用户,想在自己的Space上显示更加优秀的书籍列表。那么这个Gadget适合您。当然,由于目前是测试的版本,因此只有您自己在登陆之后才能看到这个Gadget。等以后真正发布在Windows Live Gallery以后,则可以随意使用了。
     
      如果有任何疑问,意见和建议,请留言或者通过E-mail联系我
     
      另外,本人最近正在寻找合适的ASP.NET+Sql Server Express空间,如果有建议的话也请告诉我。
     
     
    使用方式:
    1、为你的Space注册一个Preference Storage(详见相关部分)
    2、打开浏览器,使用你的Windows Live ID登陆。
    3、点击这里为你的Windows Live Space添加一个Book List Gadget。
     
     
    注册Preference Storage for Windows Live Spaces(注2):
    2、填写您的Space名称及密码并确定。(注3)
     
     
    编辑模式使用说明:
    SampleSetting
    Manifest Url 每个Book List都需要一个XML文件作为一个清单,该清单提供了书目信息。
    Title 标题
    Template 显示模版。默认为"{Author}: {Title} - {Publisher}",“{Author}”、“{Title}”和“{Publisher}”会被替换为书目的作者,标题和出版商。用户可以随意选择以什么方式显示书目的信息。
    Image's Position 图片是靠左还是靠右。
    Background color 背景色,用户可以自行调节以符合自己的Space主题。
    Plain text color 普通文本颜色,用户可以自行调节以符合自己的Space主题。
    Anchor color 超级链接文字的颜色,用户可以自行调节以符合自己的Space主题。
    Separator color 书籍条目之间的分隔线颜色,用户可以自行调节以符合自己的Space主题。
     
     
    显示模式使用说明:
    Part 1、点击图片将在出现Amazon上的大图
    2、点击作者将在Amazon上进行作者搜索
    3、点击图书名称将在Amazon上察看该书的详细信息。
    4、点击出版社将在Amazon上进行出版社的搜索。
    5、点击左下角“Amazon”字样将察看Amazon上关于该书的详细信息。
    6、点击“View details”“Close details”将在Gadget内打开/关闭图书的详细信息。
     
     
    Manifest XML示例:
    <Books>
     <Book ISBN="078214134X" />
     <Book>
      <Title url="http://www.title.com">Sample Title</Title>
      <Publisher url="http://www.publisher">Sample Publisher</Publisher>
      <Author url="http://www.author1.com">Sample Author1</Author>
      <Author url="http://www.author2.com">Sample Author2</Author>
     </Book>
    </Books>
     
    1、每一个书籍条目由一个Book节点组成。
    2、最简单的书籍条目只需要提供ISBN即可,所有信息都从Amazon上获取。
    3、用户可以自定义条目显示信息及相关URL。其中Author可以有多个。
    4、如果提供了ISBN,而且书目的信息没有填写完整,那么缺少的信息将从Amazon上获取。
    5、如果提供的ISBN,则会出现书籍的图片,左下角Amazon和右下角View Detail/Close Detail的功能。
     
     
     
     
    一份完整的Book List截图:
     
     
     
    注:
    1、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.
     
    2、由于某些原因,Windows Live Spaces对于非认证的Gadget不提供SetPreference和GetPreference的功能。简单的说,就是无法为每个用户的Gadget数据自定义的数据。现在的注册只是为了Book List这个Gadget提供一个简单的存储空间。事实上这个空间性能一般,也没有做到很好的安全性,所以请不要设法通过本人Gadgets以外的方式进行访问,以保证其正常运行。
     
    3、如果您的Space为http://sample.spaces.live.com,则sample就是您的Space名称,请小心注册,您的无心之失可能就造成了别人无法正常使用。如果您的Space已经被人注册了,请及时与本人联系
     
    August 19

    最近使用ADO.NET来操作Access遇到的问题

    有种说法是Access的功能随便用用就够了,于是我也随便用了下。
     
    忽然被一个问题困扰住了,一个存储过程怎么样都执行不对,让人非常的困惑。
     
    最后发现原来是……如果使用OleDbConnection连接Access并使用OleDbCommand + OleDbParameter这样的标准ADO.NET做法,OleDbParameter的name对于传入Access本身是无关的。唯一相关的是Parameter的顺序。
     
    打个比方,一个最简单的表:
    CREATE TABLE SampleTable(StrVal1 string, StrVal2 string, StrVal3 string)
     
    使用一个最简单的存储过程INSERT_NEW_STR:
    INSERT INTO SampleTable (StrVal1, StrVal2, StrVal3) VALUE (@str1, @str2, @str3);
     
    然后是C#代码:
    using (OleDbConnection conn = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0; Data Source=DB.mdb"))
    {
      conn.Open();
      OleDbCommand cmd = new OleDbCommand("INSERT_NEW_STR", conn);
      cmd.Parameters.Add(new OleDbParameter("@str3", "str3"));
      cmd.Parameters.Add(new OleDbParameter("@str1", "str1"));
      cmd.Parameters.Add(new OleDbParameter("@str2", "str2"));
      cmd.ExecuteNonQuery();
    }
     
    猜猜看结果?
    结果是:
    StrVal1    StrVal2    StrVal3
    -----------------------------------------------
    str3      str1      str2
     
    原因就在于,每个OleDbParameter的name没有起作用,Access简单的使用参数的顺序来赋给存储过程。当时我遇到的是一个UPDATE,由于传入参数的顺序不对,WHERE Clause总是不会满足,因此总是没有起效果。作了无数次的试验,总算发现了问题。另外,Access对于参数也没有命名要求,会把与字段名无关的标识都认为是参数。也就是说,如果在一个存储过程中一个字段名有一个字母被拼错了,那么它会被作为参数,还是能正确建立这个存储过程。
     
    其实由于Accees比较早,它对于ADO.NET的很多“协议”都无法支持。另外,Access中我一直称为“存储过程”的玩意儿只是“查询”。Access不允许在一个“查询”中使用多条语句,这个已经完全无法胜任几乎所有的开发需要了。再者,由于连接Access时使用的是文件共享方式,其并发数受到了严重的限制,一般十几个连接还行,超过了30个就会有比较难以让人接受的影响了。
     
    因此Access其实已经是个“闹着玩”的玩意儿了,如果不是找不到好的托管服务商,我也不会使用Access。
    哦不,如果不是Live Spaces的Gadget无法set/getPreference,我也不会做这个玩意儿。
     
    August 14

    来想一个问题:如何才能得到尽可能高的安全性

    Scenario如下:
    1. 客户端用户使用一个ID与服务器进行交互,每个用户有个独立ID,该ID公开。
    2. 用户无口令。
    3. 客户端和服务器端的交互代码公开。
    4. 无任何加密连接措施,交互的内容为明文。
    5. 无法得到连接条件的任何信息,比如连接的对方IP等,也就是说,获得认证对方用户只有ID一个信息。
     
    很容易看出,在这个非常无理头的环境中,是不可能做到完备的用户身份验证。现在的目的就是如何尽可能做到最好的安全性。比如增加身份伪装的难度等等。
     
    举个例子:使用混淆器加大代码的破解难度。
     
    大家一起来想吧,呀呼嘿。
    July 26

    Microsoft China Web Cast

    不得不说中国的Web Cast的质量不如国外,尤其是一些100,200的普及型。
     
    以前我都会把Web Cast下载下来然后方便大家观看,但是现在发现越来越没有这必要性,原因有二。
     
    其一,信息度实在太差。比如1个小时的节目但是真正得到的信息可能只有20到30分钟的。作为一个Training性质的讲座,其节奏的紧凑应该是必然的。但是比如目前的Atlas讲座系列,气势磅礴夸夸十数讲,随便抓起一个一听则令人觉得凄惨。再挑一个还是差不多。
     
    其二,声音和演示的质量太差。如果是Live Meeting形式,在中国这样普遍网络状况不好的情况下,低质量的传输可以理解,但是既然是供人下载,何不讲质量提高?尤其是演示视频的质量。还有PPT的风格,蓝底黄字给人的感觉本身就沉默,再加上语者语气和内容都不能给人以振奋,其吸引力自然极度下降。
     
    China Web Cast的演讲者可谓人才济济,国内著名微软大牛基本上悉数上阵,但是为什么China Web Cast还那么像是游戏?其实这个东西可以说是微软的推广活动,本可不当真,但是如果其价值低到了不如自己看书,则其存在的意义似乎也只有扩大影响力了。
     
    不过一切分开看,China Web Cast上总是有优秀的系列讲座,各位如果有何推荐,不胜感激。
    July 08

    Team Foundation Server真是好东西

    在学校有项目,想尝试点新的东西,于是就使用了Team Foundation Server。
     
    不过这种东西配置等等就是出了名的繁琐,而且安装的要求也高。最保险的方法还是从裸机开始装起,一台Server上已有的组件越多,越有可能莫名其妙地违反安装要求,即使发现没有违反。
     
    不过别的,就让人不得不觉得Team System的确强劲。其实总是觉得Windows的各种组件的集成是一大优势。不光是Windows,可以说微软的产品,即使不是技术一流,但是其整体实力的确无可匹敌。
     
    继续品味Team Foundation Server中……
    June 20

    Great Windows Live

    • The portal site http://www.live.com has changed the UI several days ago and became more elegance. But the most interesting feature (is it?) to me is it reduced the bugs like memory/CPU leak (and I can finally access the site smoothly from the poor internet connection "Tie Tong"). It's not so easy to make this achievement since the site is too dynamic to be controlled, as almost all the Ajax/javascript programmer know. What I'm think about is the custom and 3th party Gadgets. It can hardly limit all the extentions in an open features in a critera of high quality.
    • The most famous product in MSN period (at least it is in China) - MSN Messenger - which has bees renamed as Live Messenger relased the final version today. It reduces the start-up time obviously and it's the best improvement, and ... the user can make a phone call via IM? I don't know what is that but I'm afraid that this feature can't be use in China.
    I can't wait to return to office.
    June 14

    居然发现了MSDN里的一个Bug

     
    内容是“How to: Use Resources to Set Property Values in Web Server Controls
     
    其中有一段话:

    To use implicit localization

    1. Make sure that you have local resource files (.resx files) that meet the following criteria:

      • They are in an App_LocalResources folder.

      • The base name matches the page name.

        For example, if you are working with the page named Default.aspx, the resource files are named Default.aspx.resx (for the default resources), Default.aspx.es.resx, Default.aspx.es-mx.resx, and so on.

      • The resources in the file use the naming convention resourcekey."property".

        For example, key name Button1."Text".

    2. In the control markup, add an implicit localization attribute.

      For example:

      <asp:Button ID="Button1" runat="server" Text="DefaultText" 
          meta:resourcekey="Button1" />
    我按照这段话的要求作,却怎么也无法从Resource中获取信息,不知何故。
    其实出错的地方就是在我已经标注出红色字体的地方。不应该是Button1."Text"而应该是Button1.Text,把引号去掉即可……
     
    哎……
     
     
    May 20

    Live.com似乎终于被解禁了

      *.live.com都能上了。
     
      又一次不得不感叹Atlas框架的神奇,让整个Live.com的UX达到了前所未有的高度。
     
      看来Windows Live不成功也难。
    May 11

    AtlasCompat.js的代码,越读越精彩

      一个月前粗略地读了一遍Atlas部分代码,颇有感悟,但是亦觉没有想象中齿颊留香的感觉。现在重读,尤其是仔细地研习了让FireFox兼容IE的代码,对于Scott Isaacs的大师风采又有了进一步认识。
     
      打算把这份代码好好地推广一下了,一定要,一定要,一定要……不过要为一份代码写注视作解释真的好难,曾经对于NUnit Framework的工作最终也以半途而废告终。
     
      绕梁三日,余音不绝。
     
      
    March 13

    Great Experience: search.live.com

        Obviously, Windows Live Search will compete with Google Search. The latter one, although I don't like this company for its hypocrisy, its search service is the greatest one in the world.
     
        Someone (sorry for my poor memory) said that the most important service and which the next generation product based on is search. So search is a delicious cake that every service provider wants to share. Google is not the first but it is the best now. And Microsoft is always doing so.
     
        I have not analyzed the details of the content it searched yet, but the user experience is really excellent. I don't know how to describe the feeling. Perhaps you can't imagine what it is like until you try Live Search.
     
        Perhaps AJAX is really important to improve the user experience and I really want to try Live Mail. I'm exhausted when I use Hotmail yesterday and try to switch between directories...and others. But it seems something strange happened to me...well...
    March 10

    MSN Spaces Upgrading

        MSN Spaces is upgrading these days and it is in an unstable state. Please swich to 'HTML' mode and copy all the code before clicking 'Publish Entry' button to ensure that your newly posted article won't miss even Spaces crashes (not so serious, just try again).  
     
        And, something interesting appeared. If you switch the language of Spaces (not your passport account), you're found that there's a line of "W" exsiting in the top of the page. I've analyze the html code but I can't find this line in the source. So confusing, ahahahahaha...
     
        If you don't know how to switch the langage, just append "&mkt=en-us" to your explorer's address line as part of the query string and press enter, or you can just click here before you access someone's space. You can also use "&mkt=zh-cn" like above to switch the language back to Simple Chinese.
     
        Well, see you.
    March 05

    Persistent Strategy (2) - Xml序列化的应用

     
      哎,续一部。看情况是不是还要续呢?脑子里还有题材呢,呵呵……
    March 04

    expo.live.com beta released to public!

    Yep, that's the project I've somewhat participated in. The MSN Classifieds (is my spelling correct?) Team including Redmond, Shanghai and United Kingdom (sorry for forgetting the city name) work together to release the great project which will certainly drive the modern process of buying, selling and some other things, as the official description of the project says. Yeah! What a great picture it is!
     
    But I've no idea about all these things of the significant meanings for the business and society. It's just like a advanced call-board. It's just a big and regular business project I've first attended, in some kinds of aspect. But actually the Shanghai Team didn't pay much in it. It seems the Redmond Team just...yep...but we should and must look on ourselves beyond how they look on us.
     
    Anyway, it's really a great project, in a programmer's perspective, I mean..eh, myself. From the code and service oreinted architecture. I've leant a lot that how great the code is and how strong the Redmond Team is. That's just the Microsoft guys, I suppose.
     
    Wow, let's 'buy, sell and swap instantly!', I fonud some guy has post some listings on it, like this titled "Hello World." http://expo.live.com/ViewListing.aspx?lId=4169
    March 03

    Live.com release a new service: Street Side!

        Hi buddy, look at this! hmmm...it seem there has't much difference between Seattle and Shanghai. I've already learn it but it's the first time I got the scene 'with my own eyes'. I can say that now, can't I?
     
     
     
    March 01

    Persistent Strategy (1) - 问题定义与实现

     
      写了好多,虽然最后有点偷工减料,嘿嘿。
     
      本来准备贴在Space上的,但是Space实在太让人遗憾了。从Word粘贴过来的代码格式非常混乱。好不容易“堪入目”了,却被告知太长,无法发布。
     
      还是cnblogs不错,的确蛮好的,特别是代码功能。这样的功能也只有才为专业而设计的blog才可以吧,它的编辑器的确非常地强大。
    January 28

    Enhause the usability of Ajax

      Ajax是个好东西,不过也有被诟病的地方。
     
      比如说它破坏了整个Application的层次关系,把View和Controller之间的关系界限打破了。其实这一点可以有比较简单的方法避免,比如让客户端和服务器端的功能进行抽象,让客户端的脚本尽可能的只对DOM进行操作。还有其实Ajax只要遵循着某些“协议”就能比较好的使用。另外就是Ajax Patterns了,可以好好看看。
     
      说起来Ajax是客户端的东东,可以和任何的Server进行交互。其原因就是使用了标准的http协议,再一次说明了协议这东西的好处。它和Server端的无关性使得它更多的是融入现有的技术而不是设法去占领和与目前的主流技术进行竞争。这足够使得Ajax能够迅速地流行开来,跟别说它的确能提供Web-base Application令人赞叹的可用性。蛮好的。Thick Client能够越来越发挥人们的想象力了,好强。
     
      不过下面想说的才是我今天思考的地方,也是标题“Enhause the usability”所在。
     
      它的另一个被诟病的地方就是它让Back键失效了。这可能会让用户的一些习惯操作产生unexpected scenario,因为Ajax的操作是不计入history的(顺便提一下在Ajax出现之前被经常使用的“部分刷新”技术:hidden iframe。后者的post/get操作虽然是针对iframe但是它技入history)。这就对UI的设计和Ajax运用有了要求。Ajax不是万能药,是起“锦上添花”作用的。我认为网站还是应该以传统的技术为主。Ajax的不刷新修改应该尽可能的小。而页面的最终效果应该让用户点击“Back”的渴望尽可能地降低。比如让切换类别的菜单明显,提供让人能够明显看到的“Back”按钮,而不是让用户更倾向于去点击浏览器上的后退。在这一点上有两个例子,个人认为差距明显。那就是Gmail复旦邮箱。前者应该许多人都用过,是个很好的例子。而后者,虽然可能不是人人都能使用,但是它就是让人有强烈的点击“后退”的想法,使用时真的很不方便。更加讽刺的是,后者没有使用类似于Ajax的技术。
     
      还有就是看到的内容无法通过记录地址来回找。这一点其实可以模仿MSN Spaces的一个做法:提供“固定链接”按钮,生成的链接所带有的Query String是由当前显示内容来产生的,目的是能够完整(或者能使主要部分保留)的重现当时内容。
     
      就我的感觉,Ajax本身不是个新技术,而且对于Ajax技术本身,更多考虑的也是它带来的非技术层面上的内容。比如Usability。