RE: [flexcoders] Re: dynamically creating children suggestions?

2005-07-22 Thread Robert Brueckmann









Thanks guys for all your feedback. This
list is awesome. Thank MattI 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



Weve discussed something with
another customer recently along the same lines, Ive 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 wont be able to
cache). 



Deferred instantiation is probably not
taking hold in your case because youre explicitly calling createChild
(Im 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 dont think we
document them all that much.



Ive pinged Alex, lets 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_NAMEASSETS/EFL_NAME


EFL_DESCAssets/EFL_DESC


EFL_SORTY/EFL_SORT

 EFL_FILTERY/EFL_FILTER


PRM_TYPE_ID2/PRM_TYPE_ID


PRM_TYPE_NAMENUMBER/PRM_TYPE_NAME


PUI_ID3/PUI_ID


PUI_TYPEMULTILIST/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_NAMEACCOUNT_NAME/EFL_NAME


EFL_DESCAccounts/EFL_DESC


EFL_SORTY/EFL_SORT


EFL_FILTERY/EFL_FILTER


PRM_TYPE_ID2/PRM_TYPE_ID


PRM_TYPE_NAMESTRING/PRM_TYPE_NAME


PUI_ID3/PUI_ID


PUI_TYPETEXTFIELD/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

[flexcoders] Re: dynamically creating children suggestions?

2005-07-21 Thread zhongtie
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_NAMEASSETS/EFL_NAME
 
   EFL_DESCAssets/EFL_DESC
 
   EFL_SORTY/EFL_SORT
 
   EFL_FILTERY/EFL_FILTER
 
   PRM_TYPE_ID2/PRM_TYPE_ID
 
   PRM_TYPE_NAMENUMBER/PRM_TYPE_NAME
 
   PUI_ID3/PUI_ID
 
   PUI_TYPEMULTILIST/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_NAMEACCOUNT_NAME/EFL_NAME
 
   EFL_DESCAccounts/EFL_DESC
 
   EFL_SORTY/EFL_SORT
 
   EFL_FILTERY/EFL_FILTER
 
   PRM_TYPE_ID2/PRM_TYPE_ID
 
   PRM_TYPE_NAMESTRING/PRM_TYPE_NAME
 
   PUI_ID3/PUI_ID
 
   PUI_TYPETEXTFIELD/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=lt; data=1 /
 

mx:Object label=lt;= data=2 /
 

mx:Object label=== data=3 /
 

mx:Object label=gt;= data=4 /
 

mx:Object label=gt; data=5 /
 
   /mx:Array
 
 /mx:dataProvider
 
   /mx:ComboBox
 
   
 
   mx:TextInput id=compVal width=100% /
 
   
 
 /mx:HBox
 
 
 
 mx:HBox width=100% label=range
 
 
 
   mx:Label 

Re: [flexcoders] Re: dynamically creating children suggestions?

2005-07-21 Thread JesterXL
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_NAMEASSETS/EFL_NAME

   EFL_DESCAssets/EFL_DESC

   EFL_SORTY/EFL_SORT

   EFL_FILTERY/EFL_FILTER

   PRM_TYPE_ID2/PRM_TYPE_ID

   PRM_TYPE_NAMENUMBER/PRM_TYPE_NAME

   PUI_ID3/PUI_ID

   PUI_TYPEMULTILIST/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_NAMEACCOUNT_NAME/EFL_NAME

   EFL_DESCAccounts/EFL_DESC

   EFL_SORTY/EFL_SORT

   EFL_FILTERY/EFL_FILTER

   PRM_TYPE_ID2/PRM_TYPE_ID

   PRM_TYPE_NAMESTRING/PRM_TYPE_NAME

   PUI_ID3/PUI_ID

   PUI_TYPETEXTFIELD/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=lt; data=1 /


mx:Object label=lt;= data=2 /


mx:Object label=== data=3 /


mx:Object label=gt;= data=4 /


mx:Object label=gt; data=5 /

   /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

RE: [flexcoders] Re: dynamically creating children suggestions?

2005-07-21 Thread Matt Chotin










Crepes are for weekends



Weve discussed something with
another customer recently along the same lines, Ive 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 wont be able to cache). 



Deferred instantiation is probably not
taking hold in your case because youre explicitly calling createChild (Im
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 dont think we document them all that much.



Ive pinged Alex, lets see if
he comes up with anything



Matt











From: flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com] 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_NAMEASSETS/EFL_NAME


EFL_DESCAssets/EFL_DESC


EFL_SORTY/EFL_SORT


EFL_FILTERY/EFL_FILTER


PRM_TYPE_ID2/PRM_TYPE_ID


PRM_TYPE_NAMENUMBER/PRM_TYPE_NAME


PUI_ID3/PUI_ID


PUI_TYPEMULTILIST/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_NAMEACCOUNT_NAME/EFL_NAME


EFL_DESCAccounts/EFL_DESC


EFL_SORTY/EFL_SORT


EFL_FILTERY/EFL_FILTER

 PRM_TYPE_ID2/PRM_TYPE_ID


PRM_TYPE_NAMESTRING/PRM_TYPE_NAME


PUI_ID3/PUI_ID


PUI_TYPETEXTFIELD/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=lt;
data="" /


mx:Object label=lt;=
data="" /


mx: