Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object Interaction Diagram is now "404 Not Found" #36

Open
DanRathbun opened this issue Jan 10, 2017 · 11 comments
Open

Object Interaction Diagram is now "404 Not Found" #36

DanRathbun opened this issue Jan 10, 2017 · 11 comments

Comments

@DanRathbun
Copy link

DanRathbun commented Jan 10, 2017

The old Object Interaction Diagram (drawn by whomever,) that used to be on the developer portal, is now "404 Not Found".

We have links in the forums for ppl using old versions that can still use this diagram (even though it may be old.)

But now those links to the diagram are broken.
Ref: https://forums.sketchup.com/t/how-to-get-the-material-of-component/25592/10

(1) Can there be a redirect to this diagram at another URL (to fix the broken links) ?

(2) Should the diagram be updated so it is now valid for Ruby 2.x SketchUp versions (v14+) ?

  • IF updated, does it get it's own name (so URL) that needs to be specified, thus leaving old links still pointing at the old diagram ?

/!\ This is a separate issue of whether we should create other diagrams that people have asked for, such as: Ruby class inheritance tree or SKP file DOM diagram/tree.

Ref:

@jimfoltz
Copy link

jimfoltz commented Jan 11, 2017

@DanRathbun I didn't make the diagrams on the old APi pages at Google Code. I did make these simple ones: http://sketchuptips.blogspot.com/2008/08/sketchup-ruby-api-class-diagrams.html

I would recommend yEd Graph Editor for making graphs of things. Or possibly FreePlane mind-mapper. The original diagram was made in Layout.

@DanRathbun
Copy link
Author

Okay, thanks Jim, I struck out your name above and fixed it in the referenced forum posts.

Yes, yesterday, I looked again at your diagrams. A couple are incorrect.
"api_sketchup.png" and "api_observers.png" are ancestor charts that incorrectly have the Sketchup module object where the Object class should be.

"api_geom.png" and "api_ui.png" are namespace diagrams, not ancestry (inheritance) diagrams. Whilst, "mixins.png" is a hybrid partial ancestry diagram (only shows what the mixins are mixed into.)

My point is that they are all mixed on the same page, all look the same, but have different purposes (ie, convey different information.) The Ruby noob could get easily confused.

@DanRathbun
Copy link
Author

yEd looks very interesting. I'd like to see YARD use something like this to generate navigable class trees, ie: descendant, ancestor, categorical, namespace, etc. (We do not really need any more interaction that click to navigate to a class page, I think.)

@jimfoltz
Copy link

I think yard can already use graphviz if it is available to make diagrams.

@thomthom
Copy link
Member

Anyone managed to get graphviz working?

@jimfoltz
Copy link

jimfoltz commented Jan 14, 2017

Here is the default output from yard graph. It's a .dot file.
api.dot.txt

Using Graphviz's dot.exe generates this image:

api

@thomthom
Copy link
Member

hm... I'll have to have another look at getting graphviz working, for some reason I had issues last time. Don't recall what it was.

Do you know if it can produce vertical stacking stead of this horizontal stacking?

@jimfoltz
Copy link

jimfoltz commented Jan 14, 2017

Yes Graphvis can. I have no idea if yard is able to tell graphviz to output vertical.

http://imgur.com/50zZduJ

@jimfoltz
Copy link

yard graph --protected --full --dependencies

Here's one to fill a wall...

http://imgur.com/c53uARX

@DanRathbun
Copy link
Author

@jimfoltz: Here is the default output from yard graph. It's a .dot file.

Which is usually a MS Word document template. The wiki page on the format says that "gv" is now the preferred file extension to use.
ref: https://en.wikipedia.org/wiki/DOT_(graph_description_language)

I read this page and wasn't all that impressed. (I guess I do not wish to learn yet another language.) The page implies that often the chart will need post editing in some kind of editor. It mentions doing this with SVG output from the graphing utility.

So, can Graphviz save out to SVG ?

@jimfoltz: Here's one to fill a wall...

Nice.

I think I'd prefer that the arrows went "down" towards the subclass, kind of denoting that functionality is inherited. (But in reality under the hood, the subclasses are being allowed to make proxy calls into the superclass' methods. So arrows either way can make sense.)

I sure wish that the boxes were:

  • All the same size (at least width) [helps in aligning postedit]
  • Top Aligned along a line
  • Connected with bussed lines

I'd like for classes and modules to have a different background color, and a different shape.
I'd like normal and abstract classes to have different color and different corners.
Say modules are sharp cornered rectangles.
Normal classes are round cornered rectangles.
Abstract classes are chamfered (bevel) cornered rectangles.
(What does MS Visual Studio use in it's object trees ? "long time no see")

Having different shapes will negate the need to label each one "class" or "module" (saving space.)


Okay let's say we can draw some nice SVG charts that stack vertically and will fit in the doc content area.

How easy is it to make each box a clickable link to a class / module page ?

Would it be better to use a <canvas> element ? (I think the yEd company has some Js libraries that can produce clickable charts in a <canvas>.)

@thomthom
Copy link
Member

If there are better charts utilities we can create a new YARD template that output the relationship data in the format it needs. Just a thought, we aren't limited to the default of that YARD set up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants