On Tue, Feb 17, 2009 at 10:08 AM, Chris Anderson <[email protected]> wrote: > On Tue, Feb 17, 2009 at 9:47 AM, Jan Lehnardt <[email protected]> wrote: >> >> On 17 Feb 2009, at 18:18, Damien Katz wrote: >>> >>> On Feb 17, 2009, at 6:53 AM, Jan Lehnardt wrote: >>>> List of installed apps. With CouchApps shaping up, Futon could show a >>>> list of >>>> installed applications alongside created databases. The way to detect >>>> CouchApps >>>> is not yet defined, though there are sensible proposals. >>> >>> I don't dislike this idea, but this seems more like an end user feature? >>> Like a start menu for CouchApps? I think most end users (as opposed to devs >>> and admins) should never need to use Futon. >> >> This is meant for a dev managing multiple CouchApps, not an end user. I >> agree >> that Futon is not an end-user tool. Granted, the line with user and dev is >> blurry >> with CouchApps, but this would make a dev's live easier to get a list of >> apps instead >> of hunting attachments in design docs (3-4 clicks at least). Yes, >> bookmarks..., but still :) >> > > I'm working on code to detect CouchApps, and adding it to Futon is the > first place I can think of to put it. I think once devs have had a > chance to file off the rough edges, we can think about another global > handler for users (maybe /_apps ?) that will list all end-user > friendly design docs that are available on a particular node. >
I'm committing a change to Futon to list all apps for each database, from the main index page. An "Applications" column is added and any design doc that has an index.html attachment, or a ddoc.couchapp.index member, is linked to. The design docs couchapp.index field is used to generate the link to the application's start page (without hardcoding the design doc name or the database name). Assuming the design doc is stored at /somedb/_design/myapp ["_list","posts-index/by-date?limit=10"] links to /somedb/_list/myapp/posts-index/by-date?limit=10 and ["_show","app-preferences"] links to /somedb/_show/myapp/app-preferences You can link to attachments (if you aren't using index.html, for some reason...) like this: ["_design","notindex.html"] I think this makes sense. If you see a simpler way to do it please speak up. Here's a link to a screenshot of what it looks like, if you don't happen to have any design docs that meet the criteria for activating it. http://img.skitch.com/20090222-ttb3gmd86unthjw9i6cqhjs9c9.png One caveat is that it must load each design-doc, but I think that is ok now that Futon paginates databases. I'm interested in thinking about what end-user interfaces could look like. For instance it might be neat to add a ddoc.couchapp.icon setting, which names the attachment to use for links to the application in an end user environment. Linking to apps from Futon will help ensure that developers have an incentive to make their apps discoverable. Chris -- Chris Anderson http://jchris.mfdz.com
