> 1) IDE metadata like [Inspectable] that the IDE uses to do its job and
> generally does not end affect compiler output or end up in the output.
>

IMO, this is the less valuable kind of metadata, since does not serves a
final output purpose, and implies support in IDEs.


> 2) Compiler directives like [Bindable] and [ExcludeClass] which affect
> what the compiler (including the ASDoc compiler) generates.  [Bindable]
> also ends up in the output, IIRC.
>

This's needed. For example, [Bindable] must be the metadata with most % of
use by all flex developers in all kind of projects.

based on this list of available flex metadata
http://help.adobe.com/en_US/flex/using/WS2db454920e96a9e51e63e3d11c0bf680e1-7ffe.html

This is the list I use most of the time:

Bindable
DefaultProperty
Event
HostComponent
RemoteClass (other key point in Flex technology -> AMF support over JSON)
SkinPart
SknState
Style
Transient

Maybe this could represent the 50% of metadata use in some flex app



> 3) Other metadata.  They don't affect what the compiler outputs and are
> used at runtime.
>

This's needed too as the before kind

My List here use to hold IOC frameworks, StateMachine, and validation. For
ejemple:

For IOC:

Inject
Dispatcher
EventHandler
Postconstruct
...and so on

Validation:

NotNull
Null
Size
Max
Pattern
...and more

StateMachine:

EnterState
ExitState
...

There's more for localization, resources,... for sure other people will use
other metadata...

Used to be maybe other 50% of the global metadata global use or event
more...

For this one, this is maybe could be done as add-on projects to FlexJS
(historically this was done outside FlexSDK)



>
> Are there any other kinds of metadata?
>

I think that's all.



>
> The metadata syntax appears to be: open-square-bracket tag
> optional-open-parenthesis optional-name-value pairs,
> optional-close-parenthesis close-square-bracket.
>

right


>
> Does anybody have any desire to change that?  Should we add an optional
> name-value pair that determines if the metadata is kept in the output?
> Looks like that's how it is done in Java annotations, and not getting the
> compiler's list of kept metadata correct is a frequent issue for folks.
>

I think you refer here to the need to inform about the keeped metadata?
If you are talking about this, I think we should avoid the need to add that
config since, If you add a library that adds new metadata, normally you
want to get it without the need to inform the compiler manually.


>
> Should we provide some way to add other libraries that would affect
> codegen for metadata?  Currently the compiler behavior for [Binding] is
> hard coded.  No way to change what it generated and no way to add some
> other metadata the changes some other codegen.
>

That would be useful, but for me this is for a next iteration.
For example more important for me could be the use of constants in metadata
name-value pairs out-of-the-box


>
> My main objection to metadata is that it is, for Flash/AIR, the slowest
> possible convention for adding properties to a class.  I'd rather populate
> a set of properties like we do for FLEXJS_CLASS_INFO in FlexJS.  It is
> prone to typos: the compiler will not catch misspellings.  But it's here
> and not going away.  But is it worth any cycles to try to make it better?
>

I think all this problems could be addressed. For errors and typos, it
could be solved if in some way we add types (like java annotations), but
maybe this could means define the metadata in an external file like we do
with a class. I think this will be what people like me would prefer, but
right now I buy the classic AS3 metadata.



>
> -Alex
>
> On 2/28/14 6:59 AM, "Carlos Rovira" <carlos.rov...@codeoscopic.com> wrote:
>
> >>This got cut off so I'm not sure what your thoughts were.  I'm not a huge
> >fan of MetaData but we will have it in FlexJS
> >
> >Alex, Metadata is one of the things we have in Flex and not available in
> >pure JS. I'm a huge advocate of metadata, both for generating code at
> >compilation time or for later processing at runtime. In Java Annotations
> >are a huge step forward, and IMO in AS3/Flex Metadata is one of the
> >features for people wanting to go Flex 4 or FlexJS. We can underestimate
> >the importance of such feature for the future of FlexJS. As you're one of
> >the main heads of the project, I'd like to convince you of the importance
> >of taking Metadata seriously into account when planning whatever feature.
> >Moreover, I'd like someday to be able to get a decent AOP functionality as
> >we have in Java.
>
>


-- 
Carlos Rovira
Director de TecnologĂ­a
M: +34 607 22 60 05
F:  +34 912 94 80 80
http://www.codeoscopic.com
http://www.directwriter.es
http://www.avant2.es

Reply via email to