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