> WHat is the advantage does returning typed objects give ? 
> One I can think of is knowing any invalid field access at compile
time. Is there any other advantage?

 

The other advantage is performance. Property access on a typed object is
much faster than on a plain Object. The former is done by numeric offset
(e.g., fetch four bytes starting 12 types from the beginning of the
object), while the latter is done by looking up the property name in a
hash table.

 

> Isn't adding many  DAOs in flex side would mean increase in SWF file
size ?



Yes, it will increase SWF size. You get to decide whether it's worth it.

 

- Gordon

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of java developer
Sent: Friday, January 12, 2007 9:16 PM
To: [email protected]
Subject: [flexcoders] More classes mean bigger SWF file ?

 

Hi All, 

I am learning flex and was trying the RemoteObject to interact with
backend Java layer.
I am creating ActionScript counterparts for all my (DAO)Java Beans and
letting the flex do 
the serialization/deserialization. 

The objects being returned are all "typed".

Now as I understand, if I don't have "typed" return types from my
methods in the backend java layer
and I get Object as Associate Arrays in the client (flex) side. 
Since I can access the fields of this object using the associative array
syntax 
object.fieldname which is the same if I have had an actually Typed
object. 

WHat is the advantage does returning typed objects give ? 
One I can think of is knowing any invalid field access at compile time.
Is there any other advantage?

Isn't adding many  DAOs in flex side would mean increase in SWF file
size ?

Thanks



 

Reply via email to