Reading Note about Pro Ajax and Java Frameworks--Post&Telecom Press

Declare: this reading note written by myself, if you transshipment,please marked the name of the author.

By the way, i found the chinese e-book from CSDN for free,however it record the previous 5 chapter, you can reference the following URL:

http://book.csdn.net/bookfiles/275/

IDE

JavaScript IDE:

1.JSEclipse ( this book recommend )

add a new remote site with http://www.interaktonline.com JSEclipse provide some internal object in javascript like Date, String, document and window. These objects are defined in object.xml  which is installed in directory JSEclipse/library

2.JavaScritp plug in NetBeans

it can be download on www.liguorien.com/jseditor

3.Compresstion and confustion of javascript

javascript can be seen in client directly. the logic of the code must be hidden. the most popular tools can cut off by 30%(the book said, i don't know).  However , if you choose conpress the javascript, you must consider that the error will be taken sometimes.

There is a validator of javascript can be download on www.jslint.com

4.Javascript compressiton of DOJO toolkit

the URL is www.dojotoolkit.org/docs/compressor_system.html

How to use this toolkit?

use this command to compress teh javsscript files:

java -jar custom_rhino.jar -c uncompress.js >compress.js

5. Inspect the stucture of DOM

 Mouseover DOM inspector www.slayeroffice.com/tools/modi/v2.0/modi_help.html.

6.Debug the Ajax request

tools like : sniffer/ethereal / netbeans http monitor

in netbeans http monitor ,there is a great function is that it can add or modify some parameter to the server.

7.Log of javascript

a.Log4JS

there are 4 class,alert ,write ,popup and console.

alert class put the message in a alert dialog

write class put the message in a new browser

poput class put the message in a single new page

console class put the message in console in sarari, while it will be put in a new dialog when is not run Sarari

Log4JS is similiar with Log4J. they both define  levels : DEBUG INFO WARN ERROR FATAL NONE

Use Log4JS:

the log4js must be included in web page. and declare the logger and errorlogger like this

assign the the level and the class type of log4js.

var logger = new Log(Log.INFO,Log.popupLogger);

var errorLogger = new Log(Log.ERROR,log.popupLogger)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值