Hello Restleteers,


The scripted edition of Restlet is ready for demoing and testing. I'm including a link to download a distribution that should run immediately on any Java 5 compatible machine. I hope you'd give it a spin!


Scripted Restlet is development platform that lets you use _javascript_, PHP, Python, Ruby and/or Groovy to write REST resources and serve textual representations (HTML, XML, etc.) without writing a single line of Java code. Behind the scenes, you get the advantages of Restlet, the Java platform, and scalable network servers (Jetty, Grizzly), while still staying in the dynamic language you are invested in, including the wealth of 3rd party libraries for that language. Compilation (for scripting languages that support it) happens on the fly (within controllable limits), allowing for a rapid development/testing cycle.


The textual environment is designed to be very familiar to people who have used PHP, JSP or ASP, by letting you embed "scriptlets" of code into your HTML or other text. It includes powerful facilities beyond what you'd find in those environments, leveraging features of Restlet and Scripturian: script-controlled caching and streaming, control of HTTP headers, and seamless mixing of scripting/templating languages within a single page.


The scripts are heavily documented (you can even view the sources from the running demo) and demonstrate some of these features. I hope it's enough to give a head start for script hackers. Beyond that, there's quite a bit of documentation for the Java side of things: the demo site itself, the Restlet wiki, and the Java API documentation for the Restlet script extension and the Scripturian library. But, I don't expect script hackers to delve into the Java implementation issues, and hope to shield them from scary Java as much as possible!


Without further ado, the temporary download link: (16mb)


http://dl.getdropbox.com/u/122806/scripted-restlet-distribution.zip


Please read the included readme.txt to start!


Comments and caveats:


1. It's meant for experimentation only, building up to the final release of Restlet 1.2, which will include a special scripted edition (see issue #415 on Tigris).


2. Python notes: I have not included the Jepp libraries in this distribution, because they are a bit of a pain to install. However, if you manage to install Jepp, the Jepp demos should work just fine. Also note that I'm using the stable 2.2 release of Jython. You can install the 2.5 beta if you need newer Python linguistics. Final note: do not rename the jython.jar! I've found out the hard way that it breaks its ability to find Python libraries.


3. This distribution is a bit big, because it includes all scripting languages. It can be much smaller if you remove languages you don't need. To keep it lean, I've also not added Jetty or Grizzly, so it uses Restlet's default network connector. Definitely add those if you want to test performance/scalability!

4. To keep things simple, the demo is started via a batch file. This is a terrible way to run a reliable application! In a serious environment, you should run it as a controlled and monitored Unix/Linux daemon or Windows service, via either YAJSW or Tanuki's Java Service Wrapper. The final Scripted Restlet edition might include those.

5. Similarly, I haven't configured logging. Right now all logs just go straight to the console. The final release will be pre-configured for logging, including a nice Apache-compatible web.log.

6. I'm using a Subversion snapshot build of the Restlet libraries, including the Restlet script extension. A lot has changed since the milestone release.

Have fun scripting!

-Tal

Reply via email to