login - help - about
?
header
<< Back to News

In Sacramento, JavaScript pages are soon possible
First post in a while... I'm working down in Sacramento, and not working on the BeNOW code much. It's a nice place, and the 8hr days are nice in comparison to what I do if I'm working on the BeNOW stuff ;) Something to do with nice workstation, speakers and noise. I miss it slightly, but it's fun here. Nice people, lots to do on weekends, etc. Here's some recent pics of the area.

I did cut a nice Proof of Concept tonight, however. I've been experimenting with the JavaScripting API, with focus on JavaScript and am well on my way to adding server side javascript pages (SJS) to the web framework. SJS pages are files which contain javascript which is run on the server, and creates content which is delivered back to the browser. It's somewhat like XSL .page files or .php files. The request comes in (say to /some/page.sjs) which contains a getContent() which might return 'some text';. The site wide structure of the page would be returned, along with the body containing some text. In addition to straight returned text, it's also possible to build up a document (via createElement(String), addElement(Element), etc) and call back into Java. I've also implemented a javascript loader (thanks to this tip), which allows for JS libraries to be included. This is what I was really after, as it allows for reuse of javascript libraries on both the server and in the web browser... unified scripting. It should also prove to be useful for other reasons... and as Mozilla Rhino is included by default in JDK6, it will be a standard part of the Web project! It's not in there yet, but it will be soon.

As it is using the JavaScripting API, it is also possible to support other scripting languages. With this feature should come support for other page languages, such as Python (.spy), Ruby (.srb) and Groovy (.sgy)!

- 08:34 AM, 10 Jul 2011