Saturday, October 17, 2009

Getting started with WebGL 3D magic

Firefox trunk build and webkit nightly builds both support WebGL, the upcoming Standard for hardware accelerated web browser 3D graphics. So I wanted to get my feet wet with this new technology and after short analysis, I did the following steps as possibly fastest solution to get a working demo (in my case on a mac):
  • updated my nightly build of webkit
  • in a terminal, issued the following command:
    defaults write WebKitWebGLEnabled -bool YES
  • opened one of the currently popular demos / showcases.
and then you get a smooth rotating object, all coded in Javascript !

Friday, October 02, 2009

Back on business

After some longer absence from the blogosphere and open source communities in general due to some personal disruptions, I am back, this time with focus on serverside Javascript, webkit-specific client-side stuff (for iPhone web apps, of course) and more. Right now I have just learned that super slick Cappuccino web framework is starting its Atlas-Web-IDE beta program on November 15. Exciting times ahead.

Wednesday, April 15, 2009

Develop native iPhone apps in Javascript

With phonegap you can today write iPhone webapps which run on an embedded browser and with a bit of clever CSS styling and JS trickery you can makes those apps smell and feel like native apps. Why not just writing normal browser based web apps for the iPhone ? Well, first you can't sell web apps on the app store and second, phonegap exposes many additional APIs to Javascript based apps.
Soon there will be a new flavor of JS / phonegap iPhone apps: Mike Nachbaur is working on a phonagap branch, which allows (or hopefully soon will allow, I haven't tested yet) to create in JS native Cocoa UI widgets such as tabbars and toolbars. Apple often just follows with Apple-branded versions of what smart developers do ahead of time, so if this will happen in this case as well, I would expect many of the iPhone developers to switch from Objective-C to JS.

Tuesday, April 14, 2009

CodeMirror browser editor got a Lua parser

Try it out. Unfortunately it might take a little while until it will find its way into bespin, because right now, CodeMirror based syntax highlighting in bespin tip is disabled due to some one restructuring of the canvas paint function.

Saturday, April 11, 2009

Helma NG serverside Javascript framework on appengine

Helma is one of the few Javascript server-side web frameworks, and it's next generation version runs right out-of-the-box on Google appengine. I followed the tutorial and easily got my own Helma NG demo running on appengine. Because Helma NG is a complete rewrite of standard Helma (which doesn't run on appengine), it is very simple, no persistence yet, mostly just request wrapping and routing and a simple template engine (no template inheritance and other fancy feature you find e.g. in django). If this is all one needs then Helma NG on appengine is now probably the easiest way to run javascript at client and server side. So let's hope that those who need a bit more, will contribute to Helma NG development to make it competitive with PHP, django and RubyOnRails, or come up with a new framework (RhinoOnRails ???).
And for those who need less than Helma NG, this article might be helpful.
Update: I was wrong about template inheritance, Helma NG does support it, via the "extends" tag. And the development branch has now also appengine persistence support (demo).

Wednesday, April 08, 2009

Javascript on appengine

Was offline yesterday, therefore missed to be among the first 10K to try it out, but a bit of web research revealed that it should work right out of the box:
Update: already got my invitation, now just need time to experiment with it !

Sunday, April 05, 2009

Experimenting with lexical auto-indentation for bespin

While the basic features of the codemirror syntaxengine now are part of bespin (and that is just syntax highlighting), I started today to experiment to add an advanced feature: Auto indenting of current line or a selection based on lexical analysis. The user just has to press CTRL + TAB (but could be any other key binding of course). The information about what codemirror thinks is the correct indentation is already internally stored for each line of the source document, all I had to do was to add some code which inserts or deletes some whitespace at the begin of those lines the user marked for auto-indentation. That is at least what I thought. Unfortunately it doesn't work yet reliable (and that is my fault, because the original codemirror editor does perfectly auto-indent) and also is not yet integrated into bespins undo/redo system, so it needs another iteration, before I can submit a patch, but if anybody wants to help working on it, take a look at the auto-indent code I added.