Return-Path: X-Original-To: apmail-incubator-wookie-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-wookie-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2829E4639 for ; Wed, 11 May 2011 09:51:28 +0000 (UTC) Received: (qmail 75827 invoked by uid 500); 11 May 2011 09:51:28 -0000 Delivered-To: apmail-incubator-wookie-dev-archive@incubator.apache.org Received: (qmail 75803 invoked by uid 500); 11 May 2011 09:51:28 -0000 Mailing-List: contact wookie-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: wookie-dev@incubator.apache.org Delivered-To: mailing list wookie-dev@incubator.apache.org Received: (qmail 75790 invoked by uid 99); 11 May 2011 09:51:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 May 2011 09:51:28 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of scott.bradley.wilson@gmail.com designates 74.125.82.175 as permitted sender) Received: from [74.125.82.175] (HELO mail-wy0-f175.google.com) (74.125.82.175) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 11 May 2011 09:51:21 +0000 Received: by wye20 with SMTP id 20so253505wye.6 for ; Wed, 11 May 2011 02:50:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:mime-version:content-type:subject:date :in-reply-to:to:references:message-id:x-mailer; bh=s9vgssoRYZQBjqFibEPhPomSczBp/6OQllrkCOFVDEA=; b=g8PHu9ojlPxsuTW0+kVCCICp+9D0zxGKpZ/trL3pX/5809qJl6D7Km26BxwGnih784 M5TSbIRLODC9XQF2lUo6CWDMqJbABk+0A2hyAcZs121RZJgz3jKtYjWOG635lADU/hYW xdJXzvUr9xey2XmwGjOJsrGjWxDYGYuxmBjpM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:mime-version:content-type:subject:date:in-reply-to:to :references:message-id:x-mailer; b=v/PyBU62lXP91hTGZNEYLY30yc5uYlta27n7r0Q1W4jQ7mGqTXBdyPV8DqWfRtnKtT JTpAN+StI8MxiYG1Y8eL+IkIsFSnXbADxJ6iaR/hiqL0tNjKEB+CZgyEuuJAAwk/IPRS BkXPtYE2NEwsxAcibgjcxuP9usZa0pl9CnhCc= Received: by 10.216.62.74 with SMTP id x52mr3833456wec.45.1305107459615; Wed, 11 May 2011 02:50:59 -0700 (PDT) Received: from [192.168.10.171] ([95.147.254.120]) by mx.google.com with ESMTPS id t11sm3964537wes.17.2011.05.11.02.50.57 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 11 May 2011 02:50:58 -0700 (PDT) From: Scott Wilson Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: multipart/alternative; boundary=Apple-Mail-19-382741768 Subject: Re: [PROPOSAL] Wookie gadget "store" moved to Rave? Date: Wed, 11 May 2011 10:50:56 +0100 In-Reply-To: <4DCA5681.4010405@apache.org> To: wookie-dev@incubator.apache.org References: <4DC9571D.8080100@apache.org> <4DCA5681.4010405@apache.org> Message-Id: <685EF94A-9CFF-4F00-AEE2-E0882689DED7@gmail.com> X-Mailer: Apple Mail (2.1084) --Apple-Mail-19-382741768 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 11 May 2011, at 10:27, Ross Gardler wrote: > On 11/05/2011 09:25, Steve Lee wrote: >=20 >> One thought is that in order to ease evaluation by new users/devs a >> global installer would be be useful, or at least clear signposting >> between the projects. >=20 > Naturally. I'm proposing that Rave become the official reference = implementation of a UI for Wookie. Our site would reflect this = accordingly. >=20 >>> Wookie is focussed on providing a server based environment for the = hosting >>> of Widgets and Gadgets. It provides the necessary infrastructure for = clients >>> to request a widget/gadget instance (or a wgt package if = appropriate). It >>> also provides a persistence layer so that widgets/gadgets can store >>> preference values. Wookie does not concern itself with the rendering = of >>> those widgets/gadgets. >>=20 >> I may be getting confused but doesn't Wookie also implement Wave APIs >> - do these really belong there as well? But that's another >> discussion.... >=20 > I'm not sure where "there" is. I don't think it is important for this = proposal which is only concerned with UI. However, for completeness, I = believe the Wave integration we currently have belongs here. In the long = term we should consider adopting Apache Wave for this rather than the = partial local implementation we currently have. However, there is = currently no use case so lets stay focussed (for reference Rave has Wave = features on its long term objectives list so a relationship with the = Rave community now would be a good thing in the future too). >=20 >>> Proposal >>> =3D=3D=3D=3D=3D=3D=3D=3D >>>=20 >>> Wookie should deprecate all UI code and provide integration with = Rave, >>> thereby allowing Rave to host W3C Widgets as well as OpenSocial = gadgets. Our >>> UI will no longer be interactive. All administration activities will = be >>> carried out via a command line application, interfacing with Wookie = via the >>> REST API. >>=20 >> Util now Wookie has required simple UI to allow basic evaluation >> testing and developing. If these functions move to another project, I >> would suggest that stand-alone unit tests would still be required at = a >> minimum, and perhaps a simple demo. It seems much of this could be >> done with some mock widgets and the command line / REST access. >=20 > I'm saying *no* UI code. Wookie becomes a library. The moment we start = bringing UI code back in for any reason we start to blur the lines. >=20 > Testing is not a problem (in fact it is simplified) and instructions = for instantiating a widget and viewing it in browser would be just a = few lines long. In fact there is no reason why the CLI couldn't = optionally fire up a browser when a widget is instantiated. >=20 > e.g. wookie instantiate [WIDGET_ID] [PROPERTIES] --view >=20 >>> We may choose to provide text based output from this API, although >>> I would suggest an XSL transformation of the XML responses from the = API >>> would be most appropriate as this will allow data to be retrieved in >>> multiple formats (CSV, text, HTML etc.) >>=20 >> That sounds good. However without getting too sidetracked JSON does >> provide easy consumption in many cases (but might not be appropriate >> here). For the straight-street.com API [1] I ended up serving JSON >> mime type with minimal formating to ease reading. using the Firefox >> JSONView plug makes it pretty and then interacting and exploring is >> really easy through the hyperlinks >=20 > Sure we can provide JSON too - we look forward to your patch or and = XSLT to convert XML to JSON, e.g. >=20 > wookie listWidgets [PROPERTIES] --transform=3DtoJSON.xslt >=20 > or >=20 > wookie listWidgets [PROPERTIES] --output=3DJSON Currently In the Controller class there is content-type support, it just = requires for each Controller method that returns a representation that = you implement a serializer in its respective Helper class. To get the = different views you either send a content-type header in the request, or = if you can't for some reason you can also add "?format=3Djson" or = whatever. e.g. in the WARP controller: switch (format(request)) { case XML: = returnXml(AccessRequestHelper.createXMLAccessRequestDocument(accessRequest= s),response);break; case HTML: = returnHtml(AccessRequestHelper.createAccessRequestHTMLTable(accessRequests= ),response);break; case JSON: = returnJson(AccessRequestHelper.createJSON(accessRequests),response);break;= } And in the whitelist controller: switch (format(request)) { case XML: = returnXml(WhitelistHelper.createXMLDocument(entries),response);break; case JSON: = returnHtml(WhitelistHelper.createJSON(entries),response);break; case HTML: = returnHtml(WhitelistHelper.createHTML(entries),response);break; } (Going with Ross's proposal we'd remove the HTML option, or wire it to = return XML with an XSLT) >=20 >>> We should offer all UI code in Wookie to Rave as a starting point = for their >>> "Gadget Store". I imagine that the majority of this code will be = re-written >>> by the Rave team to suit their local needs. However, I also imagine = that the >>> work they do will greatly enhance the work we have done here and, = for those >>> people who need a stand alone administration UI for Wookie we can = point them >>> towards Rave. >>=20 >> +1 >=20 > Thanks for your comments. >=20 > Ross >=20 >>=20 >> 1: http://straight-street.com/api/ >=20 --Apple-Mail-19-382741768--