[EventListener(type="stateUp", target="target")]public function onStateUp(event:MouseEvent):void {...}
public function ButtonBehavior(){Bind.bindEventListener("stateUp", onStateUp, this, "target");}
private function onStateUp(event:MouseEvent):void {...}
I think you mean increase startup _speed_, decrease startup time. =)
Generally, I'm not in favour of doing something in metadata that can
easily be done in ActionScript, which is more type-checked and
debuggable.
Robert
> To unsubscribe from this group, send email to
> reflex-platform+unsubscribegooglegroups.com or reply to this email with the
> words "REMOVE ME" as the subject.
>
Paul
On Mar 26, 5:39 pm, Tyler Wright <xty...@gmail.com> wrote:
> > [EventListener(type="stateUp", target="target")]
> > public function onStateUp(event:MouseEvent):void {...}
>
> The above looks nicer IMO, but forces you to scope your listeners to the *
> public* namespace, adding API where it shouldn't be added. To me that is the
Our framework too initially had lots of metadata because it makes code
DRYer, makes it easier to read, and makes it more exciting to program
because a little goes a long way (hello dynamic languages). But
eventually it increased the startup time too much. But I really love
the whole metadata thing.
One thing I tried that was decently successful at descreasing startup
time (b/c of the xml parsing and such), was to pre-build all metadata
nodes into Directives (I used Openflux's idea of a Directive), and
added that into the application via a mixin. So you'd have a huge
method something like this:
public static function init(systemManager:*):void
{
var metadataByClass:Object = {};
var metadata:Object = {};
var directivesByTag:Object = {};
var directives:Array = [];
var tag:String = "EventHandler";
var directive:EventHandlerDirective = new EventHandlerDirective();
directive.dispatcher = "component";
directive.handler = "myHandler"
directive.priority = 10;
directives.push(directive);
metadata[tag] = directives;
// ...
metadataByClass["mx.controls.Button"] = metadata;
MetadataManager.metadataByClass = metadataByClass;
}
All that was generated by hacking MXMLC trace output using Project
Sprouts in Ruby, so I could run a basically headless app, process all
my components using the MetadataManager class, and print out
actionscript code into that MetadataMixin.init method. I'd use that
for deployment to cut down on startup costs by a decent amount.
It also cut out having to deal with XML entirely. But Flex would
still use it's own DescribeTypeCache, so it was kinda pointless there,
but with Reflex, if there were no describeType calls, it might help.
But it doesn't get rid of the "keep objects in memory" part.
What would work, however, that would give us the best of both worlds,
is customizing the compiler. If all metadata was defined in such a
way that it mapped directly to a small actionscript code block, then
you could convert metadata into pure actionscript at compile time (say
only for Production mode). This way [Bindable] would be converted to
getters/setters with dispatchEvent, [EventHandler] would be converted
to "addEventListener", etc. That wouldn't be too hard to implement.
I even think one could rebuild the MXMLC compiler in ruby (or at least
a low-level wrapper for it).
Metadata gives you a huge productivity and confidence boost when
programming, but it comes at a performance cost. The performance cost
could be mostly eliminated if all metadata could be mapped directly to
actionscript code, which it should be able to.
Just some thoughts,
Lance
On Mar 26, 5:13 pm, craig w <codecr...@gmail.com> wrote:
> +1 for what Mr. Signals, I mean Robert, said.
>
> On Fri, Mar 26, 2010 at 6:43 PM, Robert Penner <i...@robertpenner.com>wrote:
>
>
>
> > > If we were to take metadata out completely of the core of Reflex we would
> > increase startup time
>
> > I think you mean increase startup _speed_, decrease startup time. =)
>
> > Generally, I'm not in favour of doing something in metadata that can
> > easily be done in ActionScript, which is more type-checked and
> > debuggable.
>
> > Robert
>
Cheers,
Baz
Cheers,
Baz
j
ps. Robotlegs uses some metadata, but also has a way of suppling the required meta-info via XML. I wrote a small utility which looks at the source as files and generates the XML. While this isn't ideal, it was a way to get Robotlegs working with the Flash IDE.
So I had to really sit down and be like "sigh, we're gonna have to
manually add and remove the event listeners in those 60 behaviors,
manually set up those [ModelContract]'s, etc. Are we cool with
that?" All I was thinking about was Spark's "partAdded/partRemoved"
methods, which are exactly that: add listeners and set properties in
the first, remove them in the second. Writing them is just too
repetitive. The only thing that was motivating about that shift away
from metadata was the startup performance gain. But to be honest, I
was looking into the Flex compiler for a few weeks to see if I could
add custom extensions that would convert metadata to raw Actionscript
because that would've been more fun than removing the metadata.
Metadata is just so clean and so clear. Never ended up going the
compiler route b/c it was a little too involved :), but if there is
one thing that I think would solve this problem completely, it would
be the ability to write custom compiler extensions in a day that would
convert metadata into code. If I had that, man, metadata would be
even more powerful.
Here's a random article somewhat related that just reminds me how neat
metadata or "magic" is:
http://yehudakatz.com/2009/06/04/the-importance-of-executable-class-bodies/
While Actionscript doesn't have executable class bodies and isn't a
dynamic language, Metadata kind of makes it like so. I like that.
I vote for the compiler extension and Flash Pro compatible swcs.
Best,
Lance
On Mar 29, 8:25 am, Ben Stucki <benstu...@gmail.com> wrote:
> Hi all. This is an issue we've debated a lot since the very inception of the
> framework, and each of us on the team have been back and forth on it
> individually. After taking some time to really think it through I have to be
> in favor (strongly in favor) of using metadata. As Baz inadvertently pointed
> out, most projects with such a high focus on being light-weight become
> relegated to specific outside use cases. That's not what we want for this
> framework. We want to make something everybody will use, and we believe that
> our other goals do not have to impact features or workflow. Usability is
> also a high level priority for us.
>
> *Metadata & Magic*
> Take a moment to think about the ideal workflow for creating a behavior. If
> metadata and the inline code were on equal size and performance terms, which
> would you really prefer? If you haven't looked at these workflows you might
> need to.
>
> Here's a behavior with metadata:http://github.com/benstucki/reflex/blob/master/src/reflex/behaviors/S...
> Here's the same behavior with inline code:http://github.com/jacwright/reflex/blob/master/src/reflex/behaviors/S...
>
> I'm going to guess that you prefer the metadata, and I'll tell you why. I
> think whether or not you use metadata there is still going to be magic in
> these classes. Which is to say that what's going on under the hood is
> largely hidden. If there were no magic for example, you would be required to
> manually add/remove all listeners each time the host component is changed,
> or the host component's skinPart or variable... etc. Understanding this
> magic might be somewhat strait-forward for us on the list because we could
> code it ourselves, but that's not true for most of the people we want using
> the framework. Now I think the difference between inline and metadata is how
> that magic is documented. Using metadata makes the magic self documenting,
> and therefore easier to understand. Inline code sends the magic down into an
> api call, which is more difficult to understand. Now I definitely don't like
> metadata for everything, but it is perfectly suited for this.
>
> *Alternatives*
> > On Mon, Mar 29, 2010 at 7:09 AM, Andrew Westberg <andrewwestb...@gmail.com
> > > wrote:
>
> >> To expand on what Velo said...
>
> >> If you want take metadata tags and turn it into AS3 code, you specify that
> >> compiler extension's jar file on the cmd line. If you want to keep the
> >> metadata or do X with it, you can specify another.
>
> >> While we haven't coded up the actual extension code yet, we have enough to
> >> send to adobe so the proper hook can be in place for the next compiler
> >> release.
>
> >> -Andrew Westberg
>
> >> On Mon, Mar 29, 2010 at 9:02 AM, Marvin Froeder <velo...@gmail.com>wrote:
>
> >>> Guys, what about an metadata that is processed by the flex compiler and
> >>> then turned into the target as3 code?
>
> >>> Andrew and I have patched flex SDK to allow you adding (or even removing)
> >>> metadata extensions.... that way you could enable metadata for those (like
> >>> me) who prefer the metadata way and the programmatic version for those (like
> >>> Jos) who can't use metadata for some reason.
>
> >>> What do you think? We should be submitting the patch to Adobe soon.
>
> >>> VELO
>
To unsubscribe from this group, send email to reflex-platform+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
So I had to really sit down and be like "sigh, we're gonna have to
manually add and remove the event listeners in those 60 behaviors,
manually set up those [ModelContract]'s, etc.
As Baz inadvertently pointed out, most projects with such a high focus on being light-weight become relegated to specific outside use cases.
Glad I could help, haha. Just out of curiosity, is it because you consider TCL a fringe project?As Baz inadvertently pointed out, most projects with such a high focus on being light-weight become relegated to specific outside use cases.
To unsubscribe from this group, send email to reflex-platform+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
To unsubscribe from this group, send email to reflex-platform+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
I haven't come to that conclusion. You've come to that conclusion and that's fine, but I don't want to be rolled into the we category.
I'm not sure why we're sacrificing the best workflow right now for performance which we haven't tested or validated yet?
Let's use the best workflow until we know what the trade off is - or until someone even has a use case where they're not happy with performance. We're not only optimizing too early here, but we've made it harder to use in the process.
I said I would wait to see what the inline code looks like, because I'm all for speed and performance. I saw it, and I think we should keep moving forward with metadata. I don't think we can afford to lose broad adoption now for Flash IDE people who aren't even using the framework yet! Is Grant using the framework? No. Will he ever use it if nobody else does? Probably not. Will we have support for use in the Flash IDE by the time he does? Yeah, probably.
I'm in favor of using metadata now to show ease of use and to not require code changes when the compiler modifications come in.
True. Most of these people probably don't attend 360Flex where most of
the awareness of Reflex started. We need to get to FITC or similar
things. We will also need to be a little more filled out since they
would likely use it but not as likely code on the core.
If you think about it, the Flash IDE users have no alternatives for
robust components with layout and all that. We have Flex at least. I
would speculate a bigger splash with that group than with Flex devs.
> The idea that bindProperty is more difficult to understand might
> also be an assumption, but then why do you prefer metadata if not
> because it's easier to understand? I would argue that it's more
> intuitive for wiring and magic to have explicit properties
> (type="pess", target="thumb" as opposed to just method("click",
> thumb)) and it's also less error prone to have the metadata
> annotated to the function/property involved (it's easier to
> recognize when you've missed something). I don't think this is
> purely personal preference (I think there is a quantifiable
> distinction), but how do we validate it? We'd have to do user
> studies or something.
I meant they'll need to look at tutorials to build a behavior in
either case. I don't think one or the other helps to teach behavior
building without docs of some sort. But yes, metadata does look nicer.
Personally I would like to be able to use Reflex in Flash IDE
projects. We can make a case against it if we feel metadata is more
important.
Jac
My comment about magic was really this: The bindings and listeners are
generated through reflection, which happens in the constructor of
Behavior. Therefore a developer must know about and extend from the
base Behavior class. If a developer tries to write an IBehavior
without extending Behavior, all their previous knowledge about
supported metadata is useless. If that's the case, why have an
IBehavior interface in the at all? If the choices are Metadata that is
processed in the constructor, or no metadata and we force developers
to learn the inner workings of the binding API, I'd to choose the
latter because I love polymorphism.
I see at least two solutions to the issues I have w/ metadata. One, a
custom compiler which generates AS3 on any class that declares this
metadata. Only problem with this is I don't know if we can guarantee
everyone using Reflex will be using this custom compiler.
The second solution is Injector-like functionality in
CompositeBehavior. I know it's not perfect. For one, it would add one
more step between adding a Sprite as the target for behaviors. But if
CompositeBehavior behaved like the Injector in RL, you could support
metadata and still keep things kosher w/ polymorphism.
Paul
> > On Mon, Mar 29, 2010 at 10:46 AM, Ben Stucki <benstu...@gmail.com> wrote:
>
> >> I haven't come to that conclusion. You've come to that conclusion and
> >> that's fine, but I don't want to be rolled into the we category. I'm not
> >> sure why we're sacrificing the best workflow right now for performance which
> >> we haven't tested or validated yet? Let's use the best workflow until we
> >> know what the trade off is - or until someone even has a use case where
> >> they're not happy with performance. We're not only optimizing too early
> >> here, but we've made it harder to use in the process.
>
> >> I said I would wait to see what the inline code looks like, because I'm
> >> all for speed and performance. I saw it, and I think we should keep moving
> >> forward with metadata. I don't think we can afford to lose broad adoption
> >> now for Flash IDE people who aren't even using the framework yet! Is Grant
> >> using the framework? No. Will he ever use it if nobody else does? Probably
> >> not. Will we have support for use in the Flash IDE by the time he does?
> >> Yeah, probably.
>
> >> I'm in favor of using metadata now to show ease of use and to not require
> >> code changes when the compiler modifications come in.
>
> >> - Ben
>
> >> On Mon, Mar 29, 2010 at 11:20 AM, Jacob Wright <jacwri...@gmail.com>wrote:
>
> >>> I think there is no question about whether metadata is nicer to use. The
> >>> only question is whether it is worth it. I believe we've come to the
> >>> conclusion that it is currently not worth it, if not for the performance
> >>> issue for the Flash IDE compatibility.
>
> >>> In the spirit of open source with release early release often<http://en.wikipedia.org/wiki/Release_early,_release_often> I
> >>> think we should go without metadata right now until we are able to finalize
> >>> a suitable alternative with a custom SDK or extensions to the existing SDK.
>
> >>>> So I had to really sit down and be like "sigh, we're gonna have to
> >>>> manually add and remove the event listeners in those 60 behaviors,
> >>>> manually set up those [ModelContract]'s, etc.
>
> >>> The binding methods hide the complexity of adding and removing event
> >>> listeners. See my post about building behaviors<http://jacwright.com/blog/407/how-to-build-a-behavior-in-reflex/>
Hey Baz. Sorry about that.
| You are alone in the believe that the use of metadata directly effects the broad adoption of Reflex.You are alone in the omniscience to make such a statement, but I'll continue to stand by my belief. Thanks.
| However I think there should be a clear distinction about now and finally.The problem with now and finally is that we are pushing for adoption now. When people look up Reflex they see examples from now. When they look it up in two years they get the same examples from now (even if there are new ones). I've been down this road a few times, and honestly I'm just trying to protect the project from the assumptions people make of it.
| Lance already cited real performance issues using OpenFlux. We have already admitted to the added file-size as well.True and I certainly don't doubt there is impact, but what is it? Are we assuming nothing else impacted Lance's project? What are the numbers? We're making broad decisions here! + this is a now issue and can be resolved with the compiler. Is this performance issue going to effect people before we can modify the compiler?
| if the decision is to have a dependency on compiler hooks then we're wasting time with monkey patching solutions.I think we should distribute with a modified compiler as a fully self contained sdk. I thought we already made that decision, yes. I think the monkey patching work is important as a first step to understanding our flex & compiler touch points.
| I'm against using metadata because it forces my event listeners to be publicWe can use a custom namespace purely to protect the functions, and I'm all for that. It's not my favorite either, but it's simply lower than ease of use (and yes, adoption) on my list. If we eventually decide not to use runtime metadata (only compile time injection), then this might become a non-issue.
To unsubscribe from this group, send email to reflex-platform+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
- Affecting API: is having public event handlers a reason to abandon metadata? If not, is a custom namespace an acceptable work-around?
- Performance or custom compiler: is startup performance (for larger projects? and mobile apps) a reason to abandon metadata, or is requiring a custom compiler to counter startup performance a reason to abandon metadata?
- Flash IDE support: is support for using Reflex components/behaviors in the Flash IDE a reason to abandon metadata?
To clarify one point... If our compiler hooks get accepted into the 4.1 SDK, there is NO NEED to distribute a custom SDK with reflex. All we'd have to ship is a single JAR file that is specified on the cmd line to mxmlc as follows:-compiler.extensions.extension=ReflexExtension.jarI'd also like to submit a separate patch to Adobe that will add extension support to their ANT tasks so that they can be specified directly in your build.xml. Velo has already added this type of capability to Flex-Mojos for the Maven kids.We WOULD have to ship a custom sdk UNTIL Flex 4.1 is released. So this is a temporary thing.
- Affecting API: is having public event handlers a reason to abandon metadata? If not, is a custom namespace an acceptable work-around?
- Performance or custom compiler: is startup performance (for larger projects? and mobile apps) a reason to abandon metadata, or is requiring a custom compiler to counter startup performance a reason to abandon metadata?
- Flash IDE support: is support for using Reflex components/behaviors in the Flash IDE a reason to abandon metadata?
- Performance or custom compiler: is startup performance (for larger projects? and mobile apps) a reason to abandon metadata, or is requiring a custom compiler to counter startup performance a reason to abandon metadata?
I think all can be supported, so you can use API, or compile time metadata or runtime metadata.....
To unsubscribe from this group, send email to reflex-platform+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
When I started using Openflux, I had already spent a few months using
Mate, and studying the DocumentBased example source code (http://
mate.asfusion.com/assets/content/examples/baseDocument). In there I
saw BindingUtils everywhere and it took me probably a solid two weeks
to figure out what was going on with that. After I realized how to
use it, it opened up a whole new realm of possibilities, I could do
programmatic binding! Then I checked into Mate's source and saw that
their entire library was built around basically that one method. It
took about 2 weeks to understand how that method worked (and I had to
start digging into the Flex SDK), but the experience was very
exciting. Same with Flight a while later. I saw the programmatic
binding and I was like "yeah! this is sick". But when it got down to
it, I always had the urge to try to abstract out the direct method
calls into metadata annotations. And the rest of the people I work
with who don't dig into the source code of these projects still don't
understand BindingUtils. But they understand and love metadata.
As a side note, that DocumentBased example is about the most complex
example project I've seen in Flex. I think it alone paved the way for
Mate's initial popularity of the "framework" market (http://
oreillynet.com/pub/pq/196). Check out the Mate forums and see how
many questions people asked about it and how thankful they were to
have such a thorough and advanced project to start from as they
experimented with a new framework.
But back to Openflux, when I first saw the metadata, I was like "no
way! this is soo easy!". Then I ran the sample applications and I had
3D layouts with hardly any code. I was stoked. Then I tried to
implement my own controllers: transformation controllers that work
just like Jack's TransformManager (http://www.greensock.com/
transformmanageras3/). I started coding but there was instantly a
huge barrier, "so [ModelContract], what is that?". And
[EventHandler], how does that work, does it do everything I want it
to? Why isn't this working? how does metadata work anyway?" Those
were my first questions. There not being any group or real
documentation, I just started digging into the code. And let me tell
you, it was tough. First I had to figure out all the keywords I
needed to know to learn things in this new field of metadata
(directive, annotation, reflection, dynamic programming...), then I
had to follow the flow in the code a hundred times until it finally
clicked. And there was nothing out there on "Actionscript Reflection"
that popped up in google. But now it's like second nature and I'd
never go back to no metadata. But it probably took a month to get a
solid grasp of how metadata worked on the inside.
So for newcomers to the project, my feeling is as long as there's
thorough documentation, a ton of examples, and lots of support, any
path will be fine (BindingUtils, Bind, [Bindable]), because all of
them are equally complex from a newcomers perspective, especially if
they want to work on the source code. I'd say though that if you
never want to learn the source of the code base you're using, most
people I've interacted with prefer metadata.
> - Affecting API: is having public event handlers a reason to abandon
> metadata? If not, is a custom namespace an acceptable work-around?
If there is a page on the site that says "Reflex has chosen to build
event handlers like X, and the pros and cons are Y", then the average
Actionscript person wouldn't think twice. The hardcore guys that
stick to best-practices and don't use public handlers I think would be
fine in writing the few extra lines of `use namespace metadata` or
whatever, for a custom namespace. I love doing that, it makes the
code more semantic in my opinion.
My vote: Opt-in Custom Namespace, public by default.
> - Performance or custom compiler: is startup performance (for larger
> projects? and mobile apps) a reason to abandon metadata, or is *requiring
> * a custom compiler to counter startup performance a reason to abandon
> metadata?
I think all metadata should be converted into pure Actionscript with a
custom compiler. I think the idea of a custom compiler sounds scary
(at least to a newcomer), is because there's no one blogging about it
in the Flex world, except like the Flex Mojos guys but that's so
disconnected from what I do. If people like you guys and Doug McCune
and Lee Brimelow started blogging about it as if it were just one of
those things you needed like TextMate or Github, I think it would be
just a normal part of the initial setup. It only takes like a minute
to install, and if there were video tutorials, it'd be fun. But only
if the custom compiler allows me to write custom metadata
processors :D without learning the whole of Java.
My Vote: Custom Required Compiler and lots of inspirational bloggers
using it.
> - Flash IDE support: is support for using Reflex components/behaviors in
> the Flash IDE a reason to abandon metadata?
I haven't known anybody that uses this, it'd be interesting to know
the stats. I think a custom SWC is way better than abandoning
metadata. If metadata were cut out, I know I would be discouraged
from contributing. I'd probably fork your guys' project and add
metadata :p.
My Vote: Custom Required Compiler and Custom SWCs
I most enjoy using metadata while coding and would do whatever it took
to make metadata be converted into something that worked universally
rather than cutting it out for compatibility.
Best,
Lance
Metadata through custom compiler! Wooo!
Yes, I think this is our best option as it lets us use metadata AND support Flash Pro users. All remaining alternatives are Flash Pro vs. Metadata (and I'm not sure I'm willing to sacrifice either one).
Custom compiler seems to solve all problems except for the biggy: Flash IDE support. I don't know much about Flash IDE, but is there no way to influence or change that compiler too?
But only
if the custom compiler allows me to write custom metadata
processors :D without learning the whole of Java.
Then Flash IDE person can go for this solid API.
To unsubscribe from this group, send email to reflex-platform+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
To unsubscribe from this group, send email to reflex-platform+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
So we're planning on distributing a Reflex SDK 4.0.x in order to build reflex projects? And a swc for those who don't want that? Is this what the group wants? (just want to verify, seems like a bigger decision in the product's future than whether to use metadata in behaviors or not)
JacTo unsubscribe from this group, send email to reflex-platform+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
I’m using SourceMate, it does validate metadata and any custom metadata you want. I also uses code completion.
It will also put error marks in the Problems view if the metadata is not correct.
Mike
So we're planning on distributing a Reflex SDK 4.0.x in order to build reflex projects? And a swc for those who don't want that? Is this what the group wants? (just want to verify, seems like a bigger decision in the product's future than whether to use metadata in behaviors or not)
JacTo unsubscribe from this group, send email to reflex-platform+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
So we're planning on distributing a Reflex SDK 4.0.x in order to build reflex projects? And a swc for those who don't want that? Is this what the group wants? (just want to verify, seems like a bigger decision in the product's future than whether to use metadata in behaviors or not)
If you don't wanna the extra jar, got the API way. No body is pointing an weapon onto user head to use metadata...
To unsubscribe from this group, send email to reflex-platform+unsubscribegooglegroups.com or reply to this email with the words "REMOVE ME" as the subject.
Thoughts on what we should do now while we wait? I want the project to continue forward whether it's a custom SDK now or whatever. I still don't feel great about it, but I'm willing to go with the community of course. I'll shout-out to everyone who isn't following the thread too.
Thoughts on what we should do now while we wait? I want the project to continue forward whether it's a custom SDK now or whatever. I still don't feel great about it, but I'm willing to go with the community of course. I'll shout-out to everyone who isn't following the thread too.I say leave it for now, we can refactor either direction later. We'll continue using the metadata on public listeners and keep describeType and focus on building the components. Changes will be easy. There are pros/cons on both sides and we really ought to let CS5 come out first before we get too excited about any solutions. I have a feeling there will be some significant changes to the way we see things today.
I have worked on my fair share of components, framework, and open
source libraries, so I very much understand the current crisis.
Developing public code is about trade-offs: Simplicity or robustness?
Performance or abstraction? Familiarity or innovation?
I would start by asking, "what makes Reflex valuable and unique?".
Flex provides a robust, widely adopted UI framework with decent
tooling support - with framework caching, it's even fairly small.
Minimal offers an extremely lightweight, extensible component set for
Flash and ActionScript projects. Simply targeting the gap between them
isn't very compelling.
In watching Reflex, the potential that interested me was in an
approachable, cross-IDE UI Framework with a balanced feature-set and
footprint, and a lot of transparency / extensibility.
In my opinion, relying on meta data and compiler extensions eliminates
most of those value propositions. It makes Reflex IDE specific. It
raises the barrier to entry (I would be unlikely to install a compiler
extension to use Reflex). It makes the framework more opaque, and
therefor harder to extend.
My proposal to you, would be to focus on a strong pure AS
implementation, then decorate it for each environment. Layer on Flash
Pro component support, MXML support, and metadata shortcuts. Take
advantage of the strengths of each environment, but don't create
dependencies on them. Ensure that when you document these IDE specific
approaches, that you always provide a code snippet demonstrating how
to achieve the same thing with AS. Magic is great, so long as it comes
with a manual.
Being able to move UI from Flash Pro to FlashBuilder and vice versa is
a huge value proposition, and should help you drive adoption. It's
also worth noting that supporting both IDEs quadruples (at least) your
potential user base versus just supporting FlashBuilder.
This approach provides you with a strong philosophy for Reflex: "One
UI framework, everywhere." It maintains a completely transparent (and
portable) core of pure ActionScript, while leaving you free to provide
IDE specific workflow enhancements.
It also helps guide discussions around proposals like compiler
extensions. If part of your group wants to pursue that avenue,
encourage them to do so. So long as they don't alter the ActionScript
core, you risk nothing (except their time). If they are successful in
convincing Adobe to incorporate their changes, you may have a great
workflow story for FlashBuilder. If not, then your users are free to
choose whether they want to install a custom compiler extension, or
simply work with your ActionScript / MXML layer.
I'd write more, but I don't have a lot of free time at the moment.
Hopefully this has been helpful.
Reflex is looking great, and I wish you all the best with it.
Cheers,
Grant Skinner
gskinner.com
| I would start by asking, "what makes Reflex valuable and unique?"Reflex is, primarily, a Flex framework replacement. What makes Reflex valuable is that it provides a much better workflow for building Flash/RIA components. Everyone who works with Flex loves it at times and wants to throw it out a window at others. Some of these pain points are fundamental to Flex's architecture, and so we are building a community driven alternative that makes it easier to do the types of customizations required in real-world projects.
| ... Simply targeting the gap between them isn't very compelling.I agree, but I don't think that's what we're doing. We intend to offer components fairly close to the size of Keith's that offer features comparable to Flex. So in that line of thinking we're really not in-between them. We're encompassing a lot of common ground on both sides. We're doing this using a pay-as-you-go model, so some features may add weight but only if you use them in your project.
In addition to fixing the light-weight vs. features debate, we feel like this project can bridge the gap between purely Flash devs and Flex devs. I think a lot of what caused this divide is the abstraction that Flex builds around the Flash APIs and the fact that it's an all-in system (you're forced to cope with every aspect of Flex to use almost any part of it). In contrast Reflex is staying very close to the Flash APIs, and many pieces of Reflex can be used independently of the whole. It feels a lot more like a Flash library.
| My proposal to you, would be to focus on a strong pure AS implementation, then decorate it for each environment.I'm scared of this approach only because we hope to create a work-flow where even custom built pieces are reusable across all environments. The meta-data does cause a hiccup in this, because for items to be used in Flash they would have to be provided as a swc. However, using custom decorations for each environment would further enforce the segmentation we're trying to bridge.
| Being able to move UI from Flash Pro to FlashBuilder and vice versa is a huge value proposition, and should help you drive adoption.I agree, and I think it is a primary goal. I'm not convinced it's time to give up on the meta-data just yet though. It's also important for us to preserve the improved work-flow we offer over Flex, and meta-data is a big part of making that approachable.
The way I think of the custom compiler is as an inconvenience to FlashBuilder users for the benefit of getting to use meta-data. If we force FlashBuilder (and FDT, etc) users to have the custom compiler, then any swc would be usable in Flash Pro. We can even output the interim AS3 for use in Flash Pro. I feel like this is pretty close to your goal of having an AS3 core with custom work-flows for separate tools, but I may be entirely off base.
I understand why you want to do it, but I agree with Grant in that it raises the barrier to entry in a significant way.
As a flash dev, I think the idea of using a framework that requires a custom compiler would be a show-stopper for me. Getting what I needed from a SWC in Flash Pro might be alright. As a flex dev and FDT user, a custom SDK or monkey patches would not be a huge hurdle. As a potential contributor to the framework, I'm not enthusiastic about anything that requires a compiler hack. I understand why you want to do it, but I agree with Grant in that it raises the barrier to entry in a significant way.
I think we still have a misunderstanding with regards to what we're planning for with the compiler. We're NOT going to have a custom compiler. Maybe for the first few alpha releases where it's just the uber-coders working with it, but definitely not beyond that.You'll specify an extra compiler option that will point to a .JAR file. I don't see how this is really raising the bar of entry any more than someone who needs to specify a flex app background color for the compiler... -default-background-color=0x666666And you'd have to download a .swc _and_ a .jar file, so maybe you'd be raising the bar an inch or so. I don't see this as any more difficult than people who at one time had to specify -keep-as3-metadata to use certain frameworks. They seemed to manage just fine.
I also think this unnecessarily segregates behaviors into those that
can be used by source and those which have to be used from a SWC. If I
write and release the source of a behavior (that uses metadata), Flash
Pro devs won't be able to copy and paste the code from my blog into
their project, they'll be forced to download and include another
library. Which means I'll be forced to actually compile a library.
Which is probably a pain in the ass, because I probably developed that
behavior to work for one of my projects and not because I'm writing an
awesome behavior library.
Paul
--
To unsubscribe, reply using "remove me" as the subject.
To me, the blog post might not exist without meta-data in the first place because behaviors would become much less trivial to write
Exactly right. Flash devs don't even know about metadata (for the
most part). Metadata is a cool trick, but it really isn't my
favorite. There is something to be said for the IDE functions that
auto-complete event types and auto-generate event handlers. When
using FDT, this is a no-brainer, and meta-data actually feels clumsy
by comparison.
1. I totally get that some people might favor the inline code, and that's awesome. It will still exist, and you can still use it. We're not taking it away from you. Just understand that there are others with the opposite opinion and they favor meta-data quite strongly. We want them to use the framework too.
2. I'm not sure the auto-completion argument holds up that well for behaviors since the target is generically typed. Most of the wiring revolves around this, so we might not see a lot of language intelligence there. We might actually have to use HostComponent metadata for the tooling to give us better auto-completion, but it's yet to be seen. Also, I thought someone said FDT had excellent auto-complete for meta-data - maybe that was a different tool though?
3. Are you planning to checkout Reflex from version control and use it purely in Flash Pro? You've already said you prefer FDT, and we have a solution for compiling source on that.
1. I totally get that some people might favor the inline code, and that's awesome. It will still exist, and you can still use it. We're not taking it away from you. Just understand that there are others with the opposite opinion and they favor meta-data quite strongly. We want them to use the framework too.
Another way of putting it, if we don't use metadata Ben will divorce us! ;)
Please don't forget to also try counselling - it could be revealed that a suppressed metadata-related memory from childhood could be playing a part...