Introducing LoveSeat – a light-weight editor for CouchDB
09 Feb 2010 11:41 PM UncategorizedEdit:by popular demand, I went back and made sure that LoveSeat works under mono. a few minor tweaks later, we're good to go. See below for pics.
In the course of my work on friendsell, i got fed up with the rather limited view function editing abilities of futon, and rolled my own. The main goals were getting out of utf-8 cr-lf hell, avoid having to escape quote strings, and avoid having to manually tweak json docs. It's far from perfect (or done), but it did cover the main use-cases.
LoveSeat lets you connect to a cdb database, browse the databases and design documents within it, CRUD design docs and call views.


When running views, results are represented in a simplistic (but for the time being adequate) tree view

The current set of context menus is aware of views, map and reduce function and lucene indices

Finally, there are a few maintenance tasks supported - extract and importing all design documents in a database as flat javascript files, and cloning the design docs in one database to another

I"ll be expanding this app in the foreseeable future, first and foremost focusing on mono compatibility, and then moving on to some core features that might help.
Loveseat is available on GitHub
Great work Alex – this is the sort of thing that will help bring CouchDB into the mainstream. Do you have a feature roadmap and are you looking for any help with it?
not anynthing as formal as a roadmap, but i do have a few things i’m looking to do with it, and would certainly love some help. the biggest decision i need to make right now is whether to keep is as a stand-alone tool, or to make it a plugin into existing IDEs (visual studio, monodevelop, eclipse) to take advantage of their built-in js editing abilities. the other direction i’m going down is trying to use a local build of spidermonkey to allow users to debug through (step through) map/reduce/index functions, and that also depends on whether this thing will remain standalone. there’s a litany of other small things, but these are the core decisions that need to be made.
This looks cool. But does it only work on windows?
it works under mono (it uses Divan as the couch library, which is tested against mono), so it will work on *ix/macos. last time i checked there was a bit of ui weirdness, and that may still be an issue. i’ll be looking into that now.
it would be great if the editor can work under linux, it is where most of couchdb instances run.
just went back and made a few tweaks. it does now!
have difficulties running this on ubuntu 10.04 32bit.
Have installed mono-complete and compiled it with xbuild /property:Configuration=Release
But once i try to start the binary it throws an Exception:
Unhandled Exception: System.NotSupportedException: Either the image format is unknown or you don’t have the required libraries to decode this format [GDI+ status: UnknownImageFormat]
at System.Drawing.GDIPlus.CheckStatus (Status status) [0x00000]
any hints how to run it on ubuntu?
thanks,
jan
hm. this is probably something to do with the new ‘about’ screen. it has a large-format logo in it. do you have the necessary codecs installed to decode PNG?
yes, libpng is installed and works in other contexts perfectly (creating png with imagick for instance).
looks like it got anything to do with an icon.
i tried to rename ‘Magenta Seat.ico’ to ‘Magenta_Seat.ico’ and changed it in Loveseat.csproj, too. But the whitespace wasn’t a problem.
this is the complete exception stack:
Unhandled Exception: System.NotSupportedException: Either the image format is unknown or you don’t have the required libraries to decode this format [GDI+ status: UnknownImageFormat]
at System.Drawing.GDIPlus.CheckStatus (Status status) [0x00000]
at System.Drawing.Image.InitFromStream (System.IO.Stream stream) [0x00000]
at System.Drawing.Image.LoadFromStream (System.IO.Stream stream, Boolean keepAlive) [0x00000]
at System.Drawing.Icon.GetInternalBitmap () [0x00000]
at System.Drawing.Icon.ToBitmap () [0x00000]
at (wrapper remoting-invoke-with-check) System.Drawing.Icon:ToBitmap ()
at System.Windows.Forms.XplatUIX11.SetIcon (System.Windows.Forms.Hwnd hwnd, System.Drawing.Icon icon) [0x00000]
at System.Windows.Forms.XplatUIX11.SetIcon (IntPtr handle, System.Drawing.Icon icon) [0x00000]
at System.Windows.Forms.XplatUI.SetIcon (IntPtr handle, System.Drawing.Icon icon) [0x00000]
at System.Windows.Forms.Form.CreateHandle () [0x00000]
at System.Windows.Forms.Control.CreateControl () [0x00000]
at System.Windows.Forms.Control.SetVisibleCore (Boolean value) [0x00000]
at System.Windows.Forms.Form.SetVisibleCore (Boolean value) [0x00000]
at System.Windows.Forms.Control.set_Visible (Boolean value) [0x00000]
at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control:set_Visible (bool)
at System.Windows.Forms.Application.RunLoop (Boolean Modal, System.Windows.Forms.ApplicationContext context) [0x00000]
at System.Windows.Forms.Application.Run (System.Windows.Forms.ApplicationContext context) [0x00000]
at System.Windows.Forms.Application.Run (System.Windows.Forms.Form mainForm) [0x00000]
at LoveSeat.Program.Main () [0x00000]
it turned out to be the application icon. for whatever reason, that was causing issues on mono. i’ve updated the source, and uploaded new binaries with the fix. you should be able to grab either and go now.
Seems that that the LANG environment variable has to be set to C. otherwise, it crashes every few keystrokes (or mouseclicks as the case may be…) what tipped me off was the error
“X does not support your locale” when running it from a terminal. a simple export LANG=C did the trick.
interesting. i wonder what C has to do with locale, especially since it should be turning off syntax highlighting when running on mono…
Hi Alex,
Not really sure either what would cause this reaction to a different LANG env setting. I’d love to be able to nail this down, but .NET/Mono development is beyond me. I might be able to squeeze in checking the code as I’ve been meaning to learn .NET/Mono anyway, but that will happen in a couple of weeks, as I’ve got a deadline to catch.
I forgot to mention that I ran it against mono on Lucid.
hm. i’ve been testing mono on osx. time build an ubuntu vm.