Author Archives: Zhou Renjian

Focus On Your Key Problem

Always place your most skilled developers to the key problem. No matter the developers like to dive into the problem or not. Don’t place too much expectation on those fresh developers for the key problem. Or, you will get an answer that they can’t solve the problem months later and you can’t say anything on them. And all you have to do is to delay the project. To put another skilled developer to replace the unskilled one months later may hurt a lot! But don’t hesitate to do so. Or your project is in danger.

This is a lesson learned from my current group on task of debugging. I regret that I chose other tasks rather than debugging months ago. And at that time, a fresh developer was assigned to debugging. And now we are all waiting for a more robust debugging but should never come out months later by that developer. And I have to learn all the debugging from beginning to catch up all we want.

Posted in Project Management | Comments Off on Focus On Your Key Problem

Java2Script ClassLoader’s Loading Modes

There are 3 loading modes in Java2Script ClassLoader.

  1. Loading classes by using <SCRIPT> tag asynchronously (Default mode).
  2. Loading classes by XMLHttpRequest(XHR) asynchronously.
  3. Loading classes by XHR synchronously (May freeze UI when classes are loading).

In order to switch to different loading mode, execute the following line after j2slib.z.js is loaded:

ClazzLoader.setLoadingMode (“xhr.async”); // XHR asynchronously loading

or

ClazzLoader.setLoadingMode (“xhr”); // XHR synchronously loading

or

ClazzLoader.setLoadingMode (“script”); // <SCRIPT> asynchronously loading. No synchronously loading

In asynchronously loading mode, you can specify a time lag between two *.js loading. The time lag may be useful for the browser (Internet Explorer) to update its UI changes. To set time lag as the following examples:

ClazzLoader.setLoadingMode (“xhr.async”, 5); // 5 ms lag

or

ClazzLoader.setLoadingMode (“script”, 5);

But

ClazzLoader.setLoadingMode (“xhr”, 5); // synchronously loading

makes no senses, as there are no time lag in synchronously loading mode.

For more information, please read Java2Script’s ClassLoader source.

Posted in Java2Script | Comments Off on Java2Script ClassLoader’s Loading Modes

About

Zhou Renjian, the author of this blog, is also the initial contributor of open source Java2Script project. He is from Shanghai, China. He has years of Java and JavaScript experiences. He began programming about 10 years ago, back to 1997.

Posted in Uncategorized | Comments Off on About