Introduction to JsJava1.0(http://www.jsjava.com)

JsJava1.0 comes to being on May 13th 2007.It's completely based on the Javascript's prototype mechanism and build most usefull data strutcture and class libraries.It references to J2SE1.4.2 and J2EE1.4 and some other opensource Java project such as apache commons.

I now introduce the main contents of JsJava1.0.

JsJava1.0 implements much of collections framwork similar to Java collections framework.It implements BitSet Hashtable Iterator List Properties Set Stack,with which we may deal well with data strutures.e.g as follows:

    var list=new List();
    list.add("a");
    list.add("b");
    list.add("c");

JsJava1.0 implements xml parser.It is the browser xml document parser which is compatible among IE Firfox and Opera.

JsJava1.0 implements some calculation of advanced mathematics,such as matrix,distribution.statistics and so on.With in-built Math object and JaJava math solution,you can resolve more math problems.

JsJava1.0 implements date format with provided pattern.e.g as follows:

    var df=new DateFormat();
    df.applayPattern("MM-dd-yyyy hh:mm:ss");
    var str=df.format(new Date());
    alert(str);

JsJava1.0 implements number format with provided pattern.e.g as follows:

    var df=new NumberFormat();
    df.applayPattern("00.000%");
    var str=df.format(0.0678567);
    alert(str);// the result is 6.786%

JsJava1.0 implements data validation,which is useful in form.It contains number validator,string validator, mail validator,url validator and so on.Futhermore it implements locale validator.For example it provides oicq validator,here oicq is chat tool popular in china.

    var urlValidator=new URLValidator();
    var flag=urlValidator.validate("http://www.jsjava.com");
    alert(flag);

JsJava1.0 implements web page animation solution.You can read the chapter 3.

JsJava1.0 implements main function of Ajax,which is popular along with web2.0.

    var req=new AjaxRequest();
    req.setRequestMethod("post");
    req.setRequestURL("ajaxresponse.jsp");
    req.setAsync(true);
    req.setMethodOnSuccess(parseXml,["John",new Date()]);
    req.setRequestHeader("Content-Type","text/html;charset=gb2312");
    req.send();