generating class structure diagram from AS classes


#1

Hi guys,

does anybody have any idea how to generate class structure diagram from actionscript (3) classes?

there are many good codes on google code and it would be very helpful (and also faster) to see the structure of classes (inheritance, object usings, etc…)
At the moment I’m inspecting the Stardust Particle System from cjcat on google code. His code is very amazing and well structured so one can learn a lot how to program in OOP.


#2

I just found that link:

http://www.uml4as.com/flower-platform/

Is it possible to use that tool in Flash? As far as I understood it’s for Flex.
Does anybody have any experience using that tool?
Thx


#3

At the moment I’m inspecting the Stardust Particle System from cjcat on google code. His code is very amazing and well structured so one can learn a lot how to program in OOP.

You can say that on almost any big class like tween engine atc` . Problem with Stardust Particle class or in general Particle class when it come to AD lets say to implement this in a project from buyer perspective view sometime its not that easy for them ,you cant just throw the effect in a ready project, you need to handle kill events atc` so buyer struggle with this kind of class unless its already implement in a ready template, this is why you don’t see those kind of class here + your start point using this class in size start at range of 40kb to 90 kb for the effect that's too much for some flash dev .most of the flash dev here make there own class or you see some popular class like tween engine Pvd that many use here but i think the majority here make there own class for uniqueness and use less class under MIT licenses

You can use almost any tool here if its under MIT licenses but you cant present php on AD preview so you need to host it on your server for preview


#4

Thx your reply, Tsafi
I may have disturbed you…

I really just use that code to learn from. I did not plan to use is. :slight_smile: Anyway I like using my own versions as well. But to become a really good programmer I think it’s important to inspect codes from good programmers. And Stardust engine was just a really good example for that.

I’m not curious the particle engine part (only) but how he used OO in thinking. :slight_smile:



My main question would have been the class stucture generating.

Thanks


#5

try to this software

http://www.sparxsystems.com.au/

it can export as3 classes from a diagram and off course import classes and create a diagram for you. It may need some tweek and some time invested to learn UML, but if you work on complex projects it can be of help


#6
try to this software

http://www.sparxsystems.com.au/

it can export as3 classes from a diagram and off course import classes and create a diagram for you. It may need some tweek and some time invested to learn UML, but if you work on complex projects it can be of help

Thanks doru, I’ll have a look at it.


#7

My main question would have been the class stucture generating.

Thanks

There are some basic rules regarding structure of classes, but really in time you will see each dev` structure of classes is very deference from one to the other and i relate it more for a coding style, this what so nice about AS3 you can do many things in deferent approach., IMO i think good coding class before cpu usage garbage collection bla bla is the way your class is been hierarchy in a proper coding ,i think its one of the hardest thing to do in particular when you merge class or if you have tones of class to work with .

Regard class structure generating i don’t use those 3 party like Doru show it’s a matter of preference i like to flow on a plain sheet take what in my mind and start code it with out necessary distraction that because i lean on my memory one of the few gift my father inheritance me,but hey what ever make you happy its fine :stuck_out_tongue:


#8
Regard class structure generating i don’t use those 3 party like Doru show it’s a matter of preference i like to flow on a plain sheet take what in my mind and start code it with out necessary distraction that because i lean on my memory one of the few gift my father inheritance me,but hey what ever make you happy its fine :P

Yes, it’s a good thing just to sit down and planning with a pencil and my brainstorming exercise book. :slight_smile:

At university (ancient old time… :)) I had to figure out an algorithm that works for every input and results the proper output. It was about a dynamic programming problem. For that I spent a whole day with a piece of paper and a pen and just trying and trying things how I could solve the problem. And I needed very much that paper and pencil. So since that time I have been using paper and pencil before programming to figure out the specification. :slight_smile:


#9
I just found that link:
http://www.uml4as.com/flower-platform/

That is a flash builder plug in , and I’ve tried it a few weeks ago. I was interested in generating class structures from a diagram. But I couldn’t get it to work, flash builder crashed a few times (or just hang ).


#10
I just found that link:
http://www.uml4as.com/flower-platform/

That is a flash builder plug in , and I’ve tried it a few weeks ago. I was interested in generating class structures from a diagram. But I couldn’t get it to work, flash builder crashed a few times (or just hang ).

Hi dSKY,

Thanks for sharing your experience.


#11
I just found that link:
http://www.uml4as.com/flower-platform/

That is a flash builder plug in , and I’ve tried it a few weeks ago. I was interested in generating class structures from a diagram. But I couldn’t get it to work, flash builder crashed a few times (or just hang ).

Have you found a(nother) solution since then? or just remained the hand-written version? :slight_smile:


#12

There is a startUML that is open source, and you need a plugin for AS3 , it can generate code , but I’m not really sure if it can read it.

there are some commercial solutions for AS3 but I haven’t tried them.


#13

FDT 4 is great dev environment for Flex/AS3

Dependency Visualizer video




#14
FDT 4 is great dev environment for Flex/AS3
Dependency Visualizer video



FD4 is expensive :slight_smile:


#15
FDT 4 is great dev environment for Flex/AS3
Dependency Visualizer video



FD4 is expensive :slight_smile:

Thanks guys, anyway… :slight_smile: