Return-Path: X-Original-To: apmail-flex-users-archive@www.apache.org Delivered-To: apmail-flex-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3B03410AD4 for ; Fri, 30 Aug 2013 10:51:29 +0000 (UTC) Received: (qmail 49257 invoked by uid 500); 30 Aug 2013 10:51:28 -0000 Delivered-To: apmail-flex-users-archive@flex.apache.org Received: (qmail 49195 invoked by uid 500); 30 Aug 2013 10:51:28 -0000 Mailing-List: contact users-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@flex.apache.org Delivered-To: mailing list users@flex.apache.org Received: (qmail 49183 invoked by uid 99); 30 Aug 2013 10:51:27 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Aug 2013 10:51:27 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of cosmacol@gmail.com designates 74.125.82.175 as permitted sender) Received: from [74.125.82.175] (HELO mail-we0-f175.google.com) (74.125.82.175) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 Aug 2013 10:51:21 +0000 Received: by mail-we0-f175.google.com with SMTP id m46so823892wev.34 for ; Fri, 30 Aug 2013 03:51:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=2KKsk4mWBN4hwTemdOl2ehtkDpCUNOUXbGQi9jbzH7c=; b=n9o2ixYX6CB+2UrZpQ6wsz8igHJxsHCR8jyJHEfKJoKI0XF3f64z4dvs343T/UPxeg muLo5j1urfiPkAQO8u65+L4lZu7dWQjNIhJmBqSs392OEsPJteuX4wT+CBHtvgMf3xZ5 a+VI9RIPt8OLri13hYUz0a2D+EteWNKHdZ6ZET9ciBCpmLcy/uUSum42ICRoQRTQmp7P rs9ccC3ZedYZwJ2TncwcClRM1XncYO5IpIyvIynzhA1B0ip/9190UKowrovK39zRuY4t 7j/dmTN8xUZ9iJr07EZy7GFYvKA9L+OuX8nw33iOeSQc9H5H2JzjAdTKu75yONA6dzgR TCig== X-Received: by 10.180.85.202 with SMTP id j10mr1847652wiz.44.1377859861007; Fri, 30 Aug 2013 03:51:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.194.90.115 with HTTP; Fri, 30 Aug 2013 03:50:40 -0700 (PDT) In-Reply-To: References: <02D37C56-C2EC-48D7-8B0E-E366CE8E4D0E@tanium.com> From: Cosma Colanicchia Date: Fri, 30 Aug 2013 12:50:40 +0200 Message-ID: Subject: Re: Automatically register class aliases To: users@flex.apache.org Content-Type: multipart/alternative; boundary=f46d04428ebe90d67b04e527ff04 X-Virus-Checked: Checked by ClamAV on apache.org --f46d04428ebe90d67b04e527ff04 Content-Type: text/plain; charset=UTF-8 [RemoteClass] does register class alias automatically, but then you have to make sure you have a reference to every class (you had it implicitly calling registerClassAlias), otherwise it won't be picked up by the compiler and won't be there at runtime (that is worse than the risk of forgetting them in your registering classes, IMO). You can use a compiler directive -include-libraries to force inclusion of all these classes (and thus alias registration), if you move all of these "stub/vo" classes in a dedicated library (that is probably not a bad idea itself). 2013/8/29 Alex Harui > It's been a long time since I was in this code and I didn't get to know it > that well, but I thought that the generated valueobject classes had > [RemoteClass] metadata on the class or its internal base class. > > If not, maybe there's a pattern you can use to stick [RemoteClass] > metadata in the valueobject classes. > > BTW, I was last in this code to create a lazy decoder so that objects get > decoded only when actually used. No sense decoding every row if you only > are going to show the first 12. Of course, that assumes you don't need to > compute the sum on every row. > > -Alex > > > On 8/29/13 12:30 PM, "Jesse Ward-Karet" wrote: > > >I'm trying to figure out how to automatically register class aliases for > >all our value objects. Let me explain: > > > >We use Flash Builder's WSDL Data Service utility to generate ActionScript > >value objects and the supporting service classes. > > > >We've found that the web service code that deserializes XML back into > >value objects is incredibly slow and locks up our UI at various times. To > >get around this, we are playing with putting the web service into an > >action script worker that shares the value object class definitions with > >our main project. > > > >To make this work, we need to call > >registerClassAlias('valueObject.modelClass', modelClass) for every class > >that we want to pass back and forth between the worker and host. > > > >This seems to work well enough, put from a code maintenance point of > >view, it's a pain because we have many classes that need to cross this > >boundary. I don't want to have to remember to go back and add class > >registration on either side of the serialization/deserialization boundary > >every time we regenerate classes based on the WSDL (which changes > >frequently). I'm also hesitant to manually add a class registration to > >the value object classes because I'm sure there will be times we will > >forget to do it for new value objects. > > > >Any suggestions how we can automate this process? > > > >And please, we are not able to make major architectural changes, so > >answers that tell me about BlazeDS or switching to JSON, etc are not > >useful. > > > >Thanks! > >Jesse > > > > > > > > --f46d04428ebe90d67b04e527ff04--