Re: [Tapestry Central] March of Progress
Howard: I'm very interested in seeing Tapestry succeed; I've made a significant design commitment to it, and I'd like to see it work. I offer the following recommendations that I feel may help you accomplish these two financial and product-strategy objectives: a) Increased revenue that doesn't require constant-input labor hours from you, and b) Better educational tools about Tapestry which can significantly influence acceptance / design-win rate The big problem I encountered using Tapestry was the long learning curve. It's a very powerful toolset, and it takes a while to understand both its philosophy of operation and the identity/function of the components. I suggest: a. Build a website that enables your many contributors to build documentation components. Let your community write the book about Tapestry. b. You edit it for accuracy and completeness. c. Have the website be a subscriber website. $20/year to subscribe d. Divide the subscription revenue 20% to you, 80% to the contributors. e. You decide which documentation components get included in your book. The contributors contribute, and you select. The project that makes this collaborative documentation facility would (potentially) be in high demand from other open-source projects - many of which face the same set of hurdles you do. You already have several contributors that can write the outline or super-structure of the documentation. Use that as the what we need bill of materials. Each documentation element would get a unique section number, and knowledgeable Tapestry practitioners could sign up to write one or more sections. Each section would have a (published) percent of proceeds number associated with it, so people would know in advance what share of the annual revenue they'll get if they write it. The content could also be submitted to a print-on-demand publisher for those that like hard-copy. My guess is that you'd sell about 500 copies the first year of production. That's only $10K in gross revenue, but that's in the first year. Each year you'll sell more subscriptions, and the incremental effort to maintain the documentation would fall appreciably. After year 3, it may be $20-30K in annual revenue, and the workload would be a small fraction of the year-1 effort. That's enough detail at this point of the discussion. If this idea is of interest, not just to Howard but also to the other Tapestry stakeholders, let me know and we can discuss it further offline. -- View this message in context: http://old.nabble.com/-Tapestry-Central--March-of-Progress-tp27692591p27708826.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: How to render a page as JSON-formatted AJAX response?
DH-14: Yes, I ended up using a block. For those like me that don't know what a block is, it's an XML-tagged section of your template, demarcated via block id=yourIdentifierHere/block tags. The block can be injected into page or component code using the @Inject annotation as an object of type Block, with a variable name in the form of _yourIdentifierHere. The variable name must match the ID used in the block tag - except for the leading underscore, which is stripped by Tapestry. This Block object can be returned from the event handler, and is rendered prior to being sent back, in JSON form, as the reply to the AJAX request. Surely some of you will ask Why was that not obvious at the outset, Renger?. I can only say that it took me some several re-readings of the documentation to identify the Block method as a potential solution, and a few more to figure out how it worked. There is, to my knowledge, no section of the documentation that sets out what Blocks are, how they work, and what use-cases they pertain to, with the exception of this excerpt from the AJAX section of the Tapestry reference: For an Ajax request, the return value from an event handler method is processed differently than for a traditional action request. In an normal request, the return value is the normally name of a page (to redirect to), or the Class of a page to redirect to, or an instance of a page to redirect to. For an Ajax request, a redirect is not sent: any response is rendered as part of the same request and sent back immediately. The possible return values are: * A Block or Component to render as the response. The response will be a JSON hash, with a content key whose value is the rendered markup. This is the basis for updates with the Zone component. * A JSONObject or JSONArray, which will be sent as the response. * A StreamResponse, which will be sent as the response. I say that merely to justify the bandwidth I took up to ask my question. I remain very appreciative of HLS' work, and I thank the responders for their attention. -- View this message in context: http://www.nabble.com/How-to-render-a-page-as-JSON-formatted-AJAX-response--tp24081692p24091906.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
How to render a page as JSON-formatted AJAX response?
On my client, I have a tabview. When the user navigates to one of the tabs on the tabview, I trigger an AJAX request to obtain the content of that tab. The AJAX request is sent to a Tapestry component event handler. I want that event handler to invoke some other page or component, and cause the rendered output of that other page/component to be captured into a JSON-array, and sent back to the client as the reply to the AJAX request. What is the best way to do this? thanks. Renger -- View this message in context: http://www.nabble.com/How-to-render-a-page-as-JSON-formatted-AJAX-response--tp24081692p24081692.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org