Hi Alex,

DI frameworks has many more things. For example If I configure a model bean
of type ProductModel and give it an id of "productModel", in each class I
declare a
var productModel:ProductModel, the framework will inject it.

With bead/strands we would need to make that in all declarations.
As well, beads/strands seems to be very prepared for MXML but not to be
tweaked in AS3

Other things that never came to Swiz, or other similar frameworks, and I'd
love to see here:
For example if you want to affect various objects of a type a inject some
behavior
(imagine some logging behaviour)

Metadata as well is something very powerful and I expect we could get more
of this in the future
both in compiler and language (like Generics) or in a DI framework

Other thinks I like it is validation based on metadata (like people at
GraniteDS did)
I always thought that old Flex validation was not covering all things, and
I expect to have
validation behaviour attached to the VO, POJO or DTO variable.

IMHO, we should not restrict o simplify this. We should embrace all this
things DI, Annotations/Metadata,
beads/strands,... since each one has its own points and will make FlexJS
something ahead the rest





2017-02-10 20:05 GMT+01:00 Alex Harui <aha...@adobe.com>:

>
>
> On 2/10/17, 4:22 AM, "carlos.rov...@gmail.com on behalf of Carlos Rovira"
> <carlos.rov...@gmail.com on behalf of carlos.rov...@codeoscopic.com>
> wrote:
>
> >I check PureMVC many years ago, and liked it so much. But For me Swiz (or
> >Parsely) has sometihing I can't pass without... Dependency Injection. For
> >me annotations or metadata is a must, not only in this kind of micro
> >architectures, but a must in other type of code.
>
> I've never used DI frameworks so I may be completely off-base, but IMO, I
> wonder if metadata is the best way to do things like DI.  I remember
> discussions among my Adobe colleagues that metadata is becoming a language
> unto itself.  There really is no checking on Metadata by the compiler or
> runtime, so it is essentially as unstructured as JavaScript.
>
> One of the things that beads/strands allows is the "injection" of
> functionality in a way that is checked by the compiler.  If you mis-type
> the name of the bead, the code-hinting and/or compiler will catch you.
> You can use CSS to externalize what beads get applied and the compiler
> will catch you if you mistype what goes in the ClassReference.
>
> Furthermore, I believe it may be faster for the DI engine to examine the
> strand instead of examine the metadata.
>
> So, while it would be great to lower the barriers to migration by porting
> the various Application-level Frameworks from Flex, if you are going to
> write a new DI subsystem, should you consider doing it in a more
> structured way?
>
> Thoughts?
> -Alex
>
>


-- 

Carlos Rovira
Director General
M: +34 607 22 60 05
http://www.codeoscopic.com
http://www.avant2.es

Este mensaje se dirige exclusivamente a su destinatario y puede contener
información privilegiada o confidencial. Si ha recibido este mensaje por
error, le rogamos que nos lo comunique inmediatamente por esta misma vía y
proceda a su destrucción.

De la vigente Ley Orgánica de Protección de Datos (15/1999), le comunicamos
que sus datos forman parte de un fichero cuyo responsable es CODEOSCOPIC
S.A. La finalidad de dicho tratamiento es facilitar la prestación del
servicio o información solicitados, teniendo usted derecho de acceso,
rectificación, cancelación y oposición de sus datos dirigiéndose a nuestras
oficinas c/ Paseo de la Habana 9-11, 28036, Madrid con la documentación
necesaria.

Reply via email to