Get the source
0.5 (1.4MB)

Rootin Tootin is a fast RESTful MVC web framework that is written in D

  • Start
  • Install
  • News
  • Development
  • Why
  • Tutorial
  • Status

Create your project

rootintootin name:journal port:3000 db_user:root db_password:letmein
cd journal
./gen recreate database
./gen create noun singular:note plural:notes
./gen create scaffold note title:unique_string content:text \
validates presence_of:title,content
./gen migrate
./run
Ubuntu
Fedora
OpenSUSE
Source
Trunk

To install on Ubuntu Lucid 10.04:

rootintootin_0.5.0-2_i386.deb

To install from source. Install requirements then build:

  1. Mysql Server
  2. Mysql Client
  3. Mysql Client Library
  4. Python Mysql
  5. Python Pexpect
  6. Python Mako
  7. GCC
  8. Make
  9. LDC (LLVM D Compiler)
  10. Tango Library for D
  11. PCRE (perl compatible regular expressions
  12. Inotify Tools

wget http://launchpad.net/rester/trunk/0.5/+download/rootintootin-0.5.0.tar.gz
tar -zxvf rootintootin-0.5.0.tar.gz
cd rootintootin-0.5.0
sudo make install

To install on Fedora 13:

# Install the requirements
cd ~
sudo yum groupinstall "Development Tools"
sudo yum install mysql mysql-server MySQL-python pexpect \
python-mako ldc pcre pcre-devel inotify-tools
 
# Download and install Rootin Tootin
wget http://launchpad.net/rester/trunk/0.5/+download/rootintootin-0.5.0.tar.gz
tar -zxvf rootintootin-0.5.0.tar.gz
cd rootintootin-0.5.0
sudo make install

To install on OpenSUSE:

Install from source

To develop the framework on Ubuntu:

# Install the requirements
cd ~
sudo apt-get install mysql-client mysql-server libmysqlclient16-dev \
python-mysqldb python-pexpect python-mako build-essential \
ldc libtango-ldc-dev libpcre3 libpcre3-dev inotify-tools bzr
sudo service mysql start
 
# Download and install Rootin Tootin
bzr branch lp:rester rootintootin
cd rootintootin
sudo make dev

June 28, 2010

Release 0.5

This release was aimed at making app rebuilds automatic, and the framework easier to install. We are having new problems with the Ubuntu PPA. So just install using the package for now.

  • Fixed bug #591855: 'Compilation needs to be more strict'.
  • Fixed bug #589959: 'gen configure server header_max_size is ignored'.
  • Fixed bug #589820: 'Change configuration files to json'.
  • Fixed bug #584748: 'Move from Tornado to Dornado'.
  • Fixed bug #584807: 'Regex makes startup and requests extremely slow'.
  • Fixed bug #594439: 'escape_value and unescape_value are slow'.
  • Fixed bug #585528: 'Move the server and app to separate processes'.
  • Fixed bug #597053: 'Failed builds should show in the browser'.
  • Fixed bug #590977: 'Server is always old version RootinTootin_0.1'.
  • Fixed bug #597049: '404 pages do not show in Chrome'.
  • Fixed bug #586631: 'Rebuilding is too slow'.
  • Fixed bug #598700: 'The server needs to show unhandled exceptions'.
  • Fixed bug #598609: 'Large responses break the server'.
  • Fixed bug #598615: 'Application console output should show on the server'.
  • Fixed bug #584744: 'ppa does not work on ubuntu 10.04'.

May 20, 2010

We are having issues with the PPA on Ubuntu Lucid 10.04. Please install from Trunk for now.

March 02, 2010

Release 0.4

  • Fixed bug #511025: 'Controller template uses wrong view on create fail'.
  • Fixed bug #509711: 'Decimal datatype has zero precision'.
  • Fixed bug #509707: 'Decimal database type mapped to D double'.
  • Fixed bug #514143: 'Annoying obsolete FIXME in the routes'.
  • Fixed bug #513483: 'routes use zero-or-more instead of one-or-more'.
  • Fixed bug #510452: 'Requests for files do not show in server output'.
  • Fixed bug #510450: 'The unknown controller 404 page uses the wrong content type'.
  • Fixed bug #511027: 'Validation is missing in generated crud'.
  • Fixed bug #510488: 'html is dropped on create and update'.

January 19, 2010

Release 0.3

  • Actions can be rendered in html, json, or xml.
  • Routes are more RESTful and use regular expressions.
  • Models can be converted to json and xml via their to_json & to_xml methods.
  • Views can use the link_to function to render links.
  • The './gen create scaffolding' now gives model fields default values, instead of null.
  • The './gen create scaffolding' now gives each field a proper html control, instead of a textbox.
  • The './gen create scaffolding' now only allows valid field types.
  • The server now rebuilds only when files under the app dir change, instead of any file changing.
  • Templates now use <%= for print with escape, and <%# for just print.
  • The web server now returns 'building ...' while compiling.
  • The'./gen recreate database' command recreates a database.
  • Fixed bug #503179: 'DB data is not formatted correctly when rendered'.
  • Fixed bug #502003: 'Not providing an argument for show crashes the server'.
  • Fixed bug #503190: 'Having the same plural and singular word for a noun fails'.
  • Fixed bug #503981: 'CRUD UI with no data is confusing'.

December 31, 2009

Release 0.2

  • Moved from GPLv2 to GPLv3
  • Added a blacklist of words to be disallowed by the gen script.
  • Moved to a Python Tornado and D based server for speed and concurrency.
  • Updated the server so it automatically rebuilds when files change.
  • Replaced the ./build and ./run scripts with just ./run.
  • Model.find_by_id returns null on nothing found, while Model.find throws.
  • Added proper copyright/license headers to each file.
  • Changed the framework to use string as an alias for char[].
  • Changed most imports to be private.
  • Fixed broken sessions.
  • Added flash notice support.
  • Made the download of arbitrary files work.
  • Added a basic mime type map, for downloaded files.
  • Moved scaffolding js and css to their own files.
  • Added proper page titles.
  • Added a default page that lists controllers.
  • Added an unknown action page.
  • Fixed bug #501459: 'Dangling slashes in urls break routes'.
  • Fixed bug #500882: 'mysql connection error on new project'.

December 18, 2009

The Ubuntu PPA issues have been resolved. Rootin Tootin should now work on i386, amd64, and lpia CPUs. Packages for Fedora and OpenSUSE are still being investigated.

December 16, 2009

The first release (0.1) is out. If you are on ubuntu, you may have issues with the LDC PPA. Since it is a daily PPA, it tends to break every once in a while. I am working on fixing it by moving one of the working packages into our PPA.

Development happens over at launchpad:

  • Launchpad Homepage
  • Code Repository
  • Bug Reports
  • Mailing List

If you have any problems, you can contact Matt Jones at: mattjones@rootin.toot.in

Rails is the best web framework, but ...

(It is recommended that you use Rails or Django, until Rootin is more developed.)
  1. The page caching and action caching in Rails is extremely time consuming. It is essential to getting acceptable performance, even on trivial applications. This is by far the biggest down-side to Rails. Rootin's philosophy is that the View and Controller code should be fast enough, so there is no benefit to caching, until your site is much larger and heavily trafficked.
  2. Installing Rails is still frustrating on systems that use package managers. You end up using a mixture of native packages(RPM, Dpkg), gem packages, and gems copied into your Rails project. This makes deployment unreliable, as all 3 systems compete with each other, and have different versions of gems. Rootin's philosophy is to use the primary installation method for each OS. Plus Rootin is statically linked with your application. So It should "just work" on servers, even if they don't have Rootin installed.
  3. Configuration for ruby, gems, and sessions is spread throughout code in environment.rb, boot.rb, and production.rb. Rootin stores all that in json config files.
  4. There is too much fragmentation in the Rails server space, and no preferred one. This is confusing as many people end up handcuffing themselves to a combination of FastCGI, CGI, Webrick, Mongrel, Mod Rails, Passenger, Apache, Nginx, Lighttpd, and Cherokee. This dramatically hinders or helps their choices for caching, deployment, sessions, and scaling. Rootin comes with one server that is recommended for testing, development, and production.
  5. Having all of Rails and your gems copied to your project's vendor dir is silly. Plus there are tons of symlinks inside those vendor dirs. This wreaks havoc on your VCS and compressed copies of your project.
  6. Creating and managing your project requires a smorgasbord of scripts, rake commands, gem commands, and editing config files by hand. Rootin does everything by calling scripts.
  7. Rails has traditionally stuck to its original way of doing things: Using Prototype for JS instead of moving to JQuery, and using YAML for configurations instead of moving to JSON. Rootin will always try to use new/better technologies.
  8. Some methods in the Rails API work with strings or symbols as arguments. Many do not. This is confusing and leads to a lot of unnecessary conversions. The Rails framework is also very huge and uses a ridiculous amount of meta programming, introspection, and unnecessary runtime database and config file lookup. Rootin focuses on being small, fast, simple, and quickly changing based on feedback.
  9. Rails is sorely missing first party plugins for essential things like pagination, user accounts, encryption, cookies, et cetera. Rootin will include plugins for essential features.
  10. The way Rails tries to guess the singular to plural naming conventions of your models and controllers is confusing. It optionally lets you specify inflections of words. This leads to the developer constantly using the wrong pluralization, or Rails guessing wrong. The Rootin way is to simply require that you map the pluralization of each controller and model.
  11. The primary method of learning Rails is the book Agile Web Development With Rails. It is always late to release, and out-of-date a few months later. It took them over-a-year after rails 2.0 came out, to release the version of the book that covered it(version 3). They should have gone the wiki route, like Django did with The Django Book.
  12. Rails and Erb still do not escape output in views by default. Having to opt-in to escaping, with the "h" function is backwards, and dangerous. Rootin escapes everything by default ala Asp.net. The <%=unsafe%> syntax will escape, while the <%#safe%> syntax will not. Note that this should be fixed in the Rails 3 release.
  13. Templates in Rails are generated in real-time. This is slow and contributes to the "You must cache for decent performance" attitude. Rootin simply pre-generates the templates at compile time, by turning them inside-out.
  14. The Rails ORM(Active Record) does not enforce referential integrity. This means that you will inevitably have your site break, because you didn't realize that deleting stuff, left some foreign key dangling somewhere. Rootin simply uses referential integrity. So you can't delete things improperly.

Lets create a simple journal application. Make sure you have installed the framework, and are running a Linux based OS.
  1. Create a new Rootin Tootin project. It will be named "journal", run on port 3000, and use the mysql user "root" with the password "letmein".
    rootintootin name:journal port:3000 db_user:root db_password:letmein
  2. The rootintootin command created a directory named "journal" that contains the complete app. Move into this folder.
    cd journal
  3. To create the mysql database, we will use the gen script. As with any scripts in Rootin Tootin, we will run them like "./gen". The "./" simply means to run the script in the local directory.
    ./gen recreate database
  4. We will want to create a model and controller named "note". In order for the framework to know about the noun "note", we will tell it how to pluralize and singularize this noun. Singularize means one instance and pluralize means many instances.
    ./gen create noun singular:note plural:notes
  5. Now we will create a skeleton website or "scaffolding" for our journal. We will need a database model named notes with string fields title and content. This will also create our models, views, controllers, and migrations.
    ./gen create scaffold note title:string content:string
  6. Now we will run the migration that will create the tables that the models are mapped to.
    ./gen migrate
  7. Now we will run the project. The run command will start the server on port 3000. The server will look at the project files and compile them automatically when they change.
    ./run
  8. Now visit the website in a web browser.
    http://localhost:3000/notes

The project status as of August 2010

Status:

Rootin Tootin is alpha software, and not ready for production use. It is missing many key features, and has yet to be significantly tested for security, performance, or reliability. The API is extremely unstable. It is highly recommended that Rootin Tootin is not used on anything, until the 1.0 release. No known websites actually use Rootin Tootin.

Caveats:
  1. File uploading works, but the server puts the entire file in memory. This is used to parse the http multipart encoding that browsers use when uploading. This should be fixed in a later release.
  2. The only database that is supported is Mysql. In later releases, we should support Postgres and others.
  3. Deployment is still difficult. This should be resolved in the 0.6 release.
  4. The API reference and documentation are non existent. This should be resolved in the 0.7 release.
License:

Rootin Tootin is licensed under the GNU General Public License version 3 (aka GPLV3). Because it is using the LDC compiler, libraries can only be statically linked. This means that software compiled with Rootin Tootin, will be considered a derivative work of Rootin Tootin, the Dornado Server, and the Tango Library. The compiled software will be licensed under the GPLV3 from Rootin Tootin, the Apache License Version 2 from Dornado, and the BSD License from Tango.

This will make your compiled software only distributable under the GPLV3/Apache 2 Licenses. You can avoid this by three means: By distributing your software in a source code form, without being statically linked to Rootin Tootin or Dornado; By only distributing the unlinked object files; Or by not distributing the binary, and having it run as a server.

Obviously the licensing issue is not ideal. Hopefully this situation will be resolved before Rootin Tootin is usable software. Most likely LDC will gain dynamic linking support, or Rootin Tootin will be re-licensed as BSD .

Patches and Copyright Assignment:

The Rootin Tootin project does not require copyright assignment. This means that you own any contributions you make. All patches are required to be submitted as Bazaar branches. This way, your contributions are documented in the Bazaar repository.

Operating System Support:

Rootin Tootin uses the LDC compiler (LLVM D Compiler), and Tango library. The only Operating Systems with packages for LDC and Tango are Debian and Ubuntu. Fedora may have packages in the upcoming Fedora 14 release. In the future I hope to see LDC and Tango on major Linux, BSD, and even Windows OSes.

Copyright © 2008 - 2010 Matthew Brennan Jones
Rootin Tootin is licensed under The GNU General Public License v3.0.
This website and all documentation is licensed under The Creative Commons Attribution License v3.0.