Thanks guys for all your feedback. This
list is awesome. Thank Matt…I look forward to hearing anything the guy
you mentioned came up with.
Thanks again everyone!
Robert L. Brueckmann
Senior Web Developer
Merlin Securities, LLC
595 Madison Avenue
New York, NY 10022
p: 212.822.4821
f: 212.822.4820
From: flexcoders@yahoogroups.com
[mailto:[EMAIL PROTECTED] On Behalf
Of Matt Chotin
Sent: Friday, July 22, 2005 12:28
AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] Re:
dynamically creating children suggestions?
Crepes are for weekends…
We’ve discussed something with
another customer recently along the same lines, I’ve put out a feeler to
see if we solved their issue successfully. In theory I would say that you
should be able to solve the problem without resorting to the server (which if
you have a lot of clients hitting concurrently with different data coming back
will be put under a heavier load because it won’t be able to
cache).
Deferred instantiation is probably not
taking hold in your case because you’re explicitly calling createChild
(I’m guessing). If you created object descriptors and then
instantiated the children using them you could probably do a queued policy that
would speed up the responsiveness. The creation of those object
descriptors of course is a little more dicey since I don’t think we
document them all that much.
I’ve pinged Alex, let’s see if
he comes up with anything…
Matt
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of JesterXL
Sent: Thursday, July 21, 2005 7:22
PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re:
dynamically creating children suggestions?
Key point here is the server deals with the processor hit, not the
client.
Secondly, the Flex server has caching built in,
and won't compile the XML
everytime, even if it changes often.
----- Original Message -----
From: "zhongtie"
<[EMAIL PROTECTED]>
To: <flexcoders@yahoogroups.com>
Sent: Thursday, July 21, 2005 10:10 PM
Subject: [flexcoders] Re: dynamically creating
children suggestions?
That way for each different XML, backend Flex
server needs to compile
it into a new swf, which, in my experience, has
been a not so fast
process. Robert's screen is going to hang either
way.
But frankly, I don't have a solution :(
tim
--- In flexcoders@yahoogroups.com,
"JesterXL" <[EMAIL PROTECTED]> wrote:
> If deferred instantation does nothing, and a
Repeater doesn't solve
your woes, then I'd look to doing some lower level
things such as
creating your own UIObjectDescriptors, and
staggering the drawing
algorithm to only process a certain amount of
children to create per
frame.
>
> Stepping back, why not have a server side
process generate the MXML
(since it's just XML to begin with and you are
merely changign the
format), have the server-side component (CF/Java)
write out the MXML,
and then use a Loader to hit the MXML file?
>
> 10 billion more ideas.... of course, Matt'll
put the smack down when
he finishes his tea and crepes.
>
> ----- Original Message -----
> From: Robert Brueckmann
> To: flexcoders@yahoogroups.com
> Sent: Thursday, July 21, 2005 6:10 PM
> Subject: [flexcoders] dynamically creating
children suggestions?
>
>
> I'm getting XML back from the database.
The XML contains a bunch of
elements, all containing children elements that
tell me what type of
component to display, i.e.:
>
>
>
> .
>
> <FILTERSORT>
>
>
<EFL_NAME>ASSETS</EFL_NAME>
>
>
<EFL_DESC>Assets</EFL_DESC>
>
>
<EFL_SORT>Y</EFL_SORT>
>
> <EFL_FILTER>Y</EFL_FILTER>
>
>
<PRM_TYPE_ID>2</PRM_TYPE_ID>
>
>
<PRM_TYPE_NAME>NUMBER</PRM_TYPE_NAME>
>
>
<PUI_ID>3</PUI_ID>
>
>
<PUI_TYPE>MULTILIST</PUI_TYPE>
>
>
<FILTERSORTVALUELIST>
>
>
<PRM EFL_VALUE=" " FFL_DESC=" " EFL_SEQ="0"></PRM>
>
>
<PRM EFL_VALUE="1" FFL_DESC="Cash and Equivalents"
EFL_SEQ="2"></PRM>
>
>
<PRM EFL_VALUE="50" FFL_DESC="Equities"
EFL_SEQ="3"></PRM>
>
>
<PRM EFL_VALUE="10" FFL_DESC="Fixed Income"
EFL_SEQ="4"></PRM>
>
>
<PRM EFL_VALUE="65" FFL_DESC="Futures"
EFL_SEQ="5"></PRM>
>
>
<PRM EFL_VALUE="99" FFL_DESC="Indices"
EFL_SEQ="6"></PRM>
>
>
<PRM EFL_VALUE="60" FFL_DESC="Options"
EFL_SEQ="7"></PRM>
>
>
<PRM EFL_VALUE="95" FFL_DESC="Private Placements"
EFL_SEQ="8"></PRM>
>
>
<PRM EFL_VALUE="75" FFL_DESC="Rights and Warrants"
EFL_SEQ="9"></PRM>
>
>
<PRM EFL_VALUE="70" FFL_DESC="Swaps"
EFL_SEQ="10"></PRM>
>
>
</FILTERSORTVALUELIST>
>
> </FILTERSORT>
>
> <FILTERSORT>
>
> <EFL_NAME>ACCOUNT_NAME</EFL_NAME>
>
>
<EFL_DESC>Accounts</EFL_DESC>
>
>
<EFL_SORT>Y</EFL_SORT>
>
>
<EFL_FILTER>Y</EFL_FILTER>
>
>
<PRM_TYPE_ID>2</PRM_TYPE_ID>
>
>
<PRM_TYPE_NAME>STRING</PRM_TYPE_NAME>
>
>
<PUI_ID>3</PUI_ID>
>
>
<PUI_TYPE>TEXTFIELD</PUI_TYPE>
>
> </FILTERSORT>
>
> .
>
>
>
> So my flex app gets this XML chunk, I loop
through the XML and based
on certain parameters in the example XML above,
and in each loop, I
call createChild on a Form component I have in my
MXML file and I
build a form that displays to the user various
filters they can set
for the report they just selected.
>
>
>
> I'm dynamically generating DateFields,
Textfields, Lists, and a
custom Range component that I created whose MXML
file looks like this:
>
>
>
> <?xml version="1.0"
encoding="utf-8"?>
>
> <mx:VBox xmlns:mx="http://www.macromedia.com/2003/mxml"
width="200"
fontWeight="bold">
>
>
>
>
<mx:Script>
>
>
<![CDATA[
>
>
public var operator:String = "1";
>
>
>
>
function updateOperator(e) {
>
>
operator =
e.target.selectedItem.data;
>
>
}
>
>
]]>
>
>
</mx:Script>
>
>
>
>
<mx:LinkBar width="100%" dataProvider="{rangeStack}"
/>
>
>
>
>
<mx:ViewStack id="rangeStack" width="100%">
>
>
>
>
<mx:HBox width="100%" label="comparison">
>
>
>
>
<mx:ComboBox id="operatorList"
change="updateOperator(event);"
selectedIndex="0" width="50">
>
>
<mx:dataProvider>
>
>
<mx:Array>
>
>
<mx:Object label="<"
data="" />
>
>
<mx:Object label="<="
data="" />
>
>
<mx:Object label="=="
data="" />
>
>
<mx:Object label=">="
data="" />
>
>
<mx:Object label=">"
data="" />
>
>
</mx:Array>
>
>
</mx:dataProvider>
>
>
</mx:ComboBox>
>
>
>
>
<mx:TextInput id="compVal" width="100%" />
>
>
>
>
</mx:HBox>
>
>
>
>
<mx:HBox width="100%" label="range">
>
>
>
>
<mx:Label text="From:" />
>
>
>
>
<mx:TextInput id="fromVal" width="100%" />
>
>
>
>
<mx:Label text="To:" />
>
>
>
>
<mx:TextInput id="toVal" width="100%" />
>
>
>
>
</mx:HBox>
>
>
>
>
</mx:ViewStack>
>
>
>
> </mx:VBox>
>
>
>
>
>
> At any rate.one of the reports the user can
select returns XML that
contains 104 elements, i.e.: 104 various filters
they can set for this
report. Well.needless to say my form takes a
long time to generate
and the browser hangs while it's being
created. I should mention that
when I get the XML from the database and it's sent
to my ViewHelper
class, I use the XMLObjectOutput utility class to
convert the XML to
an object. That part, even for the 104
element XML is SO quick. It's
when the form elements begin to get generated on
the fly is where the
browser hangs. (I've tried removing the
creation of the elements that
require my custom Range form field component and
that holds very
little bearing on the length of time it takes to
dynamically generate
my form, as an aside).
>
>
>
> Is there a more elegant way to dynamically
generate children so it's
not so memory-taxing? Is there a better
approach altogether for this
dynamic generation of children for my Form
component?
>
>
>
> Any help is greatly appreciated.
>
>
>
> Thanks,
>
>
>
>
>
> Robert L. Brueckmann
>
> Senior Web Developer
>
> Merlin Securities, LLC
>
> 595 Madison Avenue
>
> New York, NY 10022
>
> p: 212.822.4821
>
> f: 212.822.4820
>
>
>
>
--------------------------------------------------------------------------------
>
> This message contains information from Merlin
Securities, LLC, or
from one of its affiliates, that may be
confidential and privileged.
If you are not an intended recipient, please
refrain from any
disclosure, copying, distribution or use of this
information and note
that such actions are prohibited. If you have
received this
transmission in error, please notify the sender
immediately by
telephone or by replying to this transmission.
>
> Merlin Securities, LLC is a registered
broker-dealer. Services
offered through Merlin Securities, LLC are not
insured by the FDIC or
any other Federal Government Agency, are not
deposits of or guaranteed
by Merlin Securities, LLC and may lose value.
Nothing in this
communication shall constitute a solicitation or
recommendation to buy
or sell a particular security.
>
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
>
>
>
>
--------------------------------------------------------------------------------
> YAHOO! GROUPS LINKS
>
> a.. Visit your group
"flexcoders" on the web.
>
> b.. To unsubscribe from
this group, send an email to:
>
[EMAIL PROTECTED]
>
> c.. Your use of Yahoo!
Groups is subject to the Yahoo! Terms of
Service.
>
>
>
--------------------------------------------------------------------------------
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links