Entries Tagged 'linux' ↓

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.

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.

Fixing Packaging in Linux #1

I really, really, really want feedback on this:

Over the past few months, I’ve really gotten into packaging on Fedora and Ubuntu. I’m not an expert, but I can genuinely say our packaging situation is crap. We are so close. And yet we ended up with two major implementations, that are almost the same. There is no significant difference between RPM and Dpgk.

So will Fedora abandon their 15,000 packages and choose Dpkg? Will Debian abandon their 35,000 packages and choose RPM? No. Neither will. There is no way for them to transition. And they will not give up their self branded solution. The only way forward is to make a new system, that is both better, and backwards compatible with RPM and Dpkg.

That is what I have been toying with for the past few months. It is called Packagetastic and It is a replacement for Dpkg and RPM, but still backwards compatible with them. Right now it is just a proof of concept, but can build many small packages on Ubuntu and Fedora.

I made a screencast to show how it works. This is just a simple, introduction. More example on how to use it will come soon. You can view the screencast below:




packagetastic_1.ogv (96.2 MB)

More information about the project can be found here: http://launchpad.net/packagetastic

Please provide your criticism and feedback at the mailing list, this blog post, or my identica page.