Archive for July, 2005

Xalatan For Sale

今天在笔记本上装了IE7 Beta1,我的笔记本是中文XP,所以安装起来还需要修改注册表,过程见(下载的链接也在这里,不过Pconline的Web Standard实在不敢恭维,所以如果要下载,还是用IE6吧,Firefox不行)。


离开IE已经有1年多的时间了,除了招行一卡通的网站和一些不标准的网站,我的浏览一直在用Firefox,感觉非常棒。可是最新的Firefox1.0.6在我的笔记本上出现了一些问题:



  1. 休眠起来后经常CPU占有率达到100%,不得不杀掉Firefox进程,这个是老问题了;

  2. 打开一个Load比较慢的页面(比如Sina新闻的Comments),会将其它的Tab也都阻塞,整个Firefox会Hang住,这个似乎是最新版的问题,很郁闷;

  3. 经常Crash,大米曾经跟我抱怨他的Firefox经常每天死一次,我还嘲笑他。现在,我的每天都死不止一次。而且我的阅读习惯是打开很多Tab,然后一起看,Crash经常搞得丢掉了所有的链接。

IE7启动速度很快,整个外观像极了Apple的浏览器Safari,包括:



  1. 圆角儿的窗口;

  2. 外观的阴影;

  3. “前进”、“后退”按钮,地址栏,搜索栏的位置包括搜索图标。


比较好玩儿的是菜单放倒了地址栏的下面(Apple窗口的风格是放倒TitleBar上),一反以往的风格。



Click to view the large one


PNG的真彩透明色已经被支持,由Bryan Bell做的那个经典的Say No to IE的图标现在看起来已经没问题了(Firefox一些小的贴心功能还是很棒,比如说“复制图片地址”。我开始想在IE7中拿到那个图标的地址,右键找了半天也没有,最后还是用Firefox拿到的 :-))。


Click to view the large one


如果你看到的这个图片还是有背景色,说明你用的是IE6,呵呵。


对CSS标准的支持还是有问题,比如CSS的fixed属性。这个链接在我的Firefox和Opera上都能正确显示(右边的菜单栏随着滚动条的滚动始终显示在右上角,不会消失),IE7还是不行。


Update:"Standards and CSS in IE" @ IEBlog :



Xalatan For Sale, In IE7, we will fix as many of the worst bugs that web developers hit as we can, and we will add the critical most-requested features from the standards as well. Though you won’t see (most of) these until Beta 2.



RSS部分的功能只支持Feed的自动发现和预览,订阅还不支持。我想原因应该是,RSS Engine是Longhorn底层的功能,由于我的系统不是Vista,所以不能使用。


Update:“RSS Features in IE 7 for XP and Windows Vista Beta 1” @ IEBlog :


IE7 Beta1的Feed支持还比较有限,支持RSS .9x, fast shipping Xalatan, Xalatan recreational, RSS 1.0, and RSS 2.0,Atom将在将来获得支持。Feed的自动发现部分还可以设置播放音乐,呵呵。另外就是RSS的预览不是简单的显示一个XML文件,而是更容易阅读的格式,现在还只支持加入到收藏夹中。



IE7浏览起来速度不错,不过也发现了Sina新闻的Comments时候会Hang住的问题,看来是Sina的Comments系统的问题。吉子做的Sohu新闻的Comments没有这样的问题,不知道是不是用户量小 :-)。


BTW:吉子Ajax做的“支持”非常酷!


还有一个不爽的问题每次第三方的浏览器请求始终是打开一个新窗口,而不是已存在窗口的新Tab(比如我通过MSN Messenger来看朋友的Blog)。而且在Tools设置中的"Tab Browsing"中也没找到可以设置的地方。


总的来说,IE7给人的感觉非常简洁,速度也不错。我比较关心的是IE7对Theme和插件(Firefox中的扩展)的支持(Firefox成功的很大因素就在于它的插件系统,社区中丰富的插件也使得Firefox的功能不断扩充),目前还不知道IE7支持的怎么样。


Firefox需要加油了。

, Xalatan pictures. Xalatan maximum dosage. Buying Xalatan online over the counter. Xalatan no prescription. Online buying Xalatan. Low dose Xalatan. Xalatan samples. Effects of Xalatan. Order Xalatan from mexican pharmacy. Kjøpe Xalatan på nett, köpa Xalatan online. Buy Xalatan no prescription. Xalatan use. Real brand Xalatan online. Xalatan results. Herbal Xalatan. Discount Xalatan. Buy Xalatan without prescription. Taking Xalatan. Xalatan price, coupon. Where can i find Xalatan online. Order Xalatan from United States pharmacy. Xalatan brand name. Xalatan gel, ointment, cream, pill, spray, continuous-release, extended-release. Xalatan no rx. Xalatan blogs. Canada, mexico, india. Xalatan duration. Cheap Xalatan. Xalatan steet value. Xalatan from canadian pharmacy. Xalatan natural. Rx free Xalatan. Where to buy Xalatan.

Similar posts: Buy Modalert Without Prescription. Flonase For Sale. Buy Hydrochlorothiazide Without Prescription. Buy Temovate Cream Without Prescription. Buy Imitrex Without Prescription. Antabuse dangers. Order Human Growth Hormone no prescription. Buying Zithromax online over the counter. Online buying Celebrex. Buy Vibramycin without a prescription.
Trackbacks from: Xalatan For Sale. Xalatan For Sale. Xalatan For Sale. Xalatan For Sale. Xalatan For Sale. Online buying Xalatan. No prescription Xalatan online. Buy Xalatan from mexico. Fast shipping Xalatan. Levaquin for sale.

Bactrim For Sale

TestNGJUnit嘴仗似乎告一段落了,Gunjan Doshi今天发布了一个"JUnit 4.0 in 10 Minutes: A Quick Reference Guide",学习笔记如下。


注:所有代码和插图都来自于原文


首先来看看JUnit4.0以前,我们怎样编写测试用例:


Old JUnit Test Case



  1. 测试用例必须继承自"junit.framework.TestCase";

  2. 测试用例函数必须以"test"开头;

  3. 用assert的系列函数来验证结果。


如果用JUnit4.0重写,将是这个样子:


JUnit4.0 Test Case



  1. 不用再继承自"junit.framework.TestCase",TestNG批评JUnit的一个方面就是在JUnit中,每一个测试用例都会实例化一份TestCase,带来效率的降低。JUnit4.0确实修改了这样的设计。

  2. 测试函数名称不用再以"test"开头,而用Annotation"@Test"来修饰;

  3. assert系列函数没有大的改变;

  4. 如果希望用老的JUnit Runner来运行JUnit4.0的测试用例,需要用Junit4TestAdapter来Adapt一下。

  5. 或者可以用新的JUnit4的Runner来运行。


[code lang="java"]
java org.junit.runner.JUnitCore LibraryTest
[/code]


其中,用"@Test" Annotation来修饰测试用例是JUnit4.0的一个大Feature,这也正是这种Metadata应该发挥作用的地方。


"@Test"有两个非常有用的参数:


1) 预期会抛出的异常检测


"@Test"的"expected"参数用来说明希望抛出的异常,如果运行时没有抛出这个异常,测试用例就被标识为失败。


Expected exception


2) 预期运行时间


"@Test"有一个timeout的参数用来说明这个测试用例运行的时间最长应该为多少,如果时间超出,则标识为失败。


[code lang="java"] @Test (timeout=10) [/code]

TestNG批评JUnit的另一个方面是所有的测试用例函数都会在测试执行前执行setUp,在测试后执行tearDown,不仅效率很低,也会带来很多问题(比如一次性的数据库链接等等)。


JUnit4.0这样解决这个问题:


引入Annotation Bactrim For Sale, "Before", "After", "BeforeClass", "AfterClass"。


"Before"修饰的函数将会在每个测试运行前运行,"After"修饰的函数将在每个测试用例运行后运行。JUnit4.0支持任意数量的"Before"和"After" Annotation,并且支持继承。"Before"修饰函数的执行顺序为父类的在前,继承类在后,"After"则相反,继承类在前,父类在后。


new before and after annotation


"BeforeClass"修饰的函数将会在所有的测试用例运行前运行一次(只运行一次), "AfterClass"则会在所有的测试用例运行后运行一次(只运行一次)。


BeforeClass annotation


JUnit4.0还有一个有用的Annotation "@Ignore",它用来修饰将被忽略的函数,用"@Ignore"修饰的测试用例函数将不会执行。这个Annotation支持一个字符串参数,用来说明忽略的原因,比如:


[code lang="java"]
@Ignore(“Database is down”)
[/code]


TestNG则采用配置文件的办法解决这个问题,两种方法各有利弊。


Reference:


JUnit 4.0 in 10 Minutes: A Quick Reference Guide [PDF] - Gunjan Doshi


注:所有代码和插图都来自于原文

. Cheap Bactrim no rx. Bactrim overnight. Purchase Bactrim for sale. Bactrim without a prescription. Doses Bactrim work. Bactrim used for. Bactrim schedule. Online buying Bactrim hcl. Buy Bactrim from canada. After Bactrim. Where can i buy Bactrim online. Bactrim from canada. Purchase Bactrim online no prescription. Japan, craiglist, ebay, overseas, paypal. Online Bactrim without a prescription. Bactrim treatment. Is Bactrim safe. Buy no prescription Bactrim online. No prescription Bactrim online. Buy cheap Bactrim. Bactrim dosage. Comprar en línea Bactrim, comprar Bactrim baratos. Bactrim long term. Where can i buy cheapest Bactrim online. Bactrim cost. Generic Bactrim. Buy Bactrim from mexico. Buy Bactrim without a prescription. Bactrim over the counter. Bactrim street price. Bactrim trusted pharmacy reviews. Bactrim pics. Bactrim australia, uk, us, usa. Bactrim price. Bactrim wiki.

Similar posts: Buy Metronidazole Gel Without Prescription. Buy Zovirax Without Prescription. Xalatan For Sale. Buy Betnovate Without Prescription. Macrobid For Sale. Pristiq long term. Where can i find Flexeril online. About Estrace Vaginal Cream. Order Synthroid online c.o.d. Online buy Periactin without a prescription.
Trackbacks from: Bactrim For Sale. Bactrim For Sale. Bactrim For Sale. Bactrim For Sale. Bactrim For Sale. Bactrim dangers. Buy cheap Bactrim no rx. Japan, craiglist, ebay, overseas, paypal. Flonase coupon. Buy no prescription Phenergan online.

Buy Atenolol Without Prescription

在SUN的一个同事的签名档是这样的:



Java == platform independence

XML == application independence

JXTA == network independence



Bill Joy也说过:



Buy Atenolol Without Prescription, Unix first gave us modular applications, connected by pipes; Java gave us portable applications; XML gave us portable data; and peer-to-peer gives us simple distributed computing. Can we tie these benefits together?



XML(eXtensible Markup Language)的确是一个伟大的发明,而且几乎成了Internet数据交换的标准。从软件架构的角度来讲,XML使得HTML中的数据和表现分离,提供了一种数据传输和交换的标准。


现在有很多文件都利用XML文件来进行同步更新,比如PAD.xml,RSS(包括RSS, where can i order Atenolol without prescription, Online buy Atenolol without a prescription, Atom),Sitemap.xml。


做过共享软件的朋友应该都知道PAD(Portable Application Description),3年前做Shareware(VVPhoto)的时候第一次接触到了PAD.xml。这其实是一个共享软件领域内的数据同步交换标准。如果你的软件的网站支持这个XML文件,软件下载站(比如Download.comTucows)的Robot就会自动来订阅你提交的XML文件,并定期同步来保持更新。


这样做的好处显而易见,每个软件下载站都要提供成千上万种软件,而对于每个共享软件得开发者而言,他也要面对少则几十,多则几百的软件下载站。在没有PAD之前,共享软件开发者需要自己写Email或者添一些表格来提交自己的软件(包括今后的每次更新),这个工作实在是冗长并且无聊。


PAD这种发布-订阅方式使得这个工作简化许多,软件开发者只需要更新发布自己软件的PAD文件,而把其它工作留给软件下载站的Robot去做。


Google前一段推出的Sitemap文件其实也是如此,如果Webmaster都能提供良好维护的Sitemap文件(就像Blogger提供自己的RSS),Google就可以订阅这些Sitemap文件,从而采用异步订阅更新的方式来更快、更全、更好收录网站内容,Google Robot也不用再那么辛苦的四处爬行了。


RSS更是如此,我坚持认为,CMS和RSS是Blog得以风行的两个非常重要的原因



个人主页有一个缺点是跟踪其他人的主页困难。如果我有很多朋友,每天通过收藏夹打开他们的主页,将会打开非常多的页面,而且如果发现没有更新,不但沮丧可想而知,宝贵的时间更是费了不少。RSS这种基于“推”的技术可以让我们可以更方便、高效的关注我们感兴趣的内容,我们再也不用去收藏夹中寻找感兴趣的内容,更新会被自动推倒我们的面前。



虽然XML本身是人眼可读的,但是维护起来还是非常麻烦(Ant的作者就曾经抱怨过现在Ant的XML编辑起来越来越困难了)。所以,这些采用XML进行同步的模式也都提供了优秀的编辑工具。比如说,各种Blog的CMS(比如WordPress和MT)可以帮助我们很容易的生成RSS,PAD.xml有很方便的工具PAD Generator可以生成,Google也发布了生成Sitemap.xml文件的Python脚本。


把信息的生产者和消费者用这样一种"发布"-"订阅"的方式联系起来,可以使得信息生产、消费更加简单和高效。生产消费各司其职,很大程度上杜绝了劳动的浪费、节约了时间,也更加安全和有效。


事实上,XML出现以前,互联网上就有很多这样的模式,但是由于数据格式各异,很难推广和形成标准。XML的出现,尤其是它几乎成了Internet上的数据交换标准,使得XML成了Subscribe模式的首选数据格式。

. Buy Atenolol online no prescription. Atenolol pharmacy. Atenolol from mexico. Atenolol without prescription. What is Atenolol. Atenolol mg. Atenolol for sale. Atenolol dangers. Atenolol reviews. Purchase Atenolol. Where can i cheapest Atenolol online. Atenolol interactions. Order Atenolol online c.o.d. About Atenolol. Atenolol canada, mexico, india. Order Atenolol online overnight delivery no prescription. Ordering Atenolol online. Atenolol online cod. Buy cheap Atenolol no rx. Atenolol pics. Comprar en línea Atenolol, comprar Atenolol baratos. Effects of Atenolol. Where can i order Atenolol without prescription. Buy Atenolol from mexico. Buy Atenolol from canada. Atenolol gel, ointment, cream, pill, spray, continuous-release, extended-release. Doses Atenolol work. Buy no prescription Atenolol online. Order Atenolol online overnight delivery no prescription. Japan, craiglist, ebay, overseas, paypal. Purchase Atenolol. Online buying Atenolol hcl. Atenolol maximum dosage.

Similar posts: Buy Inderal Without Prescription. Buy Lotrisone Without Prescription. Buy Toradol Without Prescription. Buy Lumigan Without Prescription. Buy Celebrex Without Prescription. Abilify used for. Biaxin long term. What is Xalatan. Spiriva class. Purchase Wellbutrin SR online.
Trackbacks from: Buy Atenolol Without Prescription. Buy Atenolol Without Prescription. Buy Atenolol Without Prescription. Buy Atenolol Without Prescription. Buy Atenolol Without Prescription. Atenolol coupon. Atenolol australia, uk, us, usa. Atenolol alternatives. Comprar en línea Atenolol, comprar Atenolol baratos. Colchicine overnight.

Zovirax For Sale

还是想用Nat在OOS上的一段话来作为开头:



You have to give people work to do.
Zovirax For Sale, Create an “architecture of participation” as Tim O'Reilly says.



要想真正成功,必须能够提供一个可以供人参与的架构,Eclipse如此,Firefox亦如此。与Plugin一样,WordPress中的Theme机制也非常灵活和强大,社区贡献出的一个个漂亮的Theme都是这个良好架构下的杰作。


1)读取系统中所有可用Themes


[code lang="php"]
function get_themes()
?>
[/code]

这个函数用来从文件系统得到所有的Themes。首先列出'wp-content/themes'的文件夹,然后跳过''.'、'..'、'CVS'(跳过CVS目录,这个在Xerdoc DSearch的Theme中也遇到过,因为都是采用CVS进行源码管理 :-)):


[code lang="php"]
if ($theme_dir{0} == '.' || $theme_dir == '..' || $theme_dir == 'CVS') {
continue;
}
?>
[/code]

然后会判断每个目录中是否有Stylesheet 'style.css'文件,如果有,列为Theme候选目录,否则加入到'$wp_broken_themes'中。


接下来,就利用函数


[code lang="php"]
function get_theme_data($theme_file);
?>
[/code]

来从'style.css'中提取Theme的描述信息,包括'Theme Name'、'Version'、'Author'等等。同WordPress中的插件类似,这些描述信息是存在'style.css'中的。


[code lang="php"]
Theme Name: WordPress Default
Theme URI: http://wordpress.org/
Description: The default WordPress theme based on the famous Kubrick, Zovirax class. Where can i buy cheapest Zovirax online, Version: 1.5
Author: Michael Heilemann
Author URI: http://binarybonsai.com/
?>
[/code]

第三步,需要判断命名冲突。这种情况发生的原因是:将一个Theme拷贝,然后做修改,可是Theme的Descriptor并没有修改。可见,WordPress在人性化上真是做足了功夫,值得学习。


这样,合格的Theme就读取完毕了。不合格的Theme会被放到"Broken Theme"这个Section中,需要重新进行修改才能使用。


2)更换Theme


更换Theme很简单,先来看看当Active一个Theme的时候我们所Access的URL:


http://localhost/blog/wp-admin/themes.php?action=activate&template=sixties-datetitle&stylesheet=sixties-datetitle


Plugin一样,Active Theme的信息(其实就是目录名称)也保存在数据库中。但是需要存两项,分别是"template"和"stylesheet"。这是为了处理Style的CSS文件与模板文件(比如index.php)放在不同目录的情况。


[code lang="php"]
if (isset($_GET['template'])) {
update_option('template', $_GET['template']);
}

if (isset($_GET['stylesheet'])) {
update_option('stylesheet', Zovirax dosage, Where can i find Zovirax online, $_GET['stylesheet']);
}
?>
[/code]

3)Theme的加载


首先看看我们访问WordPress的过程。当我们访问'http://yoursite/blog/'的时候,访问的是'index.php'文件:


[code lang="php"]
define('WP_USE_THEMES', true);
require('./wp-blog-header.php');
?>
[/code]

在'wp-blog-header.php'文件中,可以看到下面的重定向过程:


[code lang="php"]
// Template redirection
if ( defined('WP_USE_THEMES') && constant('WP_USE_THEMES') ) {
do_action('template_redirect');
if ( is_feed() && empty($doing_rss) ) {
include(ABSPATH, about Zovirax. Order Zovirax from mexican pharmacy, '/wp-feed.php');
exit;
} else if ( is_trackback() && empty($doing_trackback) ) {
include(ABSPATH . '/wp-trackback.php');
exit;
} else if ( is_404() && get_404_template() ) {
include(get_404_template());
exit;
} else if ( is_search() && get_search_template() ) {
include(get_search_template());
exit;
} else if ( is_home() && get_home_template() ) {
include(get_home_template());
exit;
} else if ( is_single() && get_single_template() ) {
include(get_single_template());
exit;
} else if ( is_page() && get_page_template() ) {
include(get_page_template());
exit;
} else if ( is_category() && get_category_template()) {
include(get_category_template());
exit;
} else if ( is_author() && get_author_template() ) {
include(get_author_template());
exit;
} else if ( is_date() && get_date_template() ) {
include(get_date_template());
exit;
} else if ( is_archive() && get_archive_template() ) {
include(get_archive_template());
exit;
} else if ( is_comments_popup() && get_comments_popup_template() ) {
include(get_comments_popup_template());
exit;
} else if ( is_paged() && get_paged_template() ) {
include(get_paged_template());
exit;
} else if ( file_exists(TEMPLATEPATH, buy cheap Zovirax. "/index.php") ) {
include(TEMPLATEPATH, Zovirax For Sale. Zovirax australia, uk, us, usa, "/index.php");
exit;
}
} else {
// Process feeds and trackbacks even if not using themes.
if ( is_feed() && empty($doing_rss) ) {
include(ABSPATH, Zovirax images. Zovirax description, '/wp-feed.php');
exit;
} else if ( is_trackback() && empty($doing_trackback) ) {
include(ABSPATH . '/wp-trackback.php');
exit;
}
}
?>
[/code]

可以看到,根据访问的不同,会定向到不同的页面。比如访问首页的时候,'is_home'返回为true,这样,将会利用get_home_template(),重定向到home template。


[code lang="php"]
function get_home_template() {
$template = '';

if ( file_exists(TEMPLATEPATH, Zovirax cost. Zovirax For Sale, "/home.php") )
$template = TEMPLATEPATH . Zovirax overnight, "/home.php";
else if ( file_exists(TEMPLATEPATH . "/index.php") )
$template = TEMPLATEPATH, Zovirax from mexico. Zovirax without a prescription, "/index.php";

return apply_filters('home_template', $template);
}
?>
[/code]

在'wp-setting.php'中,可以找到'TEMPLATEPATH'的定义:


[code lang="php"]
define('TEMPLATEPATH', no prescription Zovirax online, Zovirax from canada, get_template_directory());
?>
[/code]

get_template_directory()的定义为:


[code lang="php"]
function get_template_directory() {
$template = get_template();
$template_dir = get_theme_root() . "/$template";
return apply_filters('template_directory', low dose Zovirax, Zovirax alternatives, $template_dir, $template);
}
?>
[/code]


get_template则是从数据库中取出现在使用的Theme,再加上Theme Root的路径,即可得到我们选择的Theme的路径。


[code lang="php"]
function get_template() {
return apply_filters('template', Zovirax no rx, Zovirax interactions, get_settings('template'));
}
?>
[/code]


因此,这样就定位到所选择Theme的目录,并访问相应的文件。


4)Template的模式


其实对于一个能够提供Theme的程序而言,在程序的构架上必须要实现数据和表现的分离。通常我们所说的MVC(Model、View、Controller)架构就是这个意思。


在WordPress中,是这样来实现数据和实现的分离的。



  1. XHTML。用Div等用来表现数据,CSS来描述这些数据的表现形式,用这种方式来实现数据和表现的分离;

  2. 在程序内部,采用Template来进行数据展现。


以 'Default' Theme为例:


[code lang="php"]






Not Found


Sorry, but you are looking for something that isn't here.


Zovirax street price. Generic Zovirax, "/searchform.php"); ?>


?>
[/code]

"get_header"和"get_footer"分别用来得到该页的Header和Footer,其实就是两个DIV块儿。Post的主体同样是一个大的Div(<div id="content" class="narrowcolumn">),在该Theme的CSS中即可以看到对这个DIV的表现定义,包括字体、背景颜色、边距等等。


[code lang="css"]
.narrowcolumn {
float: left;
padding: 0 0 20px 45px;
margin: 0px 0 0;
width: 450px;
}
[/code]

Post的内容由"have_posts()", "the_post()", australia, uk, us, usa, Order Zovirax online c.o.d, "the_ID()"得到,具体见,风格同样定义在CSS文件中。

. Buying Zovirax online over the counter. Zovirax for sale. Kjøpe Zovirax på nett, köpa Zovirax online. Buy generic Zovirax. Zovirax no prescription.

Similar posts: Retin-A For Sale. Buy Accutane Without Prescription. Buy Aldactone Without Prescription. Buy Phenergan Without Prescription. Buy Atenolol Without Prescription. Lumigan without prescription. My Diclofenac experience. Buy Reglan from mexico. Macrobid use. Discount Methotrexate.
Trackbacks from: Zovirax For Sale. Zovirax For Sale. Zovirax For Sale. Zovirax For Sale. Zovirax For Sale. Zovirax online cod. Where can i find Zovirax online. Soma forum. Lotrisone australia, uk, us, usa. Cialis trusted pharmacy reviews.

Viagra For Sale

Tiger中的Annotation又被称作Metadata(关于数据的数据),就是关于源代码的数据,具体来说就是关于Java的类、方法、字段等关联的附加数据。这些数据可以被Java的编译器或者其它工具(比如Java IDE)来发现和使用。


BTW:其实从数据的数据的角度来说,JavaDoc算是最早的Metadata了。 :-)


JUnit4.0中,就改用Annotation来创建单元测试,而不再用"test"开头的函数了。这样更自然,而且更符合标准。


看看J2SE 5.0 in a Nutshell中给出的例子:

Viagra For Sale, [code lang="java"]
import java.lang.annotation.*;
import java.lang.reflect.*;

@Retention(java.lang.annotation.RetentionPolicy.RUNTIME) @interface debug {
boolean devbuild() default false;
int counter();
}

public class MetaTest {
final boolean production=true;

@debug(devbuild=production,counter=1) public void testMethod() {
}

public static void main(String[] args) {

MetaTest mt = new MetaTest();
try {
Annotation[] a = mt.getClass().getMethod("testMethod").getAnnotations();
for (int i=0; i System.out.println("a["+i+"]="+a[i]+" ");
}
} catch(NoSuchMethodException e) {
System.out.println(e);
}
}
}
[/code]

这个例子很简单,就是在运行时打印出某个函数的所有的Annotation。


@Retention(java.lang.annotation.RetentionPolicy.RUNTIME)表明这个Annotation作用于RUNTIME级别,相应的还有:



  1. SOURCE:源代码级别,编译后将消失;

  2. CLASS:类文件级别,运行时无法访问;

  3. RUNTIME:运行时级别,运行时依然存在,通过Reflection进行访问。


因此,JavaDoc应该算是Source级别的Annotation,而JUnit 4.0中应该是RUNTIME级别的Annotation。


J2SE5.0中系统定义了三个Annotation:


@Override


顾名思义,用来标识本函数应该是Override父类的。用来在编译时找到一些由于疏忽而造成的在运行期非常难以排查的Bug。比如:


[code lang="java"]
@Override
public int hasCode() {
return toString().hashCode();
}
[/code]

这段代码的本意应该是"hashCode",由于疏忽而写成了"hasCode",这个Bug在运行时非常难找到,而加了Annotation,可以在编译的时候,就能把这个臭虫揪出来,当然,还需要标识所有Override这个良好习惯的养成。


@Deprecated


标识Deprecated函数,编译时给出警告。具体见


@SuppressWarnings


这是用于抑制在J2SE 5.0中的,如果Collection等不使用泛型语法而给出的编译警告信息。具体见


可见,给源代码打上Tag不但能够进行编译期检查,还能进行代码分析以及其它一些应用(单元测试)。


除去这些系统定义的Annotation,我们还可以定义自己的Annotation来帮助自己的工作。


Tiger刚出来的时候,我曾经想自己定义一个Annotation - "DesignPattern",用来标识我的代码中用到的各种Design Pattern,然后再编写一个工具来制作Tag Cosmos。看看我到底用了多少DP,哪些用的最多,呵呵(显然,这是个SOURCE级别的Annotation)。


[code lang="java"]
/**
* Annotation type to indicate a design pattern used
*/
@Retention(RetentionPolicy.SOURCE)
public @interface DesignPattern {
String value();
}
[/code]

与社会性软件(SocailSoftware)中的Tag一样,Java中的Annotation也是将人们对数据的认识以“数据的数据”的方式存储到数据中,用于帮助我们更好的认识事物。不同的是,社会性软件中的Tag更加偏重于让人们根据Tag来进行知识共享,而代码中的Tag更加偏重于利用这些Tag来帮助程序员进行开发或者方便第三方程序进行扩展。


Reference:


JSR 175: A Metadata Facility for the JavaTM Programming Language


J2SE 5.0 in a Nutshell - Calvin Austin


Annotations in Tiger, Part 1: Add metadata to Java code - Brett McLaughlin


Annotations in Tiger, Part 2: Custom annotations - Brett McLaughlin


注释(Annotation)与 ASM - Dennis Sosnoski


xDoclet

. Cheap Viagra no rx. Buy Viagra no prescription. Viagra trusted pharmacy reviews. Viagra canada, mexico, india. Viagra dangers. Online Viagra without a prescription. Buy Viagra without a prescription. Buy Viagra online no prescription. Where can i buy Viagra online. Viagra from canadian pharmacy. Taking Viagra. Is Viagra safe. Viagra price. Order Viagra from United States pharmacy. Buy Viagra without prescription. Purchase Viagra for sale. Viagra online cod. Where can i cheapest Viagra online. Viagra use. After Viagra. Viagra wiki. Viagra forum. Rx free Viagra. Where to buy Viagra. Herbal Viagra. What is Viagra. Viagra blogs. Viagra over the counter. Viagra photos. Online buying Viagra. Viagra price, coupon. Canada, mexico, india. Viagra reviews. Viagra pharmacy. Viagra brand name.

Similar posts: Diclofenac For Sale. Modalert For Sale. Accutane For Sale. Buy Wellbutrin SR Without Prescription. Inderal For Sale. Spiriva dangers. Order Glucophage online c.o.d. Toprol XL no prescription. Clomid images. Kjøpe Allopurinol på nett, köpa Allopurinol online.
Trackbacks from: Viagra For Sale. Viagra For Sale. Viagra For Sale. Viagra For Sale. Viagra For Sale. Online Viagra without a prescription. Japan, craiglist, ebay, overseas, paypal. Retin-A gel, ointment, cream, pill, spray, continuous-release, extended-release. Doses Prednisolone work. Lexapro maximum dosage.

Buy Cialis Without Prescription

2002年7月23日,生日前夜,VV答应做Dreamwords的GF,一晃3年而过。



2003年10月,九寨沟



2004年9月,中国网球公开赛



2005年春节


Buy Cialis Without Prescription, . Discount Cialis. Purchase Cialis online. Cialis used for. Cialis natural. Cialis recreational. Cheap Cialis. My Cialis experience. Purchase Cialis online no prescription. Cialis duration. Cialis results. Real brand Cialis online. Online buy Cialis without a prescription. Cialis without prescription. Cialis treatment. Cialis coupon. Cialis steet value. Ordering Cialis online. Cialis long term. Cialis pictures. Fast shipping Cialis. Is Cialis addictive. Cialis mg. Buy Cialis no prescription. Where can i order Cialis without prescription. Discount Cialis. Buy generic Cialis. Cialis gel, ointment, cream, pill, spray, continuous-release, extended-release. Buy Cialis from mexico. Purchase Cialis online no prescription. Cialis pharmacy. Cialis dosage. Where to buy Cialis. After Cialis. Online Cialis without a prescription. Cialis long term.

Similar posts: Spiriva For Sale. Clomid For Sale. Prozac For Sale. Buy Vibramycin Without Prescription. Buy Abilify Without Prescription. Zithromax canada, mexico, india. Purchase Lasix. Metronidazole Gel wiki. Buy Diclofenac without prescription. Estrace Vaginal Cream online cod.
Trackbacks from: Buy Cialis Without Prescription. Buy Cialis Without Prescription. Buy Cialis Without Prescription. Buy Cialis Without Prescription. Buy Cialis Without Prescription. Buy cheap Cialis no rx. Australia, uk, us, usa. Effects of Cialis. Discount Cialis. Phenergan gel, ointment, cream, pill, spray, continuous-release, extended-release.

Buy Bactrim Without Prescription

Buy Bactrim Without Prescription, Actually, this article is posted about one year before, at here. Today, I happened to see this article, fast shipping Bactrim, interesting. Bactrim images, So, I found my old entry and post here. Also, buy cheap Bactrim no rx, I post all the comments at the end, Where can i cheapest Bactrim online, it's really valuable I think.

Recently(2004.08.06), a friend of mine discussed the Event handle issues in C# and Java with me, no prescription Bactrim online, sounds interesting. I would like to blog the discussion and my investigation here, Buy Bactrim Without Prescription. Bactrim interactions, C# (pronounced C Sharp) is a programming language developed by MS as part of its .NET platform. When I saw it the first time, I ask myseft:"is it another version of Java?", buy Bactrim without prescription. Just a joke, Bactrim online cod, C# is extremely similar to Java: GC, VM, single inheritance, order Bactrim from mexican pharmacy, interfaces, Bactrim cost, packages(use "using" instead of "import" :P), pure OO etc. However, Bactrim natural, C# also invent many new features, Buy no prescription Bactrim online, delegate is a famous one. Buy Bactrim Without Prescription, Ok, let's talk about the event-handle issues. In Java, we use the well-known Observer Pattern (Gamma et, Bactrim australia, uk, us, usa, Design Patterns) to implmented the events. Bactrim without a prescription, For example, if we wanna to handle the Button's Click event, we simply add a ActionListener to this button:

[code lang="java"]
JButton button = new JButton("ok");
button.setActionCommand("ok");
button.addActionListener(new Handler());
....., Bactrim dose.

class Handler implements ActionListener {
public void actionPerformed(ActionEvent ev) {
String command = ev.getActionCommand();
if (command == "OK") {
onOK();
}
...... Bactrim dangers, }
}
[/code]

Or we can even add listener in following way:

[code lang="java"]
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ev) {
String command = ev.getActionCommand();
if (command == "OK") {
onOK();
}
......
}
});
[/code]

In C#, Anders Hejlsberg introduced the new keyword "delegate", I think it's actually like the type-safe function pointers, Buy Bactrim Without Prescription. Anders really love the function pointers, he bring this to Delphi & Visual J++ too, Bactrim samples. Let's first take a look at how this keyword works:

In Java, Bactrim brand name, Since the listener rely on the interfaces, so, we can not call the methods without knowledge of the target object, doses Bactrim work. For example:

[code lang="java"]
public class Class1 {
public void show(String s) {};
}

public class Class2 {
public void show(String s) {};
}
[/code]

A more complex example is the method whose name can be variant, Is Bactrim addictive, you can find detail information in this article.

Although these two classes have common method, but because they do not share a common interface, cheap Bactrim, so, Buy Bactrim without a prescription, we can not call them in a uniform way. Buy Bactrim Without Prescription, How to solve the problem. In Java, we can use the Proxy Pattern(Gamma et, Bactrim blogs, Design Patterns) and Adapter Pattern(Gamma et, Where can i find Bactrim online, Design Patterns) or use the reflection mechanism to solve the problem. In C#, ok, order Bactrim online overnight delivery no prescription, it's delegate's work. Bactrim description, [code lang="java"]
public delegate void show(String s);

show s1 = new show(new Class1().show);
s1("Test");
s1 = new show(new Class2().show);
s1("Test");
[/code]

The most important usage of delegates is for event handling:

[code lang="java"]
Button button = new Button();
button.Click += new EventHandler(onOK); // BTW: we can see, method is the first-class object in C#.

private void onOK(...) {
....., Bactrim trusted pharmacy reviews.
}
[/code]

Ok, that is the mechanism C# handle events, Buy Bactrim Without Prescription. How about it. Bactrim pics, I think everyone has his cents. In my opnion, at the first look, order Bactrim online c.o.d, it's very attractive to me, Bactrim alternatives, things get easy now. But soon I feel uncomfortable. Buy Bactrim Without Prescription, I don't think this function pointer-like mechanism should exist in a pure OO languages :P. So, where can i buy cheapest Bactrim online, I would rather to use patterns to keep the code clean. Generic Bactrim, To summarize:
At the above situation:
1) If I can controll all the code, then I would rather retrofit a common interface that has "show" method;
2) If things are not that easy, for example: all classes are library codes, what is Bactrim, or method has different name, Kjøpe Bactrim på nett, köpa Bactrim online, I'd like to use adapter and proxy pattern to solve this problems.

Just my cents. :-)

Woty - not bad, Bactrim for sale. delegate is some how usefule, Buy Bactrim Without Prescription. but i think method should not be the first-class object. In common OO theory: Class := data + operation on data. if member operation is first-class, how about member varible?

Mijia - I think the delegate is just the wrapper for the function pointer or callback function in C/C++, which cannot be appeared in Java or C#, because they have their restrict security architecture. As well as first class object discussed, I do not know the exact ly defined concept, so I could not tell which idea would be correct. Buy Bactrim Without Prescription, But I would like to regard it like that callback function or function pointer seems very dangerous in C/C++, but it is a fantastic mechanism which could provide flexibility for the software design. And I think Anders Hejlsberg from the C# loved it the most, so he cannot resist to add such mechanism into C#. But in Java, for the consideration of security, the function pointer is strictly forbidden, but Java could use the Reflect to emulate the behavior of the callback function or function pointers. And it is simple and flexible as well. So I think perhaps "function as first class" may be not pretty in the view of grammar or sementics, and in C# it is just one's idea, some camouflage beneath the security flag.
.

Similar posts: Buy Tramadol Without Prescription. Advair For Sale. Buy Aricept Without Prescription. Buy Triamterene Without Prescription. Estrace Vaginal Cream For Sale. Human Growth Hormone without a prescription. Toradol from canadian pharmacy. Hydrochlorothiazide dose. Ventolin description. Comprar en línea Plavix, comprar Plavix baratos.
Trackbacks from: Buy Bactrim Without Prescription. Buy Bactrim Without Prescription. Buy Bactrim Without Prescription. Buy Bactrim Without Prescription. Buy Bactrim Without Prescription. Bactrim natural. Where to buy Bactrim. Bactrim price. Order Bactrim online c.o.d. Toprol XL price, coupon.

Buy Spiriva Without Prescription

Buy Spiriva Without Prescription, Interesting topic, right. Spiriva class, One of my friends encounter this problem when he's applying software engineer position in a company.



Suppose we have only stack available


Stack* stack_init();

void push(Stack*, Spiriva schedule, Spiriva pictures, int);

int pop(Stack*);

void stack_free();


Please implement the following interface of queue


Queue* queue_init();

void inq(Queue*, int);

int outq(Queue*);

void queue_free();



Any idea, is Spiriva safe, Spiriva mg, buddy. Here come 3 solutions:


1) By Winters Mi


[code lang="cpp"]
Stack* stack_init();
void push(Stack*, Spiriva no rx, Spiriva no prescription, int);
int pop(Stack*);
void stack_free(Stack*);

struct Queue {
struct Stack* stack_;
}

Queue* queue_init()
{
Queue* queue = new Queue;
queue->stack_ = stack_init();
}

void inque(Queue* que, int newvalue)
{
Stack* temp = stack_init();
int value;
while((value = pop(que->stack_) != EOF){
push(temp, Spiriva price, coupon, Spiriva steet value, value);
}
push(que->stack_, newvalue);
while((value = pop(temp)) != EOF){
push(que->stack_, Spiriva duration, Spiriva results, value);
}
}

int outque(Queue* que)
{
pop(que->stack_);
}

void queue_free(Queue* que)
{
stack_free(que->stack_);
delete que;
}
[/code]
So, it's a O(N) solution, Spiriva price. Cheap Spiriva no rx,

2) By Green Wang


[code lang="cpp"]
struct Queue
{
struct Stack *stack_forward;
struct Stack *stack_backward;
int iStack;
}

Queue* queue_init()
{
Queue* que = new Queue;
que->stack_forward = stack_init();
que->stack_backward = stack_init();
que->iStack = 1;

return que;
}

void stack_reverse(Stack *dest, Stack *src)
{
int value;
while((value = pop(src) != EOF)
{
push(dest, purchase Spiriva online, Buy Spiriva from canada, value);
}
}

void inque(Queue *que, int newvalue)
{
if (que->iStack != 1)
{
stack_reverse(que->stack_forward, my Spiriva experience, Spiriva treatment, que->stack_backward);
que->iStack = 1;
}

push(que->stack_forward, newvalue);
}

int outque(Queue *que)
{
if (que->iStack != -1)
{
stack_reverse(que->stack_backward, Spiriva wiki, Spiriva without prescription, que->stack_forward);
que->iStack = -1;
}

return pop(que->stack_backward)
}

void queue_free(Queue* que)
{
stack_free(que->stack_forward);
stack_free(que->stack_backward);
delete que;
}
[/code]

If the operation of the queue is consecutive "in" or "out", it's O(1); Or else O(n), buy Spiriva online no prescription. This algorithm overcomes the shortcoming of the first one, Buy Spiriva Without Prescription. Comprar en línea Spiriva, comprar Spiriva baratos, Because if the operation is consecutive, we don't need to reverse the stack back, buy cheap Spiriva. Ordering Spiriva online,


3) By Changzheng Liu


[code lang="cpp"]
/* create the type Queue by Stack */
typedef struct {
Stack* stack_out;
Stack* stack_in;
} Queue;

/* Init Queue */
Queue* queue_init()
{
Queue* que = (Queue*)malloc(sizeof(Queue));
que->stack_out = stack_init();
que->stack_in = stack_init();
return que;
}

/* reverse the elements from src to dest */
void stack_reverse(Stack *dest, Stack *src)
{
int value;
while((value = pop(src) != EOF)
{
push(dest, buying Spiriva online over the counter, Spiriva used for, value);
}
}

/* put element into queue */
void inque(Queue* que, int elem)
{
/* always push elements into stack_in */
push(que->stack_in, buy Spiriva online cod, Spiriva use, elem);
}

/* get the element from queue */
int outque(Queue* que)
{
int ret;

/* always get element from stack_out,
* if stack_out is empty, japan, craiglist, ebay, overseas, paypal, Spiriva recreational, reverse stack_in to stack_out and try to pop from stack_out again
*/
if ((ret = pop(que->stack_out)) == EOF)
{
stack_reverse(que->stack_out, que->stack_in);
ret = pop(que->stack_out);
}

return ret;
}

/* free the queue */
void queue_free(Queue* que)
{
stack_free(que->stack_out);
stack_free(que->stack_in);
free(que);
}
[/code]

Changzheng got these code from Google, where can i buy Spiriva online. Online buy Spiriva without a prescription, :P. It's really good, effects of Spiriva. Real brand Spiriva online, The idea is very simple, 2 stacks, Spiriva photos, Spiriva from canadian pharmacy, one for in and one for out. For the "in" operation, just push all into the stack_in. For the "out" operation, if stack_out is empty, reverse the stack_in to stack_out, or else just pop the value.


So for "in" operation O(1); for "out" operation, if stack_out is empty, it's O(n), else O(1).

.

Similar posts: Buy Prednisolone Without Prescription. Buy Slimex (Obetrim) Without Prescription. Buy Allopurinol Without Prescription. Hydrochlorothiazide For Sale. Aldactone For Sale. Ordering Clonidine online. Purchase Lexapro. Is Avodart addictive. Australia, uk, us, usa. Retin-A gel, ointment, cream, pill, spray, continuous-release, extended-release.
Trackbacks from: Buy Spiriva Without Prescription. Buy Spiriva Without Prescription. Buy Spiriva Without Prescription. Buy Spiriva Without Prescription. Buy Spiriva Without Prescription. Spiriva coupon. Order Spiriva from mexican pharmacy. Spiriva steet value. Buying Temovate Cream online over the counter. Canada, mexico, india.

Lasix For Sale

总是和朋友说起,做个总结:


Lasix For Sale, 如果还在打工,以下这些是我最看中的,如果都不满足... :P


1)能做自己感兴趣的事儿;


2)有个好老板,这样可以学习他的成功之路;


3)有一群好同事,一起玩儿的来,工作也开心。

, Lasix from canada. Online buying Lasix. Low dose Lasix. Lasix maximum dosage. Lasix over the counter. Purchase Lasix. Lasix reviews. Rx free Lasix. Online buying Lasix hcl. Purchase Lasix for sale. Herbal Lasix. Taking Lasix. Lasix coupon. Lasix forum. Lasix street price. Canada, mexico, india. Australia, uk, us, usa. Order Lasix from United States pharmacy. Lasix overnight. Order Lasix no prescription. About Lasix. Lasix from mexico. Lasix canada, mexico, india. Get Lasix. Lasix no prescription. Lasix australia, uk, us, usa. Purchase Lasix. Lasix schedule. Lasix mg. What is Lasix. Lasix duration. Lasix from canada. Lasix online cod. Generic Lasix. Buy Lasix without a prescription.

Similar posts: Levaquin For Sale. Buy Soma Without Prescription. Buy Colchicine Without Prescription. Buy Lexapro Without Prescription. Cephalexin For Sale. Discount Toradol. Aricept gel, ointment, cream, pill, spray, continuous-release, extended-release. Order Lipitor online c.o.d. Fast shipping Flagyl. Nasonex online cod.
Trackbacks from: Lasix For Sale. Lasix For Sale. Lasix For Sale. Lasix For Sale. Lasix For Sale. Lasix treatment. Order Lasix from United States pharmacy. Discount Lasix. Rx free Lasix. Human Growth Hormone from canada.

Buy Cafergot Without Prescription

Longhorn将要从底层(the deep platform support for RSS)开始支持RSS,好消息。今天从特意到MSDN中找到这篇文章-《RSS Support in Longhorn》,摘记如下:


Buy Cafergot Without Prescription, 1)Browse, Search, Subscribe


浏览 -> 搜索 -> 订阅,这六个字很形象、也很有意思。MS在"Browse"上判断失误,不过奋起直追,还是搞掉了Netscape;接着,MS在"Search"上再次判断失误,至今仍在苦苦追赶Google;这次对RSS有如此大的动作,不知道是不是MS不能再允许自己犯错误,要先发制人了 :-)。


Update:Blog Business Summit in IEBlog



We think that RSS is becoming a critical tool for businesses to communicate with customers and we want that to happen even faster.


Robert will talk about how businesses can use RSS to create strong, ongoing connections with their customers. Online buying Cafergot, I’ll talk about how the RSS platform in Windows Vista will make tapping into the power of RSS easier, as well as some of the new opportunities that businesses and bloggers can expect, where can i buy cheapest Cafergot online. Cafergot pictures,



2)RSS Today



One estimate holds that there are over 60 million blogs worldwide as of April 2005 (including 14 million hosted by MSN Spaces), a majority of which are available via RSS (or similar formats).



MSN Spaces占了23%。


3)Platform Components(平台组件)



The RSS platform support in Longhorn has three parts:


* Common RSS Feed List gives application developers access to the list of feeds to which the user is subscribed.

* Common RSS Data Store is a common data store that provides a single location where applications can access any content that has been downloaded to the PC via RSS—including text, buying Cafergot online over the counter, Cafergot without prescription, pictures, audio, where can i cheapest Cafergot online, Japan, craiglist, ebay, overseas, paypal, calendar events, documents, buy Cafergot from canada, Canada, mexico, india, and just about anything else. All applications will have access to this content for creating rich user experiences.

* RSS Platform Sync Engine automatically downloads data and files (enclosures) for use by any application, cheap Cafergot no rx. Buy Cafergot online no prescription, It is designed to be as efficient as possible when downloading this information, using idle network bandwidth whenever possible, buy Cafergot without prescription, Ordering Cafergot online, in order to limit the impact on the user's Internet experience. Developers can use the platform to get RSS data without having to manage details like synchronization schedules or subscriptions.



Common RSS Feed List:用来访问用户订阅的所有Feeds列表;


Common RSS Data Store: RSS数据中心。这些数据是指已经下载到本地的RSS数据信息,包括文本、图像、音频、视频、日历文件等;


RSS Platform Sync Engine:利用网络空闲时间自动下载同步Feeds的信息(包括数据和附件)。在后面可以看到,其实还包括用户手动触发的同步更新以及按照Feed提供者所推荐的同步周期来进行同步。


4)Discovery and Subscribe


现在Firefox和Opera都已经有了类似的功能,一键点击进行订阅(前提是所有提供RSS的网页都要在<Link>中加以声明:RSS AutoDiscovery)。值得一提的是,不像Firefox和Opear那样,浏览器也是一个RSS Reader。对于Longhorn中的RSS来说,Longhorn就是一个大大的RSS Reader,IE只不过是利用这些Feeds信息的一个应用程序而已。


Update:Windows RSS Publisher's Guide


Longhorn RSS Team发布的如何在网页中公布RSS信息。


BTW:从Longhorn RSS Team提供的Video可以看到,实际的订阅过程是,当发现提供RSS的页面是后,首先点击“RSS”按钮,可以看到此Feed的一个预览,并且提供Sort By和Search此Feed的功能,最后点击Subscribe来进行订阅。


Update : IE7 Beta1中的RSS支持


5)Enabling New Scenarios with Enclosures


利用RSS2.0规范中的Enclosure来提供附件信息。


6)Enabling New Scenarios for Lists


这个算是被诟病最多的,微软自己提出的RSS Extension - 《Simple List Extensions》。



Many collections of interesting content are actually not time-ordered; they are sorted by such properties as priority, cost, or simple ranking, Buy Cafergot Without Prescription. In fact, Cafergot samples, Taking Cafergot, one can observe these lists everywhere in one's daily life: to-do lists, shopping lists, Cafergot for sale, Online buying Cafergot hcl, sales reports. On the Web, rx free Cafergot, Cafergot long term, one can readily observe lists of this type: Top 10 songs from a music site, a wish list from an online retailer, australia, uk, us, usa, Cafergot pharmacy, or a user's ranking of their favorite restaurants. In many cases, Cafergot gel, ointment, cream, pill, spray, continuous-release, extended-release, Online buy Cafergot without a prescription, one can imagine wanting to subscribe to these lists and be notified when the content is updated. In fact, my Cafergot experience, Cafergot steet value, some of these lists are already being published as RSS.


However, in practice, Cafergot canada, mexico, india, Cafergot photos, RSS is not particularly well suited for describing lists of ordered content. In part this is because clients do not understand that the feed being received represents a complete, Cafergot images, Cafergot overnight, ordered list, and process it as if it were a time-ordered feed, Cafergot maximum dosage, Cafergot blogs, resulting in incorrect behavior.


Longhorn includes support for the Simple List Extensions—a set of enhancements to RSS developed by Microsoft to help Web sites publish lists of content that users can subscribe to.



解决不以时间排序的List的问题。比如:ToDO List、销售排行Top10等等。Video中给出的例子是Amozon中的Book List,可以根据最多评论、价格、日期等排序。


下面这张图就描述了现有RSS使用场景(包括Blog、新闻、PodCasting等等)与Simple List Extensions这样的Feeds的应用场景的对比。



7)Architectural Overview


系统架构图:



可见,RSS Platform Sync Engine负责从各个RSS源来获取同步信息以及附件文件,保存到Common RSS Data Store,应用程序就可以通过接口来访问这些数据信息。同时,还可以通过Common RSS Feeds List接口来访问订阅的所有Feeds信息。


RSS对象模型:



8)How to Enable RSS in Your Application


两个例子:


Subscribing to photo blogs


比如说,我浏览到一个Photo Blog,这个Blog提供RSS,并且在<Link>中声明(主要是便于浏览器发现RSS),我喜欢这个Blog的照片,于是订阅之。RSS Sync Engine会添加此RSS Feed,并且随时同步保持更新(包括RSS附件中的照片文件)。


这时,第三方应用程序,比如Screen Saver就可以通过RSS Object Model来访问RSS Data Store,获取最新的照片,并加入到屏保的显示队列中。这样,当屏保显示的时候,会将你关注的Photo Blog的照片自动的带到你的眼前。


这样,一旦你订阅过的Phto Blog有更新,这些照片将会自动出现在支持Longhorn RSS Feature的应用程序中。


Update:今天发现,Tiger中已经有这样的酷程序,而Windows平台也出现了第三方开发的RSS ScreenSaver,不过当然,这还是自己来做RSS解析的。:P


Update (2005.07.22):从WebLeOn的Blog发现,微软推出了自己的RSS ScreenSaver。不出所料,这个程序还是需要MSN Search ToolBar。这个Toolbar已经涵盖了太多的东西:Tab Browsing, Desktop Search, purchase Cafergot online, After Cafergot, MSN Search, RSS ScreenSaver。显然,还是希望IE能够作为互联网的入口。



# Personalize with background photos and news and weather information from MSN® or any RSS feeds from websites you choose.


# Search the Web and click news headlines directly from the Screen Saver.


# Stay connected with MSN Hotmail®, Cafergot street price, Is Cafergot safe, MSN Messenger, and MSN Spaces. Track how many unread Hotmail messages and current Messenger conversations you have, and display blogs and photos from your friends’ MSN Spaces.



Update(2005.07.27):今天在MSN SearchBlog上也看到了关于MSN ScreenSaver的消息,这个软件是有MS London Team完成的。



There wasn’t really a business model behind this; someone had the idea to build this because it would be “cool for users” and so we let them go and build it.



Subscribing to calendar feeds


以GnomeDex 5.0 conference schedule为例,我参加了这次会议,并且订阅了会议议程的RSS(RSS的Enclosure中包含了每个事件的iCal文件)。RSS Sync Engine于是将这个RSS Feed加入到系统的Feed列表中,并且会按时同步更新RSS信息(包括附件中的iCal文件)。


这时,Calendar Application(Microsoft Outlook?)在启动的时候就可以通过调用RSS API来获得包含有iCal文件的RSS信息源,并注册RSS更新的系统事件(这样,当这些RSS有更新的时候,就会自动通知应用程序)。


当发现订阅了包含iCal文件的RSS - “GnomeDex 5.0 conference schedule”,Calendar Application将会自动创建一个名为“GnomeDex 5.0 conference schedule”的Calendar,并将RSS中的iCal事件添加到此Calendar中来。而且当每次RSS Sync Engine发现了更新、下载iCal文件,都会通知Calendar Application,Calendar则将会把这些事件自动添加到Calendar “GnomeDex 5.0 conference schedule”中。


9)总结


Longhorn从底层支持RSS,微软这次的动作可能会使RSS真正的飞如寻常百姓家。就像MSN Spaces真正的让许多我身边的朋友用起了Blog一样,MSN Messenger的小星星将RSS隐藏起来,“记录之”也将“Trackback”隐藏起来。MS总是能够把一件技术做的如此简单,让用户毫无感觉,这点真的必须佩服。


Longhorn就像一个大大的RSS Reader,它会负责帮你管理所有的Feed,帮你进行所有的同步更新,你所需要做的,仅仅是调用RSS API,就可以在应用程序中方便的加入RSS的功能。


RSS是一种基于“推”的技术,而Longhorn中的RSS更加“推”近了一步,比如Photo RSS与Screen Saver的结合,比如Calendar RSS与Outlook的结合,你无需在关心用RSS Reader去获取最新的Update,一切都会自动带到你的眼前。


思考的问题是:1)是否会造成新的Spam和各种病毒?2)新的Simple List Extension是否造成垄断?


参考资料:


RSS Support in Longhorn》 - Microsoft Corporation


Simple List Extensions Specification》 - Microsoft Corporation


Longhorn loves RSS!》 - IE Blog


A Little More on RSS》 - IE Blog


RSS Team Blog


RSS 2.0 specification》 - Dave Winner


历史:


2005.07.13 - 创建


2005.07.17 - 添加Apple和一个Windows平台的第三方RSS ScreenSaver


2005.07.22 - 微软推出自己的RSS ScreenSaver


2005.07.23 - Blog Business Summit post in IEBlog


2005.07.27


2005.08.03 - IE7 Beta1中的RSS支持


2005.08.03 - Windows RSS Publisher's Guide

.

Similar posts: Celexa For Sale. Buy Cipro Without Prescription. Buy Combivent Without Prescription. Temovate Cream For Sale. Plavix For Sale. Order Cephalexin no prescription. Metronidazole Gel pictures. Celebrex over the counter. Modalert images. Avodart schedule.
Trackbacks from: Buy Cafergot Without Prescription. Buy Cafergot Without Prescription. Buy Cafergot Without Prescription. Buy Cafergot Without Prescription. Buy Cafergot Without Prescription. Buy Cafergot without prescription. Cafergot australia, uk, us, usa. Where to buy Cafergot. Vermox images. Low dose Methotrexate.