New Kanso release and change of direction

83 views
Skip to first unread message

Caolan McMahon

unread,
Dec 5, 2011, 3:46:42 AM12/5/11
to ka...@googlegroups.com
=== Cross-posted to the CouchApp group ===

Hi, all,


Today I'm excited to announce a new release and _change of direction_ for the Kanso project.

Kanso is now a generic build-system for CouchApps and completely framework agnostic. It even supports multiple styles, including reupholster and node.couchapp.js (support for the Python tool is experimental).

The Kanso team has been developing some great tools for managing and creating CouchApps, and now we're able to share these resources with the whole CouchApp community! These libraries and tools are built by people working with CouchApps every day in real-world projects and represent months of hard work.


The new website is available at http://kan.so


NPM for CouchApps
-----------------

Essentially, all you need to add to your project is a kanso.json file describing how it should be built. Once your app is in this format, it's possible to merge it with other design docs written in the same way. Using this basic principle, we've developed a library of JavaScript modules, build-steps, and more, all of which can be easily shared between projects.

For a complete list of available packages, view the online repository:


Kanso Tools
-----------

This is the new command-line build tool and the equivalent of node.couchapp.js or the python couchapp program. It doesn't just build your app; it can also manage dependencies, publish packages, and upload and manipulate test data.



Reusable Build-Steps
---------------------

Now, precompiling CoffeeScript is as easy as adding the "coffee-script-precompiler" package to your dependencies and telling it which paths to load. There's also support for compiling .less CSS files and precompiling templates. Every part of the build process is constructed in this way, making it completely modular and customizable.

These build-steps can be shared using the online repository in the same way as modules and other resources. Different components of an app can even use different build-steps, so it's no problem including a CoffeeScript module in my non-CoffeeScript project. The more we can share, the better.


Duality and CouchTypes
----------------------

The old Kanso framework has been split into two stand-alone projects.

Duality is the client-side implementation of the CouchDB design doc API. This allows you write your design doc content –rewrites, show functions, etc.– only once. It will run client-side when possible and server-side when JS is not available (which makes it good for search engines).  This is a replacement for Sammy.js, Backbone, or other client-side URL routing, and it is now available in the "duality" package.

CouchTypes is the extremely flexible schema, validation, and permissions system designed specifically for CouchDB. This can now be used with your favorite framework, be that Duality, Evently, Backbone, Spine, Sammy, or none at all. This can be installed from the "couchtypes" package.

Kanso has also spawned a number of other useful standalone modules available on GitHub or the Kanso package repository.


New GitHub Organization
-----------------------

All the libraries, build-steps, and tools are available through the Kanso organization on GitHub. This is the new home for all Kanso code and the place to report any issues.



Documentation
-------------

We're working on documenting all the packages and features available (and there are a lot!).  You can see the work so far at http://kan.so/docs. You'll see the documentation continue to expand rapidly over the next couple of weeks.


The Future
----------

It is my hope that this release will promote more shared resources among the CouchApp community, regardless of the underlying styles and preferences of developers. I believe the biggest barrier to CouchApp development has been a lack of good tools and the absence of a shared library of code.  Whether or not this is the right tool for that job remains to be seen, but hopefully it shows what is possible and pushes us to advance our current techniques.


Many thanks, and your feedback is most welcome,

- Caolan

Ejeklint Per

unread,
Dec 5, 2011, 5:26:33 AM12/5/11
to ka...@googlegroups.com
Wow, this is great!

Jason Smith

unread,
Dec 5, 2011, 6:02:59 AM12/5/11
to kanso
Hi, Caolan. This looks like an excellent release!

I have a quick question. It looks like the kanso distribution is not
idiomatic Node.js. It looks like we clone a repository and run make
(which fetches Git submodules). I thought it might be as easy as `npm -
g install kanso`.

Is it just for historical reasons that you avoided NPM for this
release, or some fundamental incompatibility I didn't notice?

If the former, then would you accept a pull request with tighter NPM
integration? I'm thinking a couple of goals:

* Fix problem with `parser` in Node v0.6
* From a checkout, able to run `npm link` and get a kanso install,
symlinked to the Git repo
* From a GitHub .zip download, able to run `npm install` and get a
kanso install, copied from the Git repo
* Some Make target that preps Kanso for publishing. (Some people have
private NPM archives, but the main user here is Caolan.)
* By running `npm -g install kanso`, people get the `kanso` command in
their $PATH, the latest stable release, etc.

On Dec 5, 3:46 pm, Caolan McMahon <caolan.mcma...@gmail.com> wrote:
> === Cross-posted to the CouchApp group ===
>
> Hi, all,
>
> Today I'm excited to announce a new release and _change of direction_ for
> the Kanso project.
>
> Kanso is now a generic build-system for CouchApps and completely framework
> agnostic. It even supports multiple styles, including reupholster and
> node.couchapp.js (support for the Python tool is experimental).
>
> The Kanso team has been developing some great tools for managing and
> creating CouchApps, and now we're able to share these resources with the
> whole CouchApp community! These libraries and tools are built by people
> working with CouchApps every day in real-world projects and represent
> months of hard work.
>

> The new website is available athttp://kan.so

> there are a lot!).  You can see the work so far athttp://kan.so/docs.

Caolan McMahon

unread,
Dec 5, 2011, 12:26:55 PM12/5/11
to ka...@googlegroups.com
Jason,

To be honest I found it a bit of a pain maintaining an npm package for
Kanso as well as supporting make. Though, your post is persuading me
that we should look into reviving npm support ;) At the time I didn't
want to add another dependency in the form of npm, so the makefile had
to be an option. Now, it seems newer releases of node come with npm
included, so potentially we could rely on it (once node v0.6.x is
fixed for Kanso).

The goals you defined sound great, this would get us closer to having
nice tarball releases on the website too. I'd be very happy to accept
a pull request towards these goals, so let me know if you need any
help.

Reply all
Reply to author
Forward
0 new messages