Return-Path: Delivered-To: apmail-pivot-user-archive@www.apache.org Received: (qmail 85383 invoked from network); 23 Mar 2010 12:14:19 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 23 Mar 2010 12:14:19 -0000 Received: (qmail 47066 invoked by uid 500); 23 Mar 2010 12:14:19 -0000 Delivered-To: apmail-pivot-user-archive@pivot.apache.org Received: (qmail 47046 invoked by uid 500); 23 Mar 2010 12:14:19 -0000 Mailing-List: contact user-help@pivot.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@pivot.apache.org Delivered-To: mailing list user@pivot.apache.org Received: (qmail 47038 invoked by uid 99); 23 Mar 2010 12:14:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Mar 2010 12:14:19 +0000 X-ASF-Spam-Status: No, hits=-1.0 required=10.0 tests=AWL,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of gkbrown@mac.com designates 17.148.16.103 as permitted sender) Received: from [17.148.16.103] (HELO asmtpout028.mac.com) (17.148.16.103) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Mar 2010 12:14:12 +0000 MIME-version: 1.0 Content-type: multipart/alternative; boundary="Boundary_(ID_ordf5SZJZhPSY1JClT9mDw)" Received: from [192.168.1.10] (pool-173-76-183-203.bstnma.fios.verizon.net [173.76.183.203]) by asmtp028.mac.com (Sun Java(tm) System Messaging Server 6.3-8.01 (built Dec 16 2008; 32bit)) with ESMTPSA id <0KZQ00FUBHYJO180@asmtp028.mac.com> for user@pivot.apache.org; Tue, 23 Mar 2010 05:13:33 -0700 (PDT) X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 ipscore=0 phishscore=0 bulkscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx engine=5.0.0-0908210000 definitions=main-1003230074 From: Greg Brown Subject: Re: Evaluating Pivot Date: Tue, 23 Mar 2010 08:13:31 -0400 In-reply-to: <168ef9ac1003230458l10c460cdp724f87f080fe6c94@mail.gmail.com> To: user@pivot.apache.org References: <36fe576b1003220503n3b4cff86p8fe28306553fd6a6@mail.gmail.com> <168ef9ac1003230458l10c460cdp724f87f080fe6c94@mail.gmail.com> Message-id: <6BC52395-A475-4CE3-B1A2-CFD7FF3AD269@mac.com> X-Mailer: Apple Mail (2.1077) --Boundary_(ID_ordf5SZJZhPSY1JClT9mDw) Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT This list is similar to what I would have suggested, though I might re-word #5 as "Take advantage of data binding". Using JSON as a data transfer format helps facilitate this, though there are other ways (you can also use data binding to bind to Java beans, for example). I might also re-word #7 as "Take advantage of web queries". They still offer a lot of value to your app even if you don't control both client and server. If you do, then you can also use QueryServlet on the back end as Todd mentioned. Finally, I would add the following: 8) Use Resources to manage the localizable aspects of your app. This suggestion isn't necessarily unique to Pivot, but I find that it is generally easiest to design for localization up front rather than trying to retrofit it later. G On Mar 23, 2010, at 7:58 AM, Todd Volkert wrote: > Hi Shahzad, > > Pivot certainly meets all those key requirements. There have been at least three complex enterprise-level applications built using the Pivot platform (that I know of), though as far as I know, none of them are open source. However, their authors (one of them being me) are all on this user list, so you'd presumably have the benefit of their experience. > > As far as best practices go, that's somewhat specific to the requirements of the application, but I can share some high-level insights that I've gained in writing my Pivot apps: > > 1) Separate your behaviors into Action classes that live in the global action map. This allows you to wire up the actions to your buttons and menu items easily in WTKX and provides logical separation in code. > > 2) Author your UI in WTKX. Some people are against UI construction in XML, but I find that it's a nice fit. > > 3) Use the @WTKX annotation. It helps remove boilerplate clutter from your code. Note, however, that this will require you to either (a) sign your JAR files, or (b) make your @WTKX fields public. > > 4) As of Pivot 1.5 (to be released in the next ~2 months), use the Bindable interface. I wrote my big Pivot apps against Pivot 1.4 (before Bindable existed), and I went with a "manager" concept -- where each WTKX file had a corresponding manager class that populated the UI with data and wired up event handlers. That model worked fairly well, but from what I hear, the Bindable interface is an alternative approach that yields even cleaner code. The gist is that you subclass the root component of your WTKX file and implement Bindable, and that subclass performs the work that would have otherwise been done by the manager. > > 5) Try to deal in raw JSON data (maps, lists, numbers, strings, etc.) only. Avoid having to load data from the server and then translate it into app-specific data model classes, and instead, write custom renderers to render the raw data correctly into your buttons, tables, lists, etc. This allows you to use data binding to directly move the data from the server to the UI. As of Pivot 1.5, the new bind mapping facilities make this even easier (it is possible in Pivot 1.4, but you have to jump through more hoops). > > 6) To reiterate the last point, don't be afraid to write custom data renderers! They're not tough to write (you can typically subclass a component to get the desired behavior), and they allow you to render data in any form straight to the UI. > > 7) If you control both the client and the server, using QueryServlet as the server endpoint provides nice parity with using web queries (GetQuery, PostQuery, etc.) on the client. > > I'm sure there are more, but those are the ones that come to me right now :-) > > Hope that helps, > -T > > On Mon, Mar 22, 2010 at 8:15 PM, Shahzad Bhatti wrote: > I am evaluating Apache Pivot as possible platform for building a trading application. The key requirements for our application are snappy UI, support for multiple windows, charts, real time updates to quotes and other financial data. I would like to know if there are any complex applications that have been built with Apache Pivot especially any open source. I am also interested in best practices behind this platform for building highly interactive applications. Thanks in advance. > > ______________________________________________ > > See http://www.peak6.com/email_disclaimer.php > for terms and conditions related to this email > --Boundary_(ID_ordf5SZJZhPSY1JClT9mDw) Content-type: text/html; charset=us-ascii Content-transfer-encoding: quoted-printable

I might also re-word #7 as "Take = advantage of web queries". They still offer a lot of value to your app = even if you don't control both client and server. If you do, then you = can also use QueryServlet on the back end as Todd = mentioned.

Finally, I would add the = following:

8) Use Resources to manage the = localizable aspects of your app. This suggestion isn't necessarily = unique to Pivot, but I find that it is generally easiest to design for = localization up front rather than trying to retrofit it = later.

G

On Mar 23, = 2010, at 7:58 AM, Todd Volkert wrote:

Hi = Shahzad,

Pivot certainly meets all those key requirements.  = There have been at least three complex enterprise-level applications = built using the Pivot platform (that I know of), though as far as I = know, none of them are open source.  However, their authors (one of = them being me) are all on this user list, so you'd presumably have the = benefit of their experience.

As far as best practices go, that's somewhat specific to the = requirements of the application, but I can share some high-level = insights that I've gained in writing my Pivot apps:

1) Separate = your behaviors into Action classes that live in the global action = map.  This allows you to wire up the actions to your buttons and = menu items easily in WTKX and provides logical separation in code.

2) Author your UI in WTKX.  Some people are against UI = construction in XML, but I find that it's a nice fit.

3) Use the = @WTKX annotation.  It helps remove boilerplate clutter from your = code.  Note, however, that this will require you to either (a) sign = your JAR files, or (b) make your @WTKX fields public.

4) As of Pivot 1.5 (to be released in the next ~2 months), use the = Bindable interface.  I wrote my big Pivot apps against Pivot 1.4 = (before Bindable existed), and I went with a "manager" concept -- where = each WTKX file had a corresponding manager class that populated the UI = with data and wired up event handlers.  That model worked fairly = well, but from what I hear, the Bindable interface is an alternative = approach that yields even cleaner code.  The gist is that you = subclass the root component of your WTKX file and implement Bindable, = and that subclass performs the work that would have otherwise been done = by the manager.

5) Try to deal in raw JSON data (maps, lists, numbers, strings, = etc.) only.  Avoid having to load data from the server and then = translate it into app-specific data model classes, and instead, write = custom renderers to render the raw data correctly into your buttons, = tables, lists, etc.  This allows you to use data binding to = directly move the data from the server to the UI.  As of Pivot 1.5, = the new bind mapping facilities make this even easier (it is possible in = Pivot 1.4, but you have to jump through more hoops).

6) To reiterate the last point, don't be afraid to write custom data = renderers!  They're not tough to write (you can typically subclass = a component to get the desired behavior), and they allow you to render = data in any form straight to the UI.

7) If you control both the client and the server, using QueryServlet = as the server endpoint provides nice parity with using web queries = (GetQuery, PostQuery, etc.) on the client.

I'm sure there are = more, but those are the ones that come to me right now :-)

Hope that helps,
-T

On Mon, Mar = 22, 2010 at 8:15 PM, Shahzad Bhatti <sbhatti@peak6.com> = wrote:
I am evaluating Apache Pivot as possible platform for building a trading = application. The key requirements for our application are snappy UI, = support for multiple windows, charts, real time updates to quotes and = other financial data. I would like to know if there are any complex = applications that have been built with Apache Pivot especially any open = source. I am also interested in best practices behind this platform for = building highly interactive applications. Thanks in advance.

______________________________________________

See  http://www.peak6.com/email_disclaimer.php
for terms and conditions related to this email


= --Boundary_(ID_ordf5SZJZhPSY1JClT9mDw)--