sawsij is a lightweight, open-source web framework for building high-performance, data-driven web applications.
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.
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.
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.
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.
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.
Sawsij currently only supports Postgres, but support for other DBMS systems will be added soon. For a variety of reasons, we're not planning to support MySQL. This may change if there's enough demand. We'll probably look at some NoSQL databases first.
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.
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.
With sawsij, your handler code returns data structures that can either be parsed into HTML templates or marshalled into JSON (XML coming soon!) 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!
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!
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.
This project is young, but complete enough to develop useful applications. It probably falls into the category of "late alpha" or "early beta". There are production instances being used by brave people, your mileage may vary. If you find a bug or want to request a feature, be sure to file an issue.