incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wael Jammal <w...@rsnewmedia.co.uk>
Subject Re: Flex modularity through composition and interfaces (Dependency Injection)
Date Thu, 05 Jan 2012 21:51:54 GMT
Why not provide a low level API like you say, making MetaData first class
and improving reflection to work more like it does in Java? Json and XML
are just too slow compared to native reflection, I and many others have
built our own DI frameworks docs.bojinx.co.uk <http://docs.bojinx.co.uk>
for example and many os us do it because we are not happy with what
someone else has built, I believe it should remain that way, use what you
are comfortable with and only give the tools required to make it efficient.

Oh and hi Tink :)

Wael

On 06/01/2012 01:45, "Tink" <flex@tink.ws> wrote:

>This is because DI currently happens at runtime not compile time and
>depend on listening to Event.ADDED_TO_STAGE at the capture phase
>(which alone slows things down when I tested it, I can only presume
>these events don't get dispatch if its not listened to, and if you add
>this listener every DisplayObject has to dispatch it, and then when
>you find something that requires injection describeType() is used to
>get a large chunk of XML to inspect to see what needs injecting, if
>anything.
>
>There was some talk a while ago about Metadata becoming a first class
>citizen in Flex, anyone have any more info on this and whether it
>progressed?
>
>The DI frameworks out there remove the things we don't like
>(Singletons etc), but being Singletons etc themselves (i.e. they don't
>remove the nasty stuff from the running code, they just hide it from
>the code you write).
>
>Couldn't we inject at compile time.As the compiler does with other
>metadata it could find injection points, and using Singletons hidden
>behind the scenes to give the correct values to the correct properties
>in the generated code? This would remove the current bottlenecks we
>have with DI.
>
>Tink
>
>
>
>On 4 Jan 2012, at 22:09, Alex Harui wrote:
>
>"And I predict the same with DI.  Injecting everything will slow
>things down
>if you start injecting small things."




Mime
View raw message