thefoundationhttp://www.thefoundation.de2010-04-30T14:00:21Z(c) 2012 Michael Kurze, Aachen, GermanyOneSocialWeb: more than Jabber for Apps2010-04-30T14:00:21ZMichael Kurzehttp://www.thefoundation.de/about/michaelonesocialweb-more-than-jabber<p>Almost a month ago, the presentation of <a href="http://onesocialweb.org" title="OneSocialWeb">OneSocialWeb</a> at the android developers conference <a href="http://droidcon.be" title="Droidcon 2010 Belgium">droidcon.be</a> was one of the most interesting talks there. Recently the XMPP-centric framework has gone open source.</p><p>
Last year a group of fellow students and myself were tasked with creating an android applications to organize meetings spontaneously (think something like doodle, only mobile and more short term). At that time we were thinking about using <a href="http://de.wikipedia.org/wiki/Extensible_Messaging_and_Presence_Protocol" title="Extensible Messaging and Presence Protocol">XMPP</a> for real time communication, but were hesitant because of the time this would cost us to implement. In the end we used a traditional REST-based web service rather than a peer-to-peer system. Luckily there already is an effort underway which is called OneSocialWeb, funded by the telco provider Vodafone. It allows people to work together on Java-objects using XMPP.
</p>
<p>
This means that all the work that has to do with XMPP protocol handling and conflict management will be handled by this abstraction layer, while we developers can focus on delivering useful application. You could use this for simple things like associating chat conversations with arbitrary objects in your application. You could also try to model your entire application domain around this collaboration: In his presentation at droidcon <a href="http://eschnou.com/" title="Blog of Laurent Eschenauer">Laurent Eschenauer</a> demonstrated this using a collaborative shopping list where each participant could check off items, notifying the others immediately.
</p>
<p>
The Android platform with its services-model might really help in getting this concept to work, as XMPP protocol handling could be handled by one central service, dispatching updates to any interested Activities. This could well become the bidirectional, decentralized alternative to Apple’s Mobile Push service.
</p>It appears I was wrong2009-04-08T23:18:11ZMichael Kurzehttp://www.thefoundation.de/about/michaelit-appears-i-was-wrong<p>Yesterday, Google <a href="http://googleappengine.blogspot.com/2009/04/seriously-this-time-new-language-on-app.html" title="Seriously this time, the new language on App Engine: Java™">announced</a> the availability of Java as the new programming language for the App Engine, refuting <a href="http://www.thefoundation.de/michael/2008/sep/21/javascript-next-app-engine-language/" title="Is JavaScript The Next App Engine Language?">my guess</a> from last year that it might be JavaScript — though of course, not entirely.</p><p>
If you take the demand of the users into account, Java is of course the right choice as the next language. It might just alienate lots of Java-Developers if a niche language of the server zoo such as JavaScript was to emerge first. Additionally, Java is one Step short of full (albeit sandboxed) <abbr title="Java Virtual Machine">JVM</abbr> support.
</p>
<p>
To allow for sandboxing, Google wraps some of its own <abbr title="Application Programmer Interface">API</abbr>'s into Java SE or <abbr title="Java Specification Request">JSR</abbr>–standardized services such as <tt>javax.mail</tt> and <tt>java.net.URL</tt>. Also, there is a <a href="http://code.google.com/appengine/docs/java/jrewhitelist.html" title="The JRE Class White List">white-list</a> currently containing 1323 of the 3700+ <a title="Overview (Java Platform SE 6)" href="http://java.sun.com/javase/6/docs/api/">Java SE 6</a> classes. Most of the classes that are not available are from the Swing and AWT suites which a web developer will not need anyway. Instead, Google provides the homebrewn <abbr title="Google Web Toolkit">GWT</abbr>.
</p>
<p>
Thanks to the free and open source <a href="http://www.mozilla.org/rhino/" title="Mozilla Rhino: JavaScript for Java">Rhino</a> JavaScript Interpreter written in Java, server side JavaScript on the App Engine is rather easy to achieve now. I guess I might have to check it out and report back about it later, so I just signed up for the Java technology preview on my App Engine account.
</p>
<p>There are <a title="Campfire One: App Engine Redux" href="http://www.youtube.com/view_play_list?p=DFDBB63922B90A70">some videos</a> from the Google Campfire event over at Youtube. Most of the time they are rather interesting, plus Kevin Gibbs does a pretty decent imitation of Steve Jobs during the presentation (voluntary or not).</p>
Google Street View car spotted in Cologne2008-10-18T22:50:00ZMatthias Schulzhttp://www.thefoundation.de/about/matthiasgoogle-street-view-car-spotted-cologne<p>I recently saw a strange car standing outside my house. I'm pretty sure it's the Google Street View car taking photos of Cologne! I managed to take some pictures...</p>I'm sorry for the bad image quality but I only had my mobile on me and the camera is pretty bad...<br/>
There is this tripod construction on top of the car roof where presumably the camera rig is mounted on. I wonder how fast the car can go without creating too much motion blur...well, I certainly don't want to be the guy who has to deal with all the photos they take day by day ;-)
<p>
<gallery slug="google-street-view-car">Google Street View Car in Cologne</gallery>
</p>Is JavaScript The Next App Engine Language?2008-09-21T04:00:28ZMichael Kurzehttp://www.thefoundation.de/about/michaeljavascript-next-app-engine-language<p>As <em>the</em> language of the browser, JavaScript has become a kind of common denominator among web programmers. On the server it is rare compared to Java, PHP, Ruby or Python. Could this change, since Google has built an implementation of JS <em>and</em> an affordable yet scalable web application infrastructure?</p><h2>Scripting Language of The Open Web</h2>
<p>
JavaScript was created as a scripting language for the Netscape 2.0 browser. Other than its namesake Java, it has remained in the browser since then. Web Developers know this language because they have to use it, no matter if they like it. Throughout the late 90s and well into this decade, JavaScript was mostly regarded as a toy language for silly effects and simple form checks. Due to the more recent experience with Ajax applications and the resulting thorough coverage in technical literature, the users of JavaScript have become more professional.
</p>
<h2>The Server Domain</h2>
<p>
The development on the server side has — with some notable exceptions — ignored the language JavaScript for many years. Perl was a dominant language in the early days. Then, PHP gained momentum in the fast growing developer community during the internet bubble due to its gentle learning curve, the simple integration with MySQL and <em>the overwhelming availability of inexpensive shared hosting</em>. You could say that in its ubiquity, PHP has mimicked JavaScript, only on the server.
<br />
Other languages and tool chains have gained momentum since then, most notably Ruby, Java and Python. They are not as affordable as PHP (except Python on the App Engine), and seem to be used mostly because of their modern <abbr="Model, View, Controller">MVC</abbr> frameworks.
</p>
<h3>Why JavaScript Is Not Popular on The Server</h3>
<p>
JavaScript has some fundamental weaknesses that have inhibited its inception as a server side programming language:
</p>
<ul class="block">
<li>JavaScript, — or rather ECMAScript — has no real standard library, it is just a language. There are no tools for file or process manipulation. There are no database bindings and there is no shared memory. There is no way to open a socket.</li>
<li>In the past, JavaScript Interpreters have not been known for their performance. Anyone who has seen the message <q>A script on this page may cause Firefox to run slow.</q> would think twice before writing an application in JavaScript.</li>
</ul>
<p>
The <a href="http://dev.helma.org/">Helma</a> framework tries to address the first issue by using the Rhino Interpreter, making the Java SDK available to the JavaScript programmer. The second issue is at least partially resolved as some performance intensive tasks are moved to Java. In Java 6, Rhino is even bundled with Java. Nevertheless Helma and similar integration efforts are not very popular, compared to Rails or Struts. A reason for this might be that Java for the web (the <em>enterprise edition</em>) is a very serious business, while the perception of JavaScript has long been ...well, the opposite of serious. The two cultures do not seem to mix well yet, as good as the technologies might blend.
</p>
<h3>Why The App Engine Loves JavaScript</h3>
<p>
When Guido van Rossum adopted Python for the Google App Engine, he had to remove lots of features because they would not work with the sandboxed, replicating environment which is the App Engine. It turns out that the limitations of JavaScript really make it an ideal candidate for the App Engine.
</p>
<ul class="block">
<li>JavaScript is just a language: It cannot create sockets, files or processes. App Engine does not allow for that anyway, so this is a plus!</li>
<li>The language is easily sandboxed. Web Browsers have to do this all the time. This is ideal for a shared hosting environment.</li>
<li>It has a no database bindings included, but a natural serialization format, <a href="http://www.json.org" title="JavaScript Object Notation">JSON</a>. This is great for the Google Data Store, because it stores objects, not table rows.</li>
<li>Recently, JavaScript Interpreters (or, lets say <em>JavaScript Machines</em>) have become fast. There is <a href="http://code.google.com/p/v8/" title="">V8</a> and it is fast.</li>
</ul>
<p>
It is known (at least since Guido van Rossums talk at DjangoCon 2008) that Google plans to adopt more languages for the app engine. Also, there are four primary languages that Google uses for development: Python, Java, C++ and JavaScript. Python is already available. Java is a good candidate for the App Engine, but it is not exactly lightweight certainly not <em>shared nothing</em>. C++ is probably the opposite of any sandboxable language.
</p>
<p>
In combination with a template engine, a free offer on the App Engine might give the already ubiquitous JavaScript language a final boost. The prospect of <em>one language</em> from model definition to client side computation is certainly compelling!
</p>
<p>
To encourage further speculations: With Google's V8 machine comes an embedding, <tt>process.cc</tt>, that contains <q>code necessary to extend a hypothetical HTTP request processing application - which could be part of a web server, for example (...)</q> (<cite><a href="http://code.google.com/apis/v8/samples.html" title="Sample Code — V8 JavaScript Engine Documenation">V8 Documentation</a></cite>).
</p>