Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

kanso

Package Overview
Dependencies
Maintainers
0
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kanso

The surprisingly simple way to write CouchApps

  • 0.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
5
decreased by-28.57%
Maintainers
0
Weekly downloads
 
Created
Source

KansoJS

The surprisingly simple way to write CouchApps.

  • Flexible - a lightweight CommonJS environment
  • Reduces code fragmentation - by bringing the client-side and server-side together
  • Automatic history support - adds pushState and hash-based URLs automatically
  • Searchable and degradable - add Google-indexable pages and support clients without JavaScript
  • Familiar - all this can be done by using the CouchDB design doc APIs

Read more...

The Idea

With a normal CouchApp, you define the behaviour of your app in a design document which you push to CouchDB. This can describe URL patterns, validation rules and even respond dynamically to requests using show and list functions.

This allows CouchDB to communicate with the browser according to the rules defined in your design document. Being able to host an application directly from CouchDB removes a whole layer from your stack, and is one of the main attractions of using a CouchApp.

To do more complex operations and provide a nicer interface, CouchApps usually involve a lot of client-side code. This means repeating lots of logic from the design document using Sammy.js, Evently or a number of other JavaScript frameworks.

This isn't very DRY!

But wait a moment! The design doc is just JSON and our functions stored there are plain JavaScript... with a little work it should be possible to implement much of the design doc's API, in the browser. Meaning we can re-use our functions and cut out the extra client-side code!

The simple idea behind Kanso is to support the design doc API in the browser. You're already defining much of the application's behaviour in the design doc, why should you have to redefine it all over again?

Read more...

FAQs

Package last updated on 26 Jan 2011

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc