Category Archives: Java2Script News

Java2Script 1.0.0 M4 Released

After some delay, Java2Script 1.0.0 M4 now released.

New and Noteworthy
==================
Java2Script Core
—————-
1. Support org.eclipse.swt.widgets.Dialog#open in compiler level
2. Extension point for external script visitor, see
http://j2s.sourceforge.net/articles/tutorial-extended-compiler.html
3. Bug-fix of M3 compiler
Java2Script SWT
—————
1. CoolBar, ToolBar, Menu, ColorDialog, FontDialog, Tree, Table, Combo,
and other widgets improvement
2. Support org.eclipse.swt.widgets.Dialog#open in asynchronous mode.
Java2Script AJAX
—————-
1. Simple RPC. See
http://j2s.sourceforge.net/blog/2006/10/12/java2script-introduces-sim…
2. Update HttpRequest according to working draft of
http://www.w3.org/TR/XMLHttpRequest/
Java2Script Developer Team
————————–
1. Welcome our new developer – Sal Ferro, who joined Java2Script in
October, 2006.
2. Google Group http://groups.google.com/group/java2script/ created.
Joined us!
********
Next Release would be 1.0.0 RC with improved performance in late
December, 2006.
Stay tuned.

Update:
As a matter of mistake, I placed 1.0.0 M3’s “j2slib” into Java2Script
1.0.0 M4 for Eclipse 3.2 (Eclipse 3.1 was not affected). I just
repacked and released 1.0.0 M4. If anyone happened to download and
install M4 with M3’s “j2slib”, please re-download and re-install M4:
http://prdownloads.sourceforge.net/j2s/j2s-1.0.0-m4-repack-eclipse-3.2.zip?download

Posted in AJAX, Java2Script News | 3 Comments

Extending Java2Script Compiler

Now, the java 2 javascript compiler of the java2script can be extended. There is a tutorial for demonstrating the extension mechanism.
This extension mechanism can be used to override default behavior of java2script compiler. So, why do we need to override the default behavior of the java2script compiler? Let’s have a simple example. Suppose an application that uses a library that can not be converted to java script, an ejb invocation:

EJBX x = EJBUtil.newInstance(EJBX.class, jndiName);

x.methodA();

Now if we use the default java2script compiler the code would be something like:

var x = foo.bar.EJBUtil.newInstance(….);

x.methodA();

But, we now that this will not work. It seems to be unsolvable before the extension mechanism is introduced. But now the java2script compiler can be extended to convert such these codes to another java script code that does work on a browser and also does not use the library.
Now if we extend the java2script compiler we can generate a stub invocation like this, that sould work without any ejb import or invocation:

ServletFacade.runEJBMethod(“foo.bar.EJBX”, “methodA”, jndiName);
//And the ServletFacade could be an stub for calling a servlet that can run EJBs

So, with this mechanism, one can convert any source code in his own way.

Posted in AJAX, Java2Script News, JavaScript | Leave a comment

ColorDialog and FontDialog

Now comes JavaScript version of SWT ColorDialog and FontDialog:

J2S SWT Color Dialog

J2S SWT Font Dialog

Posted in Java2Script News, Screenshot, Sharing | 2 Comments

Java2Script Introduces Simple RPC

Java2Script now introduces Simple RPC, which is aiming to help Java
developers balancing and debugging *local* and *remote* procedure calls for AJAX RIAs without knowledge of serialization and deserialization.

In Simple RPC, Java client have two modes: AJAX mode and local Java Thread mode (Default mode).
Here are some simple words describing the procedure of developing AJAX RIAs with Simple RPC.

1. Java developer can debug those procedure calls in local Java Thread mode with local Java SWT client.

2. After functions implemented, they can add a Java servlet wrapper (Java2Script provided), export all things as a JAR file and deploy it to Java EE container.

3. And now switch Java client to AJAX mode (set some static variables) and test whether the deployed servlet is OK or not.

4. If not correctly deployed or bugs popup, developers can switch back to local Java
Thread mode and do their debugging again.

5. In the end, use Java2Script compiler to compiler the Java SWT client into JavaScript RIA client and test it in browser.

For more details, please check out latest codes from SVN.

Posted in AJAX, How To, Java, Java2Script News, RPC, Simple RPC | 2 Comments

Java2Script M4 Delay to November

I am sorry for saying Java2Script M4 is delayed to November.

And considering M4 will be the final milestone with features frozen and the current works has not worked out all features scheduled, M4 will be put off to early November.

BTW: Use SVN to keep update with latest Java2Script. Or join Java2Script team contributing your efforts in implementations, tests or documents.

Posted in Java2Script News | Leave a comment

Java2Script SWT Widgets Updates

The updates mainly include Combo, Spinner, Menu, ToolBar and CoolBar. For more details, please check out latest sources from SVN, or stay tuned for 1.0.0 M4 scheduled in the next month.

Posted in Java2Script News, Screenshot, SWT | Leave a comment

Java2Script 1.0.0 M3 Released!

New and Noteworthy
==================
Java2Script Core
—————-
1. No more need to enhance Eclipse JDT core jar for Java2Script compiler
2. Full support of Eclipse 3.2.0 besides Eclipse 3.1.*
3. Dynamic JavaScript loading (ClazzLoader)
4. Early Java reflection implementation.

Java2Script SWT
—————
1. Improvement of CTabFolder, Table, Combo, ProgressBar, Scale
2. Support of embedding Shell inside normal HTML page (please visit inline demo of http://j2s.sourceforge.net)
3. Early key navigation support.
4. More LAF themes

Java2Script AJAX
—————-
1. Support loading classes asynchronously both in Java and Java2Script, please visit
http://j2s.sourceforge.net/docs/net.sf.j2s.ajax/net/sf/j2s/ajax/AClass.html

Java2Script JUnit
—————–
1. Support JUnit tests both Test Case and Test Suite

More information, please visit updated homepage: http://j2s.sourceforge.net/

Posted in Java2Script News | 2 Comments

Java2Script 1.0.0 Roadmap

Road to Java2Script 1.0.0 release:

  • 1.0.0 M3 will be released at Aug 20, 2006.
    In this release, main features include

    • Full support of Eclipse 3.2.0 beside Eclipse 3.1.*
    • No more need of extra JDT core jar enhancement
    • Dynamic JavaScript loading
    • Early Java reflection implementation
    • JUnit support
    • CTabFolder, Table, Combo, Spinner, ProgressBar, Scale improved
    • Early key navigation support
    • Lazy layout improved
    • Support more look and feels
  • 1.0.0 M4 will be released at about Oct 9, 2006. In this release, all features should be locked.
    Coming features include

    • CoolBar, ToolBar, Menu, ColorDialog, FontDialog, more custom widgets improvement
    • Look and feel manager
    • Key navigation system
    • DND system improvement
    • Windows manager
    • Extension points for RPC calls (only interfaces with a very simple reference implementation)
    • Bug-fix of M3
  • There is no 1.0.0 M5 but will be 1.0.0 RC release at Nov 11, 2006
    Works to be done include

    • Dynamic JavaScript loading performance tunning
    • Packing system tunning
    • J2SClazz core packing and zipping
    • J2S SWT performance tunning
    • J2S SWT packing tunning
    • Benchmark system for Java2Script
    • More integration tunning
  • The final release of 1.0.0 will be released in later December, 2006, about one year after Java2Script is open sourced. All thing may depend on feedback of 1.0.0 RC.
    Works to be done include

    • More tutorials
    • White paper
    • Demo projects using Java2Script
    • Documents
    • Lots of XXX v.s. J2S to tell developers about advantages and disadvantages of J2S.
Posted in Java, Java2Script News, JavaScript, Sharing | Leave a comment

SWT Snippets (Reloaded)

Not all the snippets is supported!
Enjoy finding out which J2S SWT Snippets work. J2S SWT is still under developing.

Why is called “Reloaded”?
In the early stage of Java2Script project, SWT Snippets was a showcase page. And it was also a test case page. So this page is just reloaded form former page. The first time I setuped Snippets page, it cost me some time. But as Java2Script project got much improvement. Now, it’s much easier for me to setup the whole SWT Snippets page. And with more and more improvement, I am sure that it will be more convenient to integrate Java2Script application with existed HTML applications(pages).

Posted in Java2Script News, Sharing, SWT | Leave a comment

Java2Script Getting Started (for M3+)

Java2Script Getting Started (PDF)

It’s for the coming release of Java2Script 1.0.0 M3 and later release.

FAQ list is also to be created in the coming days.

Posted in How To, Java2Script News | Leave a comment