January 2010

Rootin Tootin 0.3.0 Release

I just released Rootin Tootin 0.3.0. In case you don’t know what it is: Rootin Tootin is a fast RESTful web server and framework written in D. It is designed to scale well by default, while still providing a developer experience similar to Ruby on Rails.

I don’t want to transpose the changelog here. You can view that at your leisure. Instead here are my highlights. Firstly, you can now use the link_to function in views to generate links. It will automatically add the .html to the end if needed. Secondly, and most awesomely: it now works properly with REST and Active Resource. You can even use the rails active resource, and python active resource to talk to it:

Lets start by creatnig a simple web app to talk too:

rootintootin name:users port:3000 db_user:root db_password:letmein
cd journal
./gen recreate database
./gen create noun singular:user plural:users
./gen create scaffold note name:string email:string
./gen migrate
./run

Now lets try talking to it, with the rails active resource:

#!/usr/bin/env ruby
 
require 'rubygems'
require 'active_resource'
 
class User < ActiveResource::Base
	self.site = "http://localhost:3000"
end
 
# create
user = User.new
user.name = "mr possum"
user.email = "possum@gmail.com"
user.save
 
# update
User.find(:all).each do |user|
	user.name = "awesome possum"
	user.save
end
 
# delete
user = User.find(:first)
user.destroy
 
# read
User.find(:all).each do |user|
	puts "name #{user.name} email #{user.email}"
end

If you are feeling more dangerous, you can try the python active resource version:

#!/usr/bin/env python
 
from pyactiveresource.activeresource import ActiveResource
 
class User(ActiveResource):
	_site = "http://localhost:3000"
 
# create
user = User()
user.name = "mr possum"
user.email = "possum@gmail.com"
user.save()
 
# update
for user in User.find():
	user.name = "awesome possum"
	user.save
 
# delete
user = User.find_first()
user.destroy()
 
# read
for user in User.find():
	print "name {0} email {1}".format(user.name, user.email)

So neat. This is just a small sample of what you can do. But there are still many essential features that need to be added. Not to mention html 5 goodness, like websocks and access control.

I’ll try and add a video walk-through of a basic app later. Bye Bye for now.

linux

Comments (0)

Permalink

Rootin Tootin 0.2.0 Release

During the end-of-the-year-shopping-season, I spent a few days working on getting the 0.2 release of Rootin Tootin out. For those of you that don’t know what Rootin Tootin is: It is a fast RESTful web framework and server written in D. Just think of it as a new framework that is designed to be as easy to use as Ruby on Rails, while improving on it.

There are tons of new features listed in the changelog. Some highlights are: Sessions work correctly. Flash messages are working too, thanks to sessions. File downloads work. Performance is greatly improved (although nowhere near where it should be). We moved from GPL v2 to GPL v3. And my favorite: Everything is automatically rebuilt when files change. So you no longer have to stop the server, build, and restart when you make code changes. For the complete list of changes, you can checkout the news.

Now I need to write a tutorial, and some documentation. Some more detail on how Rootin Tootin is different from Rails would be good too.

linux

Comments (0)

Permalink