Awesome future for the java web apps: Stax.net
Elastic Java application platform for EC2
I am using Heroku for my Rails apps and I am loving it, what's not to love about Heroku?! :)
But I am also a Java developer, and like many others I am crying for a decent Java hosting provider. Bright future ahead: Stax.net. Stax will probably become for Java what Heroku is for Rails, which is awesome news.
You can apply for a beta account and start playing with some of the templates available from Stax; basic servlet support, wicket, etc.
For testing purposes, I decided to try creating a JPublish based application and to host it at Stax. 10 minutes later and the app was up and running, you can see it here:
JPublish @ Stax.net (an application based on the JPublish hello app available for download at Google.)
Drop me an email in case you're interested to install your own JPublish app in the cloud at Stax, and make sure you visit their Wiki page for more Stax related details: Stax Wiki
More details to follow :)
____________
Disclaimer: JPublish and this blog are not affiliated with or endorsed by the Stax.net
adding Google Closure support to JPublish.
If you follow me on Twitter, you already know I started to re-write JPublish in Scala, tho it's a long way and it is mostly an experiment so far.
However, the existing JPublish version is enterprise ready but it lacks a nice AJAX/JS templating support. Tried jmaki, but I wasn't too happy about that. With the availability of the new Google's awesome Closure library, it is imperative for me to integrate JPublish with the Closure templates. I'll find a way to do that and will let you know here how it goes.
It will be a lot of fun!
extra 5 minutes of fun; JRuby and Velocity
As promised, this time I am showing you a very simple way to play with Velocity templating language in JRuby.
jvel.rb# A simple JRuby Velocity integration demo
# Notes:
# - save this script as 'jvel.rb'.
# - in the folder from where you're executing this simple script, you'll
# have a subfolder: 'lib', containing the Velocity library:
# lib/velocity-1.6.2-dep.jar
# This jar is intended to be used when you do standalone development
# with Velocity. And assuming that you have jruby in the path, you can
# run the script:
#
# $ jruby jvel.rb World
#
# You'll see: Hello World!
# -----------
require 'java'
Dir["lib/*.jar"].each { |jar| require jar }
class JRubyVelocity
include_class 'java.io.StringWriter'
include_class 'org.apache.velocity.app.Velocity'
include_class 'org.apache.velocity.VelocityContext'
def render ( arg)
Velocity.init
writer = StringWriter.new
ctx = VelocityContext.new( {'name' => arg})
Velocity.evaluate( ctx, writer, "log", "Hello ${name}!")
return writer.getBuffer
end
end
puts JRubyVelocity.new().render( ARGV.pop)
Good luck!
