Git Product home page Git Product logo

Comments (3)

sdasda7777 avatar sdasda7777 commented on June 20, 2024

@JanBliznicenko I tried looking into this as well, but I'm not completely sure how to approach it. It would definitely be possible to just add these methods to Note, but I don't think that's exactly a good idea from object design perspective. Another solution might be to not show Notes on there at all, but someone might want to be able to hide them, so it's also probably not the best. Last option I can think of would be to add all elements something like a "displayName" method, and return umlClassName in UML elements and "Note" for Notes.

from openponk.

sdasda7777 avatar sdasda7777 commented on June 20, 2024

Two more things:

I noticed that OPNote and OPUMLElement actually don't share any class in the hierarchy besides Object - that means that for the third approach the hierarchy would probably also have to be reworked (having two completely unrelated classes have methods sharing name and calling the two unrelated methods based on the object at hand just screams bad OOP, imo).

I also noticed that OPNote doesn't have option to hide it, unlike most of the objects. That means the second approach might actually be the correct one?

from openponk.

JanBliznicenko avatar JanBliznicenko commented on June 20, 2024

Yes, the Note (and Boundary) are a little special. While all the other elements are parts of the model (root UML package in this case), Note and Boundary are completely outside of the model (even though they have model classes OPNote and OPBoundary).
And as you correctly say, they should not even support the hiding and showing, because "show" basically means "create diagram representation of the model element" and "hide" means "remove diagram representation of the model element, but keep the model element itself". Since note and boundary are not model elements, hide = remove and show makes no sense.

from openponk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.