sketchucation logo sketchucation
    • Login
    πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

    Does anyone use UML?

    Scheduled Pinned Locked Moved Developers' Forum
    10 Posts 5 Posters 1.1k Views 5 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T Offline
      tetsuyahishida
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • thomthomT Offline
        thomthom
        last edited by

        I don't know what UML is. And a quick Google on it made me no wiser... πŸ˜• 😳

        Thomas Thomassen β€” SketchUp Monkey & Coding addict
        List of my plugins and link to the CookieWare fund

        1 Reply Last reply Reply Quote 0
        • Dan RathbunD Offline
          Dan Rathbun
          last edited by

          @thomthom said:

          I don't know what UML is. And a quick Google on it made me no wiser... πŸ˜• 😳

          see: http://en.wikipedia.org/wiki/Unified_Modeling_Language

          I'm not here much anymore.

          1 Reply Last reply Reply Quote 0
          • jolranJ Offline
            jolran
            last edited by

            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..

            1 Reply Last reply Reply Quote 0
            • jolranJ Offline
              jolran
              last edited by

              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 😳

              1 Reply Last reply Reply Quote 0
              • J Offline
                Jim
                last edited by

                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 the Object class.
                • mixes in the Math module, and
                • mixes in the Kernel module.

                Hi

                1 Reply Last reply Reply Quote 0
                • Dan RathbunD Offline
                  Dan Rathbun
                  last edited by

                  @jim said:

                  • mixes in the Kernel module.

                  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'm not here much anymore.

                  1 Reply Last reply Reply Quote 0
                  • jolranJ Offline
                    jolran
                    last edited by

                    @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!

                    1 Reply Last reply Reply Quote 0
                    • J Offline
                      Jim
                      last edited by

                      @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?

                      Hi

                      1 Reply Last reply Reply Quote 0
                      • T Offline
                        tetsuyahishida
                        last edited by

                        Thank you for all your imformation!
                        UML seems to be not so popular.
                        But thank you for the link!!

                        1 Reply Last reply Reply Quote 0
                        • 1 / 1
                        • First post
                          Last post
                        Buy SketchPlus
                        Buy SUbD
                        Buy WrapR
                        Buy eBook
                        Buy Modelur
                        Buy Vertex Tools
                        Buy SketchCuisine
                        Buy FormFonts

                        Advertisement