Re: Flex modularity through composition and interfaces (Dependency Injection)

2012-01-06 Thread Wael Jammal
Inject on it's own is not that useful imho. When using my container or others I very often make use of Factory, constructor args etc. etc. I am really against any DI added to the flex framework, the framework should provide the layer as it does now for us to build our own implementations. As for

Re: Flex modularity through composition and interfaces (Dependency Injection)

2012-01-05 Thread Tink
On 6 Jan 2012, at 00:12, Douglas Arthur wrote: The one problem I have with Metadata is when doing a code refactor, it does not take into account the Metadata tags. Thus, it's easier to miss changes that should be made to metadata when refactoring. That's to say if the Metadata is more comp

RE: Flex modularity through composition and interfaces (Dependency Injection)

2012-01-05 Thread Douglas Arthur
> From: Tink [mailto:f...@tink.ws] > > On 5 Jan 2012, at 23:48, Alex Harui wrote: > > > Maybe, but you're still using Metadata, for which I am not a fan. > > > > -- > > Alex Harui > > Flex SDK Team > > Adobe Systems, Inc. > > http://blogs.adobe.com/aharui > > > > > But the metadata would be rem

Re: Flex modularity through composition and interfaces (Dependency Injection)

2012-01-05 Thread Tink
On 5 Jan 2012, at 23:48, Alex Harui wrote: Maybe, but you're still using Metadata, for which I am not a fan. -- Alex Harui Flex SDK Team Adobe Systems, Inc. http://blogs.adobe.com/aharui But the metadata would be removed from the final generated AS, just like [Bindable] is and replace

Re: Flex modularity through composition and interfaces (Dependency Injection)

2012-01-05 Thread Alex Harui
On 1/5/12 3:38 PM, "Tink" wrote: > > So, something like, > > [Inject] > private var test:Foo > Maybe, but you're still using Metadata, for which I am not a fan. -- Alex Harui Flex SDK Team Adobe Systems, Inc. http://blogs.adobe.com/aharui

Re: Flex modularity through composition and interfaces (Dependency Injection)

2012-01-05 Thread Tink
On 5 Jan 2012, at 23:12, Alex Harui wrote: You can inject at compile time unless you can only determine what to inject at runtime. Like locales, automated testing engines, themes. There are use cases for both. A good DI implementation will support both. I have a further goal that compile-

Re: Flex modularity through composition and interfaces (Dependency Injection)

2012-01-05 Thread Alex Harui
On 1/5/12 1:45 PM, "Tink" wrote: > > 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 t

Re: Flex modularity through composition and interfaces (Dependency Injection)

2012-01-05 Thread Alex Harui
On 1/5/12 1:51 PM, "Wael Jammal" wrote: > 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? Adobe is donating the Flex framework and not the ActionScript VM. We might be able to modify the compiler to conve

Re: Flex modularity through composition and interfaces (Dependency Injection)

2012-01-05 Thread Wael Jammal
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 for exa

Re: Flex modularity through composition and interfaces (Dependency Injection)

2012-01-05 Thread Tink
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 ever

Re: Flex modularity through composition and interfaces

2012-01-04 Thread Roland Zwaga
>From what I understood about the DI features in the framework in Labriola's talk at the flex summit, these would actually happen at compile-time, so its not the same DI functionality we're used to when building applications (like Parsley/Swiz/Spring/etc). Interesting details by the way about the d

Re: Flex modularity through composition and interfaces

2012-01-04 Thread Jonathan Campos
I'm with you Alex. Definitely hear what you are saying and would like to solve this issue. On Wed, Jan 4, 2012 at 4:09 PM, Alex Harui wrote: > Interfaces, modularity and DI are all good things. But, IMHO, the key > thing > to keep in mind is that we are working in a constrained environment. If

Re: Flex modularity through composition and interfaces

2012-01-04 Thread Alex Harui
Interfaces, modularity and DI are all good things. But, IMHO, the key thing to keep in mind is that we are working in a constrained environment. If you are old enough to have tried to fit a DOS program in 640K, then that's a good analogy to keep in mind. It will all come down to trade-offs. No

Re: Flex modularity through composition and interfaces

2012-01-04 Thread Iwo Banaś
Exactly! But here comes the interfaces gotcha: to benefit from interfaces you can't just add a huge interface for every class, you have to define minimal, simple and implementation independent interfaces and ensure that different part of the framework are communicating using these interfaces. The

Re: Flex modularity through composition and interfaces

2012-01-04 Thread Jonathan Campos
Not sure if that would work but ya, kind of like that. DI could get you there without having to rip apart the core of flex. On Wed, Jan 4, 2012 at 3:35 PM, Roland Zwaga wrote: > Or even better, don't need StyleManager? Throw it out completely and save a > buttload of memory :) > > On 4 January 20

Re: Flex modularity through composition and interfaces

2012-01-04 Thread Roland Zwaga
Or even better, don't need StyleManager? Throw it out completely and save a buttload of memory :) On 4 January 2012 22:31, Jonathan Campos wrote: > The problem gets a bit hairy on parts of the framework that aren't readily > accessible (managers/singletons). These would be the first target for D

Re: Flex modularity through composition and interfaces

2012-01-04 Thread Jonathan Campos
The problem gets a bit hairy on parts of the framework that aren't readily accessible (managers/singletons). These would be the first target for DI, allowing swappable components following good interfaces. Don't like StyleManager? Have a lightweight focus manager specifically for mobile? DI could

Re: Flex modularity through composition and interfaces

2012-01-04 Thread Rogelio Castillo Aqueveque
ooh, I guess I misunderstood the idea of DI, I thought about implementing other parsley/swiz/etc inside the sdk. I'm all for modularity and DI within the framework. R --- Rogelio Castillo Aqueveque roge...@rogeliocastillo.com On 4/01/2012, at 6:25 PM, Roland Zwaga wrote: > I think Michael

Re: Flex modularity through composition and interfaces

2012-01-04 Thread João Fernandes
Rogelio, while there are a lot of DI frameworks out there for AS3, they don't work inside the core of the framework itself and from what I've learned at the Summit, the spoon project could implement it. From what I understood, it's a mix of DI at runtime and AOP with help of the compiler. I'm

Re: Flex modularity through composition and interfaces

2012-01-04 Thread Roland Zwaga
I think everyone's pretty much on the same page as you Mike :) Describing component functionality using sane interfaces will *allow* DI much more easily. If some type of configuration for this can be supported by the SDK, that would be awesome because existing DI frameworks could hook into those so

Re: Flex modularity through composition and interfaces

2012-01-04 Thread Roland Zwaga
I think Michael Labriola has some ideas about modularity and DI within the framework, his idea was definitely NOT to have Flex feature an IoC container like Swiz/SpringAS/SmartyPants etc. The DI features would be focused on framework modularity, not on *application* frameworks. On 4 January 2012 2

Re: Flex modularity through composition and interfaces

2012-01-04 Thread Michael Schmalle
This is just a weird thought and I have no opinion on DI since it's like religion to most. Isn't the idea of OOP polymorphism, and the way you create it is through abstract interfaces? Correct me if I'm wrong here. Maybe I am from another planet but it seems to me, that the strength in Ap

Re: Flex modularity through composition and interfaces

2012-01-04 Thread João Saleiro
Rogelio, I am not saying that the Flex SDK should have a lib for DI (like Swiz or Mate). What I would like was to be able to configure the mappings between the interfaces and objects, so I could easily replace TabNavigator1 with TabNavigator2 touching in code as less as possible. Part of the DI

Re: Flex modularity through composition and interfaces

2012-01-04 Thread Dirk Eismann
true, we may not need a new framework to do DI in Flex, there are plenty of DI frameworks. But what we DO need in the core Flex classes is the ability to inject dependencies directly into the classes instead of having the classes create their dependencies themselves (in worst case statically or in

Re: Flex modularity through composition and interfaces

2012-01-04 Thread João Fernandes
I have to agree with Roland, clearly DI will require good use of interfaces to work, no? If start getting external dependencies properly typed into interfaces is half work done to get basic DI working ,I'm not counting all kind of crazy AOP that could be done on top of it. João Fernandes

Re: Flex modularity through composition and interfaces

2012-01-04 Thread Rogelio Castillo Aqueveque
I agree on modularity, but I reckon dependency injection is a totally different thing which has lots of very good libs out there... not sure if that should be part of the SDK. I believe that the focus should be on splitting the SDK into several modules/libs, then think on interface design. R

Re: Flex modularity through composition and interfaces

2012-01-04 Thread João Saleiro
> I definitely wasn't speaking about refactoring the whole framework to interfaces as a #1 priority. :) I would start by refactoring the full framework ;) and make the core of the Flex SDK smaller and lighter (without loosing it's power), and easier to extend. João Saleiro On 04-01-2012

Re: Flex modularity through composition and interfaces

2012-01-04 Thread Jonathan Campos
zing :) True. Just showing where my focus is I guess. Tunnel vision. On Wed, Jan 4, 2012 at 3:10 PM, Roland Zwaga wrote: > Just chiming in here for a bit :) But, don't DI and and proper interface > design go hand in hand? > > cheers, > > Roland Zwaga > > On 4 January 2012 22:07, Jonathan Campos

Re: Flex modularity through composition and interfaces

2012-01-04 Thread Michael Schmalle
Ok, I'm still getting used to how I am not talking to someone in person here and my statements need to be more detailed. What I meant is setting interface modularity as #1 priority when designing or implementing new features. So the problems are non existent when "new" features are releas

Re: Flex modularity through composition and interfaces

2012-01-04 Thread João Saleiro
+1 I agree with reducing strong-coupled dependencies as the first priority. I would also complement the use of interfaces with: - using dependency injection when possible - splitting the SDK into several libraries - support and advocate the use of Maven for managing dependencies (or something

Re: Flex modularity through composition and interfaces

2012-01-04 Thread Roland Zwaga
Just chiming in here for a bit :) But, don't DI and and proper interface design go hand in hand? cheers, Roland Zwaga On 4 January 2012 22:07, Jonathan Campos wrote: > not sure how much we want to get into this but I disagree. After focusing > on unit testing (making sure we don't break anythi

Re: Flex modularity through composition and interfaces

2012-01-04 Thread Jonathan Campos
not sure how much we want to get into this but I disagree. After focusing on unit testing (making sure we don't break anything) I would think that DI would be most important on an architectural level. On Wed, Jan 4, 2012 at 3:03 PM, Michael Schmalle wrote: > Continuing the thread from "Committer

Flex modularity through composition and interfaces

2012-01-04 Thread Michael Schmalle
Continuing the thread from "Committer duties and information" about setting interface priority to #1 in the future development fo Flex. Mike