Profilo di agentzhHuman & MachineFotoBlogElenchiAltro Strumenti Guida

Blog


28 novembre

The slides for my XUL::App talk

XUL::App is a nifty Firefox extension development framework based on Perl. It has a lot of parallels with Jifty. Recently I gave a talk to our Yahoo! 4e department for XUL::App and it went very well.

Here's the slides that I used in the talk:

    http://agentzh.org/misc/slides/xulapp/xulapp.xul  (a JS-enabled Firefox 2 is required to view these slides)

If you're having problems in displaying the slides given above, please try out the PowerPoint (PPT) version below:

    http://agentzh.org/misc/slides/xulapp.ppt

or the PDF version:

    http://agentzh.org/misc/slides/xulapp.pdf

You can always get the latest source of XUL::App from the following SVN repository:

    http://svn.openfoundry.org/xulapp/trunk/

There's very little POD docs, please read README and the slides for details.

Also, SearchAll is a real-world Firefox extension that is built upon XUL::App, which can serve as a big demo for the usage of the framework:

    http://svn.openfoundry.org/searchall/trunk/

Sadly XUL::App does not run on Win32 yet. I've only tested it on Ubuntu Linux so far. If you have any problems or would love to help, please let me know ;)

Enjoy!






27 novembre

写了一篇东西到"雅虎搜索日志"

写了一篇东西到我们 Yahoo 自己的"雅虎搜索日志"网站上:

     http://ysearchblog.cn/2007/11/searchall.html

感谢咱们 content team 的何远银同学提供的初稿。毕竟发起一些东西不是我的长项,而大刀阔斧地修改现成的东西却是,呵呵。

另外还必须特别感谢一下我的编辑石杏岚小姐不厌其烦地反复修改这篇东西。在修改过 N 处之后,她终于说自己快崩溃了,呵呵。

这里顺便 spam 一下,SearchAll 的下一个版本将提供一个全新的视图,Mapping View:

   http://agentzh.org/misc/mapview.png

欢迎大家试用 Subversion 里的版本:

    http://svn.openfoundry.org/searchall/trunk/searchall.xpi

Enjoy!

-agentzh


10 novembre

SearchAll 0.3.2 发布!

经过 Yahoo! China EEEE hacking 小组近一个月的努力, SearchAll 0.3.2 版终于发布到了 AMO 官方网站

https://addons.mozilla.org/zh-TW/firefox/addon/5712

如果您已经安装了 SearchAll 的话,您的 Firefox 在启动时会自动检查更新,并按用户选择进行升级。

和上一个 AMO 公开发布版本 0.1.8 相比,SearchAll 积累了许多重大改进。其中的亮点包括:

  • 增加了对结果页中的链接进行本地测试的功能。SearchAll 现在会自动在``规格化视图''中用可爱的小图标标记出坏链,好链,和慢链。由于使用 Ajax HEAD 请求,所以测试的速度很快。我们 team 的 杨家宁 当初做 "易搜" 的时候就想到实现这样的本地链接测试的功能,但受到 AJAX 跨域请求的限制而未能实现。谢谢杨家宁提的这个 feature!

  • 增加了 "划搜"功能 。用户可以在任意的网页中选定文本,然后右击,在弹出的快捷菜单中点击"我搜去"(或者SearchAll),进行搜索。感谢李晓栓的提议!

  • 增 加了对简体中文(zh-CN),繁体中文(zh-TW), 法语(fr),和西班牙语(es-ES) 的国际化支持。如果用户使用的是简体中文版的 Firefox,那么她看到的 SearchAll 界面也将是简体中文版的。其他语言支持依此类推 :) 感谢西班牙的 Gregorio Villarrubia 的西班牙文翻译。对于非中文用户而言,第一次使用 SearchAll 时默认的三家搜索引擎是 yahoo.com , google.com , 和 ask.com . 中文用户默认的原三家网站保持不变。

  • 为大部分默认列表中的搜索引擎实现了 OpenSearch 快捷方式 ,从而使第一次查询以及切换搜索引擎时的用时减少了至少 50%. 感谢服务于 IronPort 公司 cnhackTNT 的提议!

  • 修复了多处内存泄漏问题。使用 SearchAll 的时候,Firefox 不会再占用越来越多的内存。界面响应也更迅速。感谢 Mozilla 官方网站的编辑 Archaeopteryx 的报告。

  • SearchAll 工具条上的搜索框现在支持快捷菜单方式下的"复制","剪切",和"粘贴"操作。感谢尚尔迪的报告和修复。

  • 添加了下列新的默认搜索引擎:

我们仍然在考虑如何在 SearchAll 中展现 Omni Search 的问题。既要保持 SearchAll 在结果展示上的公平公正性,又要表现 Omni Search 丰富的内容,并不是一件容易的事情 ;) 欢迎大家多提宝贵建议 :)

我最近在看有关 Adobe Flex 方面的文档,一个基于 Flash 的 SearchAll 似乎更酷一些,因为它将能运行在 IE 和 Opera 这样的浏览器中,而不仅仅是 Firefox. 当然这仅仅是一个很模糊的想法,不知是否可行。有兴趣的朋友可以与我们联系 ;)

SearchAll 是一个基于 MIT 协议的开源项目。源码仓库位于台湾的 OpenFoundry 服务器 上:http://svn.openfoundry.org/searchall/trunk/. 如果您乐意参与到项目开发中来,请立即与我们联系;我们很乐意像 Pugs 团队那样递送 Subversion 提交权限。

感谢所有一直以来关注和使用 SearchAll 的朋友们;我们一如既往地欢迎各种新功能提议,bug 报告,和评论。

谢谢!

章亦春 (agentzh)

附:根据陈敬亮的报告,来自 FoxplusAlexa Sparky 扩展 会严重影响 SearchAll tab 的切换速度,因此对于安装了该版本的 Alexa Sparky 扩展的用户,请在使用 SearchAll 的时候暂时禁用 Alexa Sparky.

03 novembre

Yak shaving

Mostly been yak-shaving over the past few weeks. No significant visible progress yet. Refactoring the JavaScript (JS) part of my SearchAll extension using the best practices of JS seen in ``professional JS code'' from others.

Got 2 releases of PCR (Pugs::Compiler::Rule) out of door to CPAN. Just want to keep my feet wet in the Pugs team. Thanks Matthew ++ for reporting the test failures of PCR 0.27 on MS Win32. They were essentially coursed by cmd.exe's shell syntax incompatibility. Fixed in the 0.28 release. I'm running VirtualBox with WinXP to test it.

Thinking a lot about web site testing and Firefox addon testing issues, also pondering the future of my XUL::App framework -- hey, it's exciting! I'd like to add support for _("blah blah") in plain .js code. Like what clkao++ is doing in Jifty:

http://lists.bestpractical.com/pipermail/jifty-devel/2007-October/001773.html

But I'll definitely reuse XUL's own .properties file and <stringbundle> mechanism to emulate it directly instead of using the costy AJAX approach taken by clkao.

laser++'s ``postgres extension'' talk given yesterday is quite interesting. Will take a closer look at postgres and hack in something analogous to Perl's Inline::C. It's already in my ``learning queue'', which is already quite long though.

Also coordinating two projects mainly contributed by my former schoolmates, sal++ and xunxin++ , i.e., the ajaxperl and jslint projects.

sal's work on the DOM test suite helpfully indicates the status of the DOM support of various CPAN modules like HTML::DOM, XML::DOM, and XML::LibXML::DOM. Ajaxperl will eventually rely on these modules anyway.

I've also taken a peek at the HtmlUnit project which essentially does what ajaxperl aims to do, except it's the darned Java.

Regarding the other project, jslint, it can be immensely helpful in applications like XUL::App. You know, I've got tired of starting the slow Firefox up just to find a silly typo in my JS code. For such situations, jslint will come to rescue when it's mature enough.

As xunxin reported, jsshell can already check the syntax of .js files with a command-line option. But unfortunately jsshell does not respect the inlined JS snippets in .xul and .html files. Spidermonkey doesn't come with a DOM lib anyway. So I'd love to see a new CPAN module named JavaScript::Lint born out of the jslint project.

Hopefully xunxin++ will make more progress in the next few weeks or so. Sadly he's got a Java $day_job ...Sigh.

Regarding my talk in the next ``hacking-hour'' meeting suggested by laser++ last afternoon, I'm currently having several interesting topics in mind: ``The best practices in SearchAll'', ``XUL::App : the Jifty way of doing XUL'', ``Reusing Perl as an DSL'' and ``Abusing jquery for AJAX''. I still tend to use XUL for my slides, but I'm not 100% happy with ingy++'s Sporx slide-making framework. Will probably tweak it to work the way I like. Yeah, another ``yak-shaving'' like job and it must be fun as well ;)