Hi everyone,
I'm excited to announce a big new release of Chicago Boss, version 0.8.0. We've got a lot of great changes, including WebSockets and HTTP streaming, and of course it's all built on the world's greatest networking platform (OTP). In addition, for those of you who have been demanding greater flexibility in defining your application's URLs, regular expressions are finally supported in the routes file, so you can slice, dice, and munge incoming URLs however you please.
With this release there are some breaking changes with boss_db:find, so be sure to update your project code and test it thoroughly before shipping out to production. But I think you'll find the new, simpler API to that function is worth a few code changes. See README_UPGRADE for details.
Anyway, without further ado, I give you:
Download
Changes
* BossDB: New API for boss_db:find/3+. boss_db:find/4-6 have been eliminated in favor of a proplist for passing in search options in the third argument. Valid options are 'limit', 'offset', 'order_by', and 'descending'.
Old API:
boss_db:find(greeting, [], 10, 0, greeting_text, str_descending)
New API:
boss_db:find(greeting, [], [{limit, 10}, {offset, 0}, {order_by, greeting_text}, descending])
* BossRecord: The 'sort_by' option to -has is renamed to 'order_by'.
Features
* Cowboy support via mochicow. Specify {server, cowboy} in your boss.config. Thanks to Chan Sisowath.
* WebSocket support via modules in your project's src/websocket directory. Requires Cowboy. BIG thanks to Chan Sisowath for all his work to make this happen.
* Routes support Regex matching, capturing, and named groups. Thanks to Niclas Axelsson for the initial patch.
* New {stream, Generator, Acc0} controller return value incrementally returns data for HTTP chunked encoding. Thanks to me :-)
* New {moved, Location} controller return value performs a 301 permanent redirect. Thanks to Daniel Connolly.
* Templates: New _session variable makes all session data available to templates.
* Session cookies can be limited by domain with new 'session_domain' config option. Thanks to Jose Luis Gordo Romero.
* ErlyDTL: {% regroup %} supports grouping by nested values. Thanks to Lukas Larsson
* ErlyDTL: The "_" translator function can now take a variable, not just a string literal. Thanks to Jose Luis Gordo Romero for the initial patch.
* ErlyDTL: Support for {% elif %}. Thanks to Björn-Egil Dahlberg.
* BossDB: The PostgreSQL adapter supports parameterized queries with boss_db:execute/2.
* BossDB: The MongoDB adapter now returns undefined for properties that are not defined in the database. Thanks to Matt Husby.
Bug fixes
* 404 handlers did not return an HTTP 404 status code. Thanks to Daniel Connolly for the report.
* ErlyDTL: Fix date formatting of "h" value. Thanks to Colin MacDonald.
* BossDB: The Tyrant adapter was not properly initialized.
* BossDB: MySQL adapter did not properly update records with undefined foreign keys. Thanks to Jose Luis Gordo Romero.
The big 1.0 release is closer than ever, but we'll need lots of TESTING to make sure CB is rock-solid before unleashing it on the world. The number of bug fixes in this release is relatively low, which I hope means we've gotten rid of most of the bugs, but the number of new features is relatively high so it's likely there are some new "quirks".
In other news, the Chicago Boss mailing list now has over 200 members and has been quite active lately with many patches, questions, and answers. On GitHub, Chicago Boss is now the #14 most watched Erlang project with over 400 followers (#11 if you don't count defunct projects). I'd say the energy behind the project is strong! Hopefully we can keep up the good work and make a world-class final release later this year.
Happy bossing,
Evan