Dojo 1.0 Beta released

2007年10月24日,Dojo 1.0 Beta 发布。

下载地址:http://download.dojotoolkit.org/release-1.0.0beta/

原始出处:http://dojotoolkit.org/2007/10/24/dojo-1-0-beta-released

Dojo released a beta of the 1.0 toolkit, and have made it available for download.

Using revision 11006 as the tag, and [as of this writing] currently at rev 11100, the release is still under heavy last minute love. Fixes, optimizations, enhancements, etc … Perhaps the release was not formally announced because many of the core devs will be in Boston this week, at the Ajax Experience. I suspect much quality code will come from bored hotel-hacking sessions and the fact so many dojo’ers will be floating about. There a lot of nitpicky things I am looking forward to having some time to delve into before the formal 1.0 release myself.

关于JavaScript中的数组排序

最近在处理与Array排序相关的工作,找到一些资料,如下:

  1. 数据排序谁最快(javascript中的Array.prototype.sort PK 快速排序)
  2. 快速排序的JavaScript版本
  3. CSDN对于汉字排序的讨论
  4. 面向对象的 Javascript 语言特性:引用
  5. How To: Making an independant copy of a JavaScript array
  6. select列表内容按字母倒序排序与按列表倒序排列

万事俱备,准备开工。

Javascript编辑器-Spket

今天在网上看到有网友提到了一款Javascript编辑器:Spket。遂下载试用了一下,确实不错。

主页地址:http://www.spket.com

官方说明:

Spket IDE is powerful toolkit for JavaScript and XML development.

The powerful editor for JavaScript, XUL/XBL and Yahoo! Widget development. The JavaScript editor provides features like code completion, syntax highlighting and content outline that helps developers productively create efficient JavaScript code.

打开Prototype.js,从左下角的窗口可以罗列出这个文件中包含的类、函数、变量等信息。可以按出现顺序排序,也可按字母排序。

界面信息:

spket

下载地址:http://www.spket.com/download.html

安装要求:需要Java 1.4.2或更高, download form java.com

Adobe公司的轻量级的AJAX框架Spry

今天有网友提到了spry,说是Dreamweaver cs3中的一个轻量级AJAX框架,Google了一下,才知Dreamweaver cs3相当于 Dreamweaver 9。

以下是一些有用的文章:
1.Spry框架初步入门
http://www.javaeye.com/topic/37180

2.官方在线Demo
http://labs.adobe.com/technologies/spry/demos/index.html

3.Dreamweaver CS3集成Spry效果试用
http://tech.163.com/07/0423/10/3CONR1KL0009158M.html

有空体验一下。

解决javascript读取中文cookie时的乱码问题

原来的javascript函数如下:

//cookie操作函数
function Get_Cookie(name) {
var start = document.cookie.indexOf(name+”=”);
var len = start+name.length+1;
if ((!start) && (name != document.cookie.substring(0,name.length))) return null;
if (start == -1) return null;
var end = document.cookie.indexOf(“;”,len);
if (end == -1) end = document.cookie.length;
return unescape(document.cookie.substring(len,end));
}

function Set_Cookie(name,value,expires,path,domain,secure) {
expires = expires * 60*60*24*1000;
var today = new Date();
var expires_date = new Date( today.getTime() + (expires) );
var cookieString = name + “=” +escape(value) +
( (expires) ? “;expires=” + expires_date.toGMTString() : “”) +
( (path) ? “;path=” + path : “”) +
( (domain) ? “;domain=” + domain : “”) +
( (secure) ? “;secure” : “”);
document.cookie = cookieString;
}

当cookies中保存有中文信息时,会发生乱码,这样修改下就会解决问题


//cookie操作函数
function Get_Cookie(name) {
var start = document.cookie.indexOf(name+”=”);
var len = start+name.length+1;
if ((!start) && (name != document.cookie.substring(0,name.length))) return null;
if (start == -1) return null;
var end = document.cookie.indexOf(“;”,len);
if (end == -1) end = document.cookie.length;
return decodeURI(document.cookie.substring(len,end));
}

function Set_Cookie(name,value,expires,path,domain,secure) {
expires = expires * 60*60*24*1000;
var today = new Date();
var expires_date = new Date( today.getTime() + (expires) );
var cookieString = name + “=” +escape(value) +
( (expires) ? “;expires=” + expires_date.toGMTString() : “”) +
( (path) ? “;path=” + path : “”) +
( (domain) ? “;domain=” + domain : “”) +
( (secure) ? “;secure” : “”);
document.cookie = cookieString;
}

主要是把unescape改成了decodeURI。

参照:http://www.csask.com/blog/?p=26

在《JavaScript: The Definitive Guide, 4th Edition》中写到:

In client-side JavaScript, a common use of escape( ) is to encode cookie values, which have restrictions on the punctuation characters they may contain.
在客户端脚本程序中,escape( )函数可以被用作对具有不规范标点的cookie进行编码。(就像我们函数中所用到的一样)

Although the escape( ) function was standardized in the first version of ECMAScript, it has been deprecated and removed from the standard by ECMAScript v3. Implementations of ECMAScript are likely to implement this function, but they are not required to. In JavaScript 1.5 and JScript 5.5 and later, you should use encodeURI( ) and encodeURIComponent( ) instead of escape( ).
虽然escape( ) 已经在ECMAScript中被标准化,但是在ECMAScript v3中,escape( ) 被剔出,如果需要在JavaScript 1.5 和JScript 5.5以后的版本中使用这个函数,建议使用encodeURI( )和encodeURIComponent( )。

Dojo 0.9最终版发布

下载地址:
http://download.dojotoolkit.org/release-0.9.0/

Alex says it best:

After a complete re-think about the purpose and value of Dojo, and after
months of grueling ground-up work on the part of the entire Dojo team,
I’m happy, proud, and excited to announce that Dojo 0.9.0 is available and AOL is already hosting 0.9 in their CDN.

For those porting Dojo applications from previous version of the
toolkit, you can refer to the Porting Guide for help on where APIs landed in the shuffle

In may cases, you’ll need less code overall to get the same thing done
(or done better), and Bill Keese (Dijit Project Lead) has put together
a great overview of what’s new and awesome.

The quick rundown of 0.9 features:

Dijit

  • unified look and feel for all widgets
  • ambitious a11y and i18n features in every Dijit widget
  • a mature CSS-driven theme system with multiple, high-quality themes
  • huge improvements in system performance
  • data-bound widgets
  • Declarations for lightweight widget writing
  • a new page parser that allows instances of any class, not just widgets
  • no magic

Core

  • reduced API surface area (easier to remember and use)
  • dojo.query() always available, returns real arrays
  • from-scratch high-performance DnD system
  • Base (dojo.js) is 25K on the wire (gzipped)
  • dojo.data APIs finalized
  • new build system
  • new test harness for both CLI and browser use
  • dojo.behavior now marked stable and based on dojo.query
  • excellent animation APIs with Color animations in Base (always available)
  • all the features you’ve come to count on from Dojo (RPC, JSON-P, JSON, i18n, formatting utilities, etc.)

DojoX

  • high quality implementations of previously experimental features: gfx (portable 2D drawing), data wires, offline, storage, cometd, etc.
  • dojox.gfx now includes Sliverlight support
  • many more features and improvements than there’s room for here.

dojo 0.9 beta版发布

2007年7月3日,dojo发布了0.9 beta版,详情请看dojo官方介绍:Dojo 0.9 lands softly

dojo 0.4到dojo 0.9beta变化比较大,可以参考:Dojo Porting Guide: 0.4.x to 0.9

dojo 0.9beta在向更小体积,更快速度的目标发展,确实,dojo的框架不错,就是太大了。对于普通web应用的ajax框架,都是够用就好,大了反而是缺点。

新特性:
1.SPEED:
速度是关键
2.Accessibility:
3.Theming:
这个貌似不错,可以看看下面这些demo,都可以定制我们自己的样式:
a.日历
b.取色器
c.编辑器
4.Documentation:
http://dojotoolkit.org/book/dojo-book-0-9-0

下载地址:dojo 0.9 beta

jQuery1.1.3发布,速度提升800%,体积保持20K

原文出处:http://jquery.com/blog/2007/07/01/jquery-113-800-faster-still-20kb/
2007年7月1日,jQuery发布了1.1.3版本,修复了大约80多处bug,主要改进了以下方面:
1.速度改良:Dom的遍历比1.1.2版本快了大概800%;
2.重写了事件系统:对键盘事件用更优雅的方法进行了处理;
3.重写了effects系统:提高了处理速度;

jQuery 1.1.3的功能:
Massive Selector Speed Improvements
New Selectors
Animation Improvements
OM Event Listeners
Event Normalization
Multiple .is()
Browser Version
More Bug Fixes

在七月底将发布jQuery 1.1.4版本,这就是jQuery 1.1系列的最后一个版本,下一步将是发布jQuery 1.2版本,jQuery 1.2版本的路线图请点击这里