Does anyone use UML?
-
Hi all.
Since I'm a beginner,this question might be odd
but does anyone use UML to write plugin?I always get confused with the class relationships.
And to adopt Design Patterns, it seems that UML is quite important. -
I don't know what UML is. And a quick Google on it made me no wiser...
-
@thomthom said:
I don't know what UML is. And a quick Google on it made me no wiser...
-
Nice link. A lot of reading.
So is it only to visualize "code flow"? Or can one generate code through nodes by modeling them?
My guess is not.
It look fancy though.. -
Isent that a method to structure and organize your code
before even have written the code, for a better workflow?It is probably more common for larger project, not sure.
Im reading up on Ruby and there where some info on it in a book.
And considering the book was about Ruby, there must be use of UML in Ruby.BTW, if you're still at beginnerstage? I might recommend Lynda.com training for Ruby.
It costs 25$ a month but there are tutorials about HTML and JAVAscript tuts(for webdialogs) there as well.
I've gone through the videos and learned a lot about the basics in Ruby. Good sections about setting attribute
and classes.edited: I see in other post your not "that kind" of newbie
-
In my plugins I do not often use classes or modules for mixins, so a inheritance diagram is not relevant . In fact, I use very few of the object-oriented features of Ruby and write plugins using a procedural paradigm. In my case, Ruby modules are used simply to create a unique namespace and avoid method name clashes.
SketchUp's API Object Diagram is a good visualization of the built-in class relationships. Also, I made a (imperfect) API diagram some time ago. On my diagram, I meanings of the arrows is not the same - some arrows mean "is_a" and other arrows mean "belongs to" or "mixes in".
I made the chart using the .ancestors method. So you can always check the lineage of a class:
Sketchup::Layers.ancestors [Sketchup::Layers, Enumerable, Sketchup::Entity, Object, Math, Kernel]
So a
Sketchup::Layers
object:- mixes in the
Enumerable
module, and - inherits from the
Sketchup::Entities
class, which inherits from theObject
class. - mixes in the
Math
module, and - mixes in the
Kernel
module.
- mixes in the
-
@jim said:
- mixes in the
Kernel
module.
Actually, it's class
Object
, that mixes in theKernel
module, and sinceObject
is the common progenitor of ALL Ruby objects, then ALL will inherit the instance methods defined in mixin moduleKernel
. - mixes in the
-
@unknownuser said:
Also, I made a (imperfect) API diagram some time ago
Very nice! Will print them as reference.
Also the API object diagram did I miss.Good things!
-
@dan rathbun said:
Actually, it's class Object, that mixes in the Kernel module, and since Object is the common progenitor of ALL Ruby objects, then ALL will inherit the instance methods defined in mixin module Kernel.
I guess I need a UML diagram. Seriously, is there a diagram somewhere showing this?
-
Thank you for all your imformation!
UML seems to be not so popular.
But thank you for the link!!
Advertisement