You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Erik Lundgren <er...@lndgrn.se> on 2012/09/28 20:38:32 UTC
Flex CodeScape ...
Hello
I would like to do a visualization of the flex framework.
Seeing code in new ways always inspire creativity.
Taking the chance to jumpstart my projekt;
does anyone have a dataset of the Apache Flex framework dependency-graph available?
Thanks!
/E.
RE: Flex CodeScape ...
Posted by te...@teotigraphix.com.
Wow, I'm over thinking things here. I guess I just want some more
experiments with the compiler. I was just thinking grabbing AST would
give an immense freedom of the types of things you wanted like
members, metadata, comments etc.
Gordon, I still can't gt over how fast that code is.
Mike
Quoting Gordon Smith <go...@adobe.com>:
> The catalog.xml file inside each SWC file (framework.swc, spark.swc,
> etc.) has an XML encoding of the direct dependencies of each class
> in the SWC.
>
> - Gordon Smith, Adobe
>
> -----Original Message-----
> From: Erik Lundgren [mailto:erik@lndgrn.se]
> Sent: Friday, September 28, 2012 11:39 AM
> To: flex-dev@incubator.apache.org
> Subject: Flex CodeScape ...
>
> Hello
>
> I would like to do a visualization of the flex framework.
> Seeing code in new ways always inspire creativity.
>
> Taking the chance to jumpstart my projekt;
>
> does anyone have a dataset of the Apache Flex framework
> dependency-graph available?
>
> Thanks!
>
> /E.
>
RE: Flex CodeScape ...
Posted by Gordon Smith <go...@adobe.com>.
The catalog.xml file inside each SWC file (framework.swc, spark.swc, etc.) has an XML encoding of the direct dependencies of each class in the SWC.
- Gordon Smith, Adobe
-----Original Message-----
From: Erik Lundgren [mailto:erik@lndgrn.se]
Sent: Friday, September 28, 2012 11:39 AM
To: flex-dev@incubator.apache.org
Subject: Flex CodeScape ...
Hello
I would like to do a visualization of the flex framework.
Seeing code in new ways always inspire creativity.
Taking the chance to jumpstart my projekt;
does anyone have a dataset of the Apache Flex framework dependency-graph available?
Thanks!
/E.
Re: Flex CodeScape ...
Posted by Michael Schmalle <ap...@teotigraphix.com>.
Quoting Roland Zwaga <ro...@stackandheap.com>:
>>
>>
>> So yes, if you can image a fully parsed source list with all the trimmings
>> sitting in a class that has an API;
>>
>> Collection<**IFunctionDefinition> getFunctions(ITypeDefinition definition,
>> String visibility, boolean inherit);
>>
>> Collection<IClassDefinition> getSubClasses(IClassDefinition definition);
>>
>> Collection<IClassDefinition> getInterfaceImplementors(**IInterfaceDefinition
>> definition);
>>
>> Collection<**IInterfaceDefinition> getSubInterfaces(**IInterfaceDefinition
>> definition);
>>
>> etc...
>>
>>
>> Also note, there is some API in the scopes.* package that might make it
>> even easier for me to do what I already am doing. I haven't taken the dive
>> into that package to fully understand what it's capable of.
>>
>
> Erm, let me get this right, the API examples you're giving are from the
> current compiler API, or is this part of the extension framework you're
> planning to build?
>
> cheers,
>
> Roland
>
The API is from the documentor/extension framework that is existing. I
am using this API as we speak for the production of said asdoc
examples just given. :)
I figured sorting is faster than insane amount of loops during render
and conversion. It seems my gamble paid off with this new compiler API.
Mind you, I have been "working" on this documentor code/framework for
years. Since about 2005 I have had various incarnations, started with
PHP and RegExp! haha
Mike
--
Michael Schmalle - Teoti Graphix, LLC
http://www.teotigraphix.com
http://blog.teotigraphix.com
Re: Flex CodeScape ...
Posted by Roland Zwaga <ro...@stackandheap.com>.
>
>
> So yes, if you can image a fully parsed source list with all the trimmings
> sitting in a class that has an API;
>
> Collection<**IFunctionDefinition> getFunctions(ITypeDefinition definition,
> String visibility, boolean inherit);
>
> Collection<IClassDefinition> getSubClasses(IClassDefinition definition);
>
> Collection<IClassDefinition> getInterfaceImplementors(**IInterfaceDefinition
> definition);
>
> Collection<**IInterfaceDefinition> getSubInterfaces(**IInterfaceDefinition
> definition);
>
> etc...
>
>
> Also note, there is some API in the scopes.* package that might make it
> even easier for me to do what I already am doing. I haven't taken the dive
> into that package to fully understand what it's capable of.
>
Erm, let me get this right, the API examples you're giving are from the
current compiler API, or is this part of the extension framework you're
planning to build?
cheers,
Roland
Re: Flex CodeScape ...
Posted by Michael Schmalle <ap...@teotigraphix.com>.
Quoting Roland Zwaga <ro...@stackandheap.com>:
>
>
> Hey Mike,
>
> do you think your framework could also form a basis for static analysis
> tools such as FlexPMD/CPD et al? If the parsing is so much faster than
> perhaps these existing
> tools could be re-written to use the new compiler. I myself know absolutely
> nothing about static code analysis, but perhaps folks on the list here do
> and leveraging your
> existing work could be beneficial.
>
> cheers,
>
> Roland
>
Actually FlexPMD was the first recursive decent parser I looked at
years ago for ActionScript. All it did was create AST nodes for the
actual PMD implementation.
That being said I see no reason why the PMD implementation couldn't be
ported to use the new IDefinition API existing in the
org.apache.flex.compiler.definition.* package.
> static code analysis
Heh, I would have to look this up on wikipedia. :) I'm good in the
areas I'm good in. Code analysis was never anything I actually set out
to learn.
So yes, if you can image a fully parsed source list with all the
trimmings sitting in a class that has an API;
Collection<IFunctionDefinition> getFunctions(ITypeDefinition definition,
String visibility, boolean inherit);
Collection<IClassDefinition> getSubClasses(IClassDefinition definition);
Collection<IClassDefinition>
getInterfaceImplementors(IInterfaceDefinition definition);
Collection<IInterfaceDefinition> getSubInterfaces(IInterfaceDefinition
definition);
etc...
Also note, there is some API in the scopes.* package that might make
it even easier for me to do what I already am doing. I haven't taken
the dive into that package to fully understand what it's capable of.
Mike
--
Michael Schmalle - Teoti Graphix, LLC
http://www.teotigraphix.com
http://blog.teotigraphix.com
Re: Flex CodeScape ...
Posted by Roland Zwaga <ro...@stackandheap.com>.
>
> Yeah took a look at the PDF, there are some things that need to be thought
> about. I'm not really at the point where I could even begin to think about
> this part.
>
> Hopefully others might take an interest when the framework is up and could
> help contribute then.
>
> BTW the "framework" here uses the parser to load source files and swcs,
> create the AST nodes and IDefinitions.
>
> Once the parsing is done a processor takes all the compilation units and
> sorts all member data, meta data into an accessor map API. From there
> processing is done to resolve inherited comments, accessor get-set pairs
> and various other things.
>
> At this point, anything is possible, using the accessor map dependencies
> are set and it's just a matter of finessing the API to create the output
> you want.
>
> IE With the first iteration here I have created the asdoc HTML API docs
> using Velocity templates. Works very fast. I am parsing and outputting the
> spark and framework html in 35 seconds.
Hey Mike,
do you think your framework could also form a basis for static analysis
tools such as FlexPMD/CPD et al? If the parsing is so much faster than
perhaps these existing
tools could be re-written to use the new compiler. I myself know absolutely
nothing about static code analysis, but perhaps folks on the list here do
and leveraging your
existing work could be beneficial.
cheers,
Roland
Re: Flex CodeScape ...
Posted by Michael Schmalle <ap...@teotigraphix.com>.
Ok,
Yeah took a look at the PDF, there are some things that need to be
thought about. I'm not really at the point where I could even begin to
think about this part.
Hopefully others might take an interest when the framework is up and
could help contribute then.
BTW the "framework" here uses the parser to load source files and
swcs, create the AST nodes and IDefinitions.
Once the parsing is done a processor takes all the compilation units
and sorts all member data, meta data into an accessor map API. From
there processing is done to resolve inherited comments, accessor
get-set pairs and various other things.
At this point, anything is possible, using the accessor map
dependencies are set and it's just a matter of finessing the API to
create the output you want.
IE With the first iteration here I have created the asdoc HTML API
docs using Velocity templates. Works very fast. I am parsing and
outputting the spark and framework html in 35 seconds.
Mike
Quoting Roland Zwaga <ro...@stackandheap.com>:
> On 1 October 2012 13:21, Michael Schmalle <ap...@teotigraphix.com> wrote:
>
>> Quoting Roland Zwaga <ro...@stackandheap.com>:
>>
>>
>>
>>> Perhaps it would be an idea to output UML? Or would this be overkill?
>>>
>>>
>>
>> Well Roland, spitting out UML would be as easy as knowing what to spit
>> out. :) Is there an UML-XML spec somewhere for existing editors to be able
>> to load? I have used StarUML for years, so I am not to versed on the
>> current state of the programs.
>> I think this would be the best output though, at the same time it would
>> give a dependency graph as well.
>
>
> Well, I ain't no UML authority ;) But this is what is available right now
> about the UML spec:
>
> http://www.omg.org/spec/UML/2.2/
>
> Perhaps worth a look?
>
> Cheers,
>
> Roland
>
--
Michael Schmalle - Teoti Graphix, LLC
http://www.teotigraphix.com
http://blog.teotigraphix.com
Re: Flex CodeScape ...
Posted by Roland Zwaga <ro...@stackandheap.com>.
On 1 October 2012 13:21, Michael Schmalle <ap...@teotigraphix.com> wrote:
> Quoting Roland Zwaga <ro...@stackandheap.com>:
>
>
>
>> Perhaps it would be an idea to output UML? Or would this be overkill?
>>
>>
>
> Well Roland, spitting out UML would be as easy as knowing what to spit
> out. :) Is there an UML-XML spec somewhere for existing editors to be able
> to load? I have used StarUML for years, so I am not to versed on the
> current state of the programs.
> I think this would be the best output though, at the same time it would
> give a dependency graph as well.
Well, I ain't no UML authority ;) But this is what is available right now
about the UML spec:
http://www.omg.org/spec/UML/2.2/
Perhaps worth a look?
Cheers,
Roland
Re: Flex CodeScape ...
Posted by Michael Schmalle <ap...@teotigraphix.com>.
An note to others about documentation;
I would just like to state that for some reason I have a passion for
documentation, maybe it's that manuals or schematics give way to a
greater awareness of the underlying machine. In the case of the Flex
framework I have followed it since it's version in the Flash "pre
v2components and v2 components" to see where it has ended up now.
Point; This framework is monolithic compared to what a lot of college
graduates are used coming into the tech world these days. If you want
to recruit new talent you have to give them some type of comfort
through understanding your system.
The current state of Flex and it's superficial documentation and
connections is ridiculous (API docs I am speaking about). Especially
since skins and states were introduced into the documentation by
Adobe. The docs and connections were scabbed onto and already outdated
HTML representation of the classes.
I'm sure there are some designers out there that have seen API docs
that "speak the frameworks truth and intentions", this is what I am
aiming for to allow others to see the framework in a simplistic
connected approach.
This project seriously needs to remove the black majic from it's
framework and show it's connections. Or else all we will see on this
dev list is developers that have used it for years and no new talent.
I know if I was just graduating highschool but loved programing, the
flex framework would be something I would definitely not attempt to
understand and I would be on my merry way to some other documented and
understandable framework.
Mike
(sorry for the rant)
Quoting Michael Schmalle <ap...@teotigraphix.com>:
> Quoting Roland Zwaga <ro...@stackandheap.com>:
>
>
>>
>> Perhaps it would be an idea to output UML? Or would this be overkill?
>>
>
>
> Well Roland, spitting out UML would be as easy as knowing what to
> spit out. :) Is there an UML-XML spec somewhere for existing editors
> to be able to load? I have used StarUML for years, so I am not to
> versed on the current state of the programs.
>
> I think this would be the best output though, at the same time it
> would give a dependency graph as well.
>
>
> Michael Schmalle - Teoti Graphix, LLC
> http://www.teotigraphix.com
> http://blog.teotigraphix.com
>
>
--
Michael Schmalle - Teoti Graphix, LLC
http://www.teotigraphix.com
http://blog.teotigraphix.com
Re: Flex CodeScape ...
Posted by Michael Schmalle <ap...@teotigraphix.com>.
Quoting Roland Zwaga <ro...@stackandheap.com>:
>
> Perhaps it would be an idea to output UML? Or would this be overkill?
>
Well Roland, spitting out UML would be as easy as knowing what to spit
out. :) Is there an UML-XML spec somewhere for existing editors to be
able to load? I have used StarUML for years, so I am not to versed on
the current state of the programs.
I think this would be the best output though, at the same time it
would give a dependency graph as well.
Michael Schmalle - Teoti Graphix, LLC
http://www.teotigraphix.com
http://blog.teotigraphix.com
Re: Flex CodeScape ...
Posted by Roland Zwaga <ro...@stackandheap.com>.
I'm working on a documentor framework right now that uses output target
renderers. This will be a perfect prototype experiment for an output type.
>
> Give me a bit of time and I can get this stable as I have said in some
> previous posts. I'll add the initial code to my whiteboard and we can go
> from there.
>
> I know Gordon also said the SWCs contain the xml manifest with
> dependencies but I offered this solution since it gives the greatest
> flexibility.
>
> Anyway, I'll let you know when I have something ready to test this out
> with.
> BTW Are you thinking XML format with the below example or a text printout?
Perhaps it would be an idea to output UML? Or would this be overkill?
Re: Flex CodeScape ...
Posted by Erik Lundgren <er...@lndgrn.se>.
Sounds great!
If you could output xml it would be great.
/E.
1 okt 2012 kl. 12.32 skrev Michael Schmalle:
> I'm working on a documentor framework right now that uses output target renderers. This will be a perfect prototype experiment for an output type.
>
> Give me a bit of time and I can get this stable as I have said in some previous posts. I'll add the initial code to my whiteboard and we can go from there.
>
> I know Gordon also said the SWCs contain the xml manifest with dependencies but I offered this solution since it gives the greatest flexibility.
>
> Anyway, I'll let you know when I have something ready to test this out with.
>
> BTW Are you thinking XML format with the below example or a text printout?
>
> Mike
>
> Quoting Erik Lundgren <er...@lndgrn.se>:
>
>> That sounds really cool.
>>
>> Some simple structure to start with ...
>>
>> somePackage
>> - - qualifies SomeType
>> - - - which is a SuperTypeA, an ITypeB and an ITypeC
>> - - - which is publicly (public, internal, protected, custom namespace) associated with TypeE, F and G
>> - - - wich is privately (private) associated with TypeH, I and J
>>
>> Is that doable?
>>
>> Thanks a lot for taking an interest in this!
>>
>> /E.
>>
>>
>> 28 sep 2012 kl. 21.16 skrev Michael Schmalle:
>>
>>> I have been working with the new compiler and all I can say is this would be something very easy to create if I knew what type of "graph" you wanted and the schema of such graph.
>>>
>>> Let me know some details if interested in creating something that would actually make it. (meaning I could write a java program that would produce it using the new compiler's parser and ast hierarchies)
>>>
>>> Mike
>>>
>>> Quoting Erik Lundgren <er...@lndgrn.se>:
>>>
>>>> Hello
>>>>
>>>> I would like to do a visualization of the flex framework.
>>>> Seeing code in new ways always inspire creativity.
>>>>
>>>> Taking the chance to jumpstart my projekt;
>>>>
>>>> does anyone have a dataset of the Apache Flex framework dependency-graph available?
>>>>
>>>> Thanks!
>>>>
>>>> /E.
>>>
>>> --
>>> Michael Schmalle - Teoti Graphix, LLC
>>> http://www.teotigraphix.com
>>> http://blog.teotigraphix.com
>>>
>>>
>>
>>
>
> --
> Michael Schmalle - Teoti Graphix, LLC
> http://www.teotigraphix.com
> http://blog.teotigraphix.com
>
>
Re: Flex CodeScape ...
Posted by Michael Schmalle <ap...@teotigraphix.com>.
I'm working on a documentor framework right now that uses output
target renderers. This will be a perfect prototype experiment for an
output type.
Give me a bit of time and I can get this stable as I have said in some
previous posts. I'll add the initial code to my whiteboard and we can
go from there.
I know Gordon also said the SWCs contain the xml manifest with
dependencies but I offered this solution since it gives the greatest
flexibility.
Anyway, I'll let you know when I have something ready to test this out with.
BTW Are you thinking XML format with the below example or a text printout?
Mike
Quoting Erik Lundgren <er...@lndgrn.se>:
> That sounds really cool.
>
> Some simple structure to start with ...
>
> somePackage
> - - qualifies SomeType
> - - - which is a SuperTypeA, an ITypeB and an ITypeC
> - - - which is publicly (public, internal, protected, custom
> namespace) associated with TypeE, F and G
> - - - wich is privately (private) associated with TypeH, I and J
>
> Is that doable?
>
> Thanks a lot for taking an interest in this!
>
> /E.
>
>
> 28 sep 2012 kl. 21.16 skrev Michael Schmalle:
>
>> I have been working with the new compiler and all I can say is this
>> would be something very easy to create if I knew what type of
>> "graph" you wanted and the schema of such graph.
>>
>> Let me know some details if interested in creating something that
>> would actually make it. (meaning I could write a java program that
>> would produce it using the new compiler's parser and ast hierarchies)
>>
>> Mike
>>
>> Quoting Erik Lundgren <er...@lndgrn.se>:
>>
>>> Hello
>>>
>>> I would like to do a visualization of the flex framework.
>>> Seeing code in new ways always inspire creativity.
>>>
>>> Taking the chance to jumpstart my projekt;
>>>
>>> does anyone have a dataset of the Apache Flex framework
>>> dependency-graph available?
>>>
>>> Thanks!
>>>
>>> /E.
>>
>> --
>> Michael Schmalle - Teoti Graphix, LLC
>> http://www.teotigraphix.com
>> http://blog.teotigraphix.com
>>
>>
>
>
--
Michael Schmalle - Teoti Graphix, LLC
http://www.teotigraphix.com
http://blog.teotigraphix.com
Re: Flex CodeScape ...
Posted by Clint Modien <cl...@vectorscape.com>.
For this type of output you may want to checkout the pre existing compiler option -link-report=AFileName.xml
On Sep 28, 2012, at 1:16 PM, Erik Lundgren <er...@lndgrn.se> wrote:
> That sounds really cool.
>
> Some simple structure to start with ...
>
> somePackage
> - - qualifies SomeType
> - - - which is a SuperTypeA, an ITypeB and an ITypeC
> - - - which is publicly (public, internal, protected, custom namespace) associated with TypeE, F and G
> - - - wich is privately (private) associated with TypeH, I and J
>
> Is that doable?
>
> Thanks a lot for taking an interest in this!
>
> /E.
>
>
> 28 sep 2012 kl. 21.16 skrev Michael Schmalle:
>
>> I have been working with the new compiler and all I can say is this would be something very easy to create if I knew what type of "graph" you wanted and the schema of such graph.
>>
>> Let me know some details if interested in creating something that would actually make it. (meaning I could write a java program that would produce it using the new compiler's parser and ast hierarchies)
>>
>> Mike
>>
>> Quoting Erik Lundgren <er...@lndgrn.se>:
>>
>>> Hello
>>>
>>> I would like to do a visualization of the flex framework.
>>> Seeing code in new ways always inspire creativity.
>>>
>>> Taking the chance to jumpstart my projekt;
>>>
>>> does anyone have a dataset of the Apache Flex framework dependency-graph available?
>>>
>>> Thanks!
>>>
>>> /E.
>>
>> --
>> Michael Schmalle - Teoti Graphix, LLC
>> http://www.teotigraphix.com
>> http://blog.teotigraphix.com
>>
>>
>
Re: Flex CodeScape ...
Posted by Erik Lundgren <er...@lndgrn.se>.
That sounds really cool.
Some simple structure to start with ...
somePackage
- - qualifies SomeType
- - - which is a SuperTypeA, an ITypeB and an ITypeC
- - - which is publicly (public, internal, protected, custom namespace) associated with TypeE, F and G
- - - wich is privately (private) associated with TypeH, I and J
Is that doable?
Thanks a lot for taking an interest in this!
/E.
28 sep 2012 kl. 21.16 skrev Michael Schmalle:
> I have been working with the new compiler and all I can say is this would be something very easy to create if I knew what type of "graph" you wanted and the schema of such graph.
>
> Let me know some details if interested in creating something that would actually make it. (meaning I could write a java program that would produce it using the new compiler's parser and ast hierarchies)
>
> Mike
>
> Quoting Erik Lundgren <er...@lndgrn.se>:
>
>> Hello
>>
>> I would like to do a visualization of the flex framework.
>> Seeing code in new ways always inspire creativity.
>>
>> Taking the chance to jumpstart my projekt;
>>
>> does anyone have a dataset of the Apache Flex framework dependency-graph available?
>>
>> Thanks!
>>
>> /E.
>
> --
> Michael Schmalle - Teoti Graphix, LLC
> http://www.teotigraphix.com
> http://blog.teotigraphix.com
>
>
Re: Flex CodeScape ...
Posted by Michael Schmalle <ap...@teotigraphix.com>.
I have been working with the new compiler and all I can say is this
would be something very easy to create if I knew what type of "graph"
you wanted and the schema of such graph.
Let me know some details if interested in creating something that
would actually make it. (meaning I could write a java program that
would produce it using the new compiler's parser and ast hierarchies)
Mike
Quoting Erik Lundgren <er...@lndgrn.se>:
> Hello
>
> I would like to do a visualization of the flex framework.
> Seeing code in new ways always inspire creativity.
>
> Taking the chance to jumpstart my projekt;
>
> does anyone have a dataset of the Apache Flex framework
> dependency-graph available?
>
> Thanks!
>
> /E.
--
Michael Schmalle - Teoti Graphix, LLC
http://www.teotigraphix.com
http://blog.teotigraphix.com