CouchBase Design Document View UI not as good as CouchDB
Why you you gotten rid of the design document view from CouchDB. This enabled developers to keep json files representing design document in their version control systems, editing them and cutting and pasting into the CouchDB UI to get quick update/testing turn around.
Equally, if you only use the couchbase UI to create the views then how are they exported into a text file?
Hey Adam,
Sorry for the wait. We do have a source code style editor for editing specific docs. The plan currently is to allow the direct editing of both "normal" docs and design documents. Once we have that in place, you could copy/paste your design document into Couchbase Server the way you'd like to.
However, there is some risk involved with editing your production views directly--greater load on the cluster is one. We'll likely include information on the document editor that states that editing _design/{doc} documents will cause your indexes to be rebuilt. You could of course edit a _design/dev_{doc} (our development "mode" design documents that work against a data subset by default--to avoid unnecessary load while testing). In that case, you'd be able to edit the doc and then visit the view section to do result testing.
Another option would be to structure your repository in the same way that the couchapp command line tool does. That would allow you to copy/paste just a single map or reduce files contents into the View Development screen editor without having to worry about JSON decoding and such. Your folder structure would look like this:
- views
- {view_name} - where this is the name of your view
- map.js
- reduce.js (optional)
- {another_view}
- map.js
- reduce.js (optional)
- {view_name} - where this is the name of your view
You wouldn't need to actually use the couchapp tool unless you were going to send the same design document to Couchbase Single, but this would give you the ability to copy/paste (as you're doing now), have version control, and give you the option to output a full design doc in JSON format and pushing that to Couchbase Single.
Please let me know if you need more information.
Thanks,
Benjamin
Thanks for the feedback Adam, I'm engaging with our product management and engineering teams to get an answer on this for you.
Perry
Forum support is great for free but sometimes you need a guaranteed response time and dedicated resources for your questions or issues.
Consider purchasing enterprise-level support from Couchbase: http://www.couchbase.com/products-and-services/overview
Call or email "sales -at- couchbase-dot- com" today!