Performance meets happiness.

sawsij is a lightweight, open-source web framework for building high-performance, data-driven web applications.

No compromises

It has long been thought that selecting a web framework is a choice between high performance and developer productivity. That never made much sense to us. Why can't you have both?

Sacrificing performance in the name of developer productivity is like driving a car that gets terrible gas mileage because it has a great steering wheel. A car ought to get good mileage and be easy to drive, not one or the other.

Made with Go

sawsij helps you write high-performance, data driven applications in Go. Go is expressive, concise, clean, and efficient. It's also easy to learn and fun to work with.

New Apps in Minutes

Once installed, sawsij provides an easy-to-use command line tool for creating new applications. You simply give it a directory location (in an existing Go workspace), an application name and database information, and it will create your new app and build it for you.

There's also a facility for generating basic CRUD code from database tables. This is extremely useful for getting your basic application structure in place and getting administration screens working.

Docs and Help

We want sawsij to be useful to developers of all stripes. We provide clear, conscise API documentation and lots of recipe-style examples. When you get stuck, all of the core developers (as well as fellow users) answer questions on the mailing list.

Data driven

sawsij includes a lightweight data access facility that makes it easy to represent database tables, rows and views as data structures. It's a snap to fetch data and add, update, or delete rows.

We believe that modern DBMS systems (like Postgres) are very capable and there's no need for applications to reproduce functionalty that's already there. To that end, sawsij makes it easy to interact with mutiple schemas, use views and stored procedures, and even make direct queries where needed. We think that using a database for "object persistence" is a fundamentally flawed concept that ought to be avoided.

The framework/model package currently supports Postgres and MySQL. Other database platforms can be used directly, and there's support for making connections that will be available to all your handlers automatically.

Easy Auth and ACL

Role-based access control with route level granularity and a built-in login handler make it easy to control access to parts of your applilcation. You can also extend or replace either of these with your own implementations.

What does it do?

sawsij gives you an easy way to generate skeleton applications that you can then build on. There's a number of useful libraries and functions your app can make use of, in addition to lots of other freely available packages via go get.

Simple Web Services

With sawsij, your handler code returns data structures that can either be parsed into HTML templates or marshalled into JSON It's also really easy to read HTTP requests containing JSON and map them to data structures in your application. Ajax has never been easier!

Database Migrations

Keeping your schemas in sync across various application instances can be quite a headache. sawsij greatly simplifies this process with migrations. Essentially, you create incremental database change scripts and give them a number, following a naming convention for the change script file. Your application is configured to work only against a database that's the correct version, so there's no accidental data corruption. When you need to upgrade a database, you simply run your applilcation in "migrate mode" and your database gets upgraded and the version number incremented. It even supports multiple schemas!

What's with the name?

John Godfrey Saxe once said:

Laws, like sausages, cease to inspire respect in proportion as we know how they are made.

Web applications have a lot in common with laws and sausages in this respect. The goal of sawsij is to provide the parts of a web application that are always the same, letting you focus on the parts that are unique to your app. Thus, you don't have to see the sausage being made, you just get to enjoy it.

We realize that this is a bit of a stretch, but everyone liked it and it stuck.

Also, if you're a vegetarian, don't worry. Sawsij is 100% meat-free and the only animals hurt during production were the developers, and that was via self-inflicted sleep loss and caffine consumption.

Development Status

This project is still young, but the code is clean and stable and can safely be used in production. We're currently in the "1.0" phase. If you find a bug or want to request a feature, be sure to file an issue.