(1) The document summarizes a talk on the latest JavaScript trends in Japan. It discusses things like polyglot programming using HTML, CSS, JavaScript and Perl in a GIF image, cross-domain access protocols using GIFs, and various JavaScript frameworks and tools developed in Japan.
(2) Several Japanese JavaScript projects are highlighted, including Mylingual.net for multilingual websites, AJAJA for server-side JavaScript, and Cycal for Ajax spreadsheets.
(3) The talk also featured lightning talks on topics like implementing a Java virtual machine in JavaScript and fast XPath engines for JavaScript in Internet Explorer and Safari 2.
20. How to break same-origin-policy. (Parallelize cross-domain access) Other GIF89a hacks GIF89a Binary Image Object for AJAX communications Protocol
21. GIF89a cross-domain access protocol <img src=“null.gif?q=param" onload=“ callback (this.width)"> function callback (data) { //… do action } (1) Define JS callback function (likes JSONP) (2) New Image Object CGI OK http://example.com/webapi/null.gif?q=foobar GIF Image size!
22. GIF can return 16bit x 2 over crossdomain Server Side program (sample) #!/usr/bin/perl use strict; use warnings; sub create_gif { my $size = pack "S2", @_; return "GIF89a$sizef00000000000ffffff," . "0000000001000100000202L0100;"; } print "Content-Length: 35"; print "Content-Type: image/gif"; binmode(*STDOUT); print create_gif(65535, 65535); 1;
26. Japanese traditional life’s work on software L10N (Localization) I18N (Internationalization) M17N (Multilingualization) Japanese traditional programmer make it one's life to L10N, I18N...
29. What is Mylingual.net? Mylingual.net Transparent i18n to any language (Web UI only) UserJavaScript (keeping HTML DOM structure) Opera 9 Mozilla Firefox & Greasemonkey Safari 2 & Creammonkey Internet Explorer 6 & Turnabout Advanced / Trixie Internet Explorer 7 & IE7pro (Inspired from) Japanize Transparent l10n to Japanese A web browser extension, it works good
34. What is AJAJA? Implementaion of JavaScript/ASP cf. Legacy: MS IIS JScript/ASP JS Engine SpiderMonkey + a patch CGI mode #!/usr/bin/asp_js Support for SQLite3 (default) use('SQLite'); db = new SQLite('sample.db');
41. What is JSmarty? Smarty is… One of the famous PHP Template Engine JSmarty is… Smarty on JavaScript Smarty clone Emulate PHP strings function on JS can use old Smarty template file almost compatible has a little incompatible plug-in Using JSAN.js to load
43. pmconnect (Akira Higuchi) SpiderMonkey (JS) <-> Perl binding library /* GD */ Perl.Use("GD"); var im = new Perl("GD::Image",100,100); var white = im.colorAllocate(255,255,255); var black = im.colorAllocate(0,0,0); var red = im.colorAllocate(255,0,0); var blue = im.colorAllocate(0,0,255); im.transparent(white); im.interlaced('true'); im.rectangle(0,0,99,99,black); im.arc(50,50,95,75,0,360,blue); im.fill(50,50,red); var s = im.png(); Perl.Use("FileHandle"); var fh = new Perl("FileHandle", "gdout.png", "w"); fh.print(s); fh.close();
58. Fastladder (livedoor Reader) Fastladder is yet another web-based feed-reader which was launched on Jul 3 2007. Fastladder has an origin in “livedoor Reader” which has been offered for Japanese-speaking people since last year. Actually, it is an English-version of it. It works very quickly. http://d.hatena.ne.jp/antipop/20070831/1188557354 antipop - Introducing another Feed Reader: Fastladder
61. implementing “ HTTP 301” most definitely in the world. “ HTTP 301 Moved Permanently” http://bb.watch.impress.co.jp/blog/archives/2007/10/post_39.html