Profilo di agentzhHuman & MachineFotoBlogElenchiAltro ![]() | Guida |
|
20 settembre SearchAll 插件的 0.0.6 版发布 :)大家好! 我的 Firefox 插件的 0.0.6 版发布。 主要的改进如下: * 在原先的 Raw View 的基础上增加了 Formatted View,即对当前比较的三家网站返回的搜索结果进行解析,以统一的格式显示出来,以方便比对,同时界面布局有了较大的改善 * 修复了 checkbox 需要点击多次才响应的 bug 您总是可以从下面这个 URL 安装最新版本的 SearchAll 插件: http://svn.openfoundry.org/searchall/trunk/searchall.xpi 非常感谢各位兄弟姐妹先前对 0.0.2 所提出的那些宝贵意见和建议 :) 欢迎大家继续批评指正,以便不断地完善这个产品 :) 谢谢! P.S. 下一阶段的 TODO: * 每次退出时保存用户对界面的主要修改,下次启动时自动予以恢复。比如默认打开的是 Raw View 还是 Formatted View, 默认比较的三家搜索引擎的 URL,checkboxes 的勾选状态,等等。 * 增加 "Next page" 和 "Previous Page" 按钮,以便于三家同时转到下一页或上一页。 * 增加第三个视图,即 Merged View,以一定规则将三家的搜索结果混合为单个结果列表。 18 settembre The SearchAll Firefox Plugin and XUL::App frameworkMy first $job project is now opensourced. It's a Firefox extension named SearchAll. SearchAll is a simple side-by-side search engine comparing tool which allows you to search at most 3 different search engines simultaneously and benchmark their performance in the status bar. With this extension, you can compare 2 search engines or 3 search engines at a time. There's a long list of default search engines that you can choose from (including search.cpan.org!). And you can also enter search engines' URLs which don't appear in the default list yourself. Currently only the sites' raw HTML pages are shown to the user. We'll add more comprehensive and more intuitive views and graphics for the search results in the near future. Please stay tuned! This project was initiated and has been regulated by the Yahoo! China ( http://cn.yahoo.com ) company and opensourced under the MIT license. One of our buzzword (for extension developers) is that there's 0 line of XUL/RDF/XML in our project's source tree. The GUI stuff is totally scripted in Perl. Thanks to Jesse Vincent's Template::Declare module on CPAN. You can always get the latest source code of this project from the following SVN repository: http://svn.openfoundry.org/searchall/ If you like to help, please let us know. We're very willing to deliver the commit bit like the Pugs team ;) The XPI file that can be installed directly into Firefox can also be found here: http://svn.openfoundry.org/searchall/trunk/searchall.xpi There's a XUL application framework named XUL::App sitting in the same repos and SearchAll is already using it. I'd expect to move XUL::App to a separate repos and rename it to a cooler name (maybe Xifty or Xufty?). Sorry for the lack of documentation. Please see README for some general ideas :) I've already submitted this extension to addons.mozilla.org and waiting for the editor's approval. Enjoy! 08 settembre A plan for XUL::AppI've been mostly working on a Firefox extension last week and I've already got a first (naive) implementation. My $boss got very happy when I offered him a link to my .xpi file. The buzzword of this extension is that there's NO xul in the source tree. Template::Declare generates all the ugly XML/XUL/RDF stuff for me, including install.rdf. Hmm, maybe this will be the first Firefox extension in the world produced by Jifty's Template::Declare module. Hooray! Also, jquery.js is a godsend for the Javascript part, it works seamlessly between XUL and HTML DOMs. This extension will soon be open sourced and the resulting .xpi file will also been uploaded to addons.mozilla.org, according to my $boss :) In the next week, I'll work on the architecture refactoring for this project. In particular, I'd love to invent a new application framework for XUL development. It'll be called XUL::App. I'm going to steal a lot of good ideas from Jifty. Here's some random thoughts: $ xulapp app --name MyExtension # create a directory tree structure rooted at ./MyExtension/ Creating new application MyExtension Creating directory lib Creating directory lib/MyExtension Writing file lib/MyExtension/App.pm Creating directory lib/ Creating directory bin Creating directory doc Creating directory t Creating directory jslib $ cd MyExtension $ xulapp view --name TreeView --out treeview.xul Writing file lib/MyExtension/View/TreeView.pm Updating file lib/MyExtension/App.pm $ xulapp debug treeview.xul # will launch a Firefox window loading treeview.xul $ xulapp bundle # will generate install.rdf, chrome.manifest, and then package related stuff into a .xpi file And lib/MyExtension/Application.pm will probably look like this (Thanks to Audrey's Object::Declare!): package MyExtension::Application; use XUL::App::Schema { xulfule 'foo.xul' => generated from { 'MyExtension::View::Foo' => { template => 'foo', arguments => [...] }, }, includes [qw( foo.js foo.cs )]; xulfile 'browser-overlay.xul' => generated from 'MyExtension::View::Overlay', overlays 'chrome://browser/content/browser.xul'; jsfile 'foo.js' => requires [qw( bar.js dom.js jquery.js )]; xpifile 'foo.xpi' => id is 'myextension@foo.bar.org ', name is 'MyExtension', version is '0.0.1', targets { Firefox => ['1.5' => '3.0a5'], Mozilla => [' 1.0' => '1.8'], }, creator is 'Agent Zhang', developers are [qw( John Mary ... )], updateURL is ' http://foo.bar.org/update'; }; Currently XUL::App is focused on FF extension development, so there will be no server-side logic in the near future. Modern Jifty apps use Template::Declare for their "view", and so will XUL::App :) Jifty also has cool concepts like "model" and "actions". Not sure how "actions" fit in the XUL world, but I can see XUL's RDF and its wrappers are good parallels to "models". Maybe XUL::App's model classes will simply emit JS and RDFS code for certain RDF schemes defined there. Unlike Jifty, XUL::App will look more like a compiler. We'll use 100% Perl (as well as a lot of JS for sure) during the development phase, but 0% Perl in the final .xpi package for deployment. So there won't be any portability issues nor any big runtime that slows things down. Yay! For the test suite part, I'd really love to see a DOM lib for SpiderMonkey or even Test::WWW::Mechanize::AJAX on CPAN soon. Testing XUL/AJAX in bare command line w/o launching any real web browser will simply rock ;) Yeah, I'm writing down crazy plans...putter++ once said on #perl6 that such things are very bad for expectation management...but anyway... Suggestions and comments will be greatly appreciated. Thank you :) 02 settembre New life in BeijingI'm currently working for Yahoo! China's EEEE department. Like Zorpia, lots of smart Perl guys are around here ;) $job is fun and I'm allowed to spend a lot of my $working time on my favorite open source projects such as Jifty and Pugs :) That's exactly what I want. I've been mostly hacking on the XUL/XML support for Template::Declare over the last few weeks. And I now have a plan to develop a HTML/XUL/XML DOM builder for SpiderMonkey.pm. After that, cool things like WWW::Mechanize::AJAX or even a full-featured browser in pure Perl will also be possible. Hmm, I think it's wise to talk to SpiderMonkey.pm's author first ;) Another project I most want to work on is a XUL-based Perl 6 regex tracer/debugger based on fglock++'s Pugs::Compiler::Rule. The basic facilities on the PCR side are almost complete, such as positional info in the regex ASTs and hooks in the emitted Perl source... With Jesse's Template::Declare and jquery.js under the belt, XUL hacking can be really enjoyable ;) Happy hacking! |
|
|