in

The ORM Foundation

Get the facts!

Feature Request: Streamlined Application of UC's to Binary Fact Types

Last post 08-19-2010 19:08 by Anonymous. 7 replies.
Page 1 of 1 (8 items)
Sort Posts: Previous Next
  • 02-12-2010 6:46

    Feature Request: Streamlined Application of UC's to Binary Fact Types

    Hi Matt,
    This is Paul Baker from Neumont University. This is a minor feature request. I am getting my Master's degree under Dr. Halpin's tutelage out here in Malaysia, so I am starting to use the NORMA tool on a daily basis. Terry and I were talking about streamlining the process of adding uniqueness constraints to a fact type and I came up with the following suggestion:

    When selecting both roles in a binary fact type, it would be helpful for the tool to give you the option to apply 1:1 UC or a M:M UC in the context menu, like so:

    From ORM Diagrams

    Please excuse the poor cut and paste mock-up. This would cut down the clicks to add a 1:1 UC from 6 to 4 and would be a more intuitive experience when adding UC's to both roles in a binary fact type (either 1:1 or M:M).

    Cheers,
    Paul Baker
  • 02-15-2010 21:30 In reply to

    Re: Feature Request: Streamlined Application of UC's to Binary Fact Types

    Hi Paul, good to hear from you.

    Yes, this would be a very nice feature to have to reduce the number of clicks needed to enter preliminary constraints.

    One thing I'd like to do in this area is a submenu on a fact type selection  with one item for each valid uniqueness and mandatory pattern. I would probably need to separate these notions due to combinatoric constraints on n-ary fact types. A binary fact type has 4 valid uniqueness patterns and 4 valid mandatory patterns (16 combinations), and n-aries have n uniqueness patterns and n*n mandatory patterns (n cubed combined, obviously unmanageable in one menu even for n=3).

    So, for a fact type, you'd see a submenu to pick the uniqueness patterns, with menus below each uniqueness pattern to choose the mandatory patterns (possibly up to n=5). The issue here is that each glyph in the menus needs to be hand-drawn for each pattern, and VS dynamically populated sub menus are not known for being owner-draw friendly. In other words, it would be quite a bit of unpleasant dev work to pull this off, so I'm procrastinating. Issues regarding fact type shape orientation would also need to be addressed (probably with a glyph showing the shape orientation in the menu, I don't think I could draw the glyphs vertically).

    Does this should like a reasonable approach to you? It would reduce entry of mandatory/uniqueness patterns on all fact types to two clicks plus some hover time to get the menu items.

    -Matt

    PS You can use the Multiplicitly property on th opposite role to enter single-role mandatory and uniqueness constraints with one gesture. However, this property is not designed for multi-select, so you cannot use it to enter 1-1.

  • 02-22-2010 1:49 In reply to

    Re: Feature Request: Streamlined Application of UC's to Binary Fact Types

    Another useful shortcut might be to include a simple option to add both a mandatory and uniqueness constraint to the same role, instead of requiring these constraints to be added separately. This is like specifying "exactly one" as short for "some (at least one) and at most one" . Cheers Terry
  • 02-22-2010 8:27 In reply to

    Re: Feature Request: Streamlined Application of UC's to Binary Fact Types

    Nice to talk with you again Matt. I can't believe it's been 3 years since I graduated from Neumont. The NORMA tool has really progressed and the ORM2 notation is awesome.

    I hear what you are saying about the submenu for the fact type selection and that does seem like a lot of work.

    I wonder if Terry's idea (adding a menu item to apply both unique and mandatory to a single role) and my approach (the two menu items for 1:1 or m:m when selecting two roles) might be simpler and provide the desired ease of use for 80% of the scenarios which would be addressed by a more elaborate submenu, but for 20% of the effort?

    I'm not sure if that (80/20 generalization) is the case. I don't know if implementing those two suggestions is more or less work than implementing a full submenu. From my perspective, the majority of the fact types I see generated are binary fact types. Additionally, "exactly one" is a very common constraint. However, I am not sure if my experience is representative of real world modeling. Just thought I would add those ideas to the thread.

    -Paul

    PS I didn't know about the multiplicity property. Thanks for the tip!
  • 08-17-2010 16:42 In reply to

    Re: Feature Request: Streamlined Application of UC's to Binary Fact Types

    Matthew Curland:

    Hi Paul, good to hear from you.

    So, for a fact type, you'd see a submenu to pick the uniqueness patterns, with menus below each uniqueness pattern to choose the mandatory patterns (possibly up to n=5). The issue here is that each glyph in the menus needs to be hand-drawn for each pattern, and VS dynamically populated sub menus are not known for being owner-draw friendly. In other words, it would be quite a bit of unpleasant dev work to pull this off, so I'm procrastinating. Issues regarding fact type shape orientation would also need to be addressed (probably with a glyph showing the shape orientation in the menu, I don't think I could draw the glyphs vertically).

    Does this should like a reasonable approach to you? It would reduce entry of mandatory/uniqueness patterns on all fact types to two clicks plus some hover time to get the menu items.

    Nope. This seems like bloated nested menu syndrome to me. :)

    Didn't VisioModeler take a different approach here? I vaguely recall doing internal uniqueness/mandatory(?) constraints for binaries was easy (right click or something) and there was a right click menu option to launch a dialog for editing role constraints where n>2. The right click list might have also contained common 3-ary patterns as well: _ _ ..., _ _ _, ... _ _, and _ .... _. Wouldn't that take care of the 80% case without needing to go nuts with the nested menus? I suppose the imagelist icons might not be wide enough for the 3-ary common patterns though. :(

    Bill

  • 08-18-2010 20:47 In reply to

    Re: Feature Request: Streamlined Application of UC's to Binary Fact Types

    shada22:
    This seems like bloated nested menu syndrome to me.

    To me too. APRIMO is several times faster to work with, because it has no context menus at all.

    For a uniqueness constraint, select the role not covered and type "1". That adds a UC over the other roles. To toggle a mandatory constraint, press "m".

    To change to deontic, select the role (for mandatory) or UC and press "d".

    The keyboard is about a zillion times better for such things. A dynamic prompt helps newcomers learn the options.

  • 08-19-2010 10:28 In reply to

    Re: Feature Request: Streamlined Application of UC's to Binary Fact Types

    Context menus, top-level menus, hot keys, accelerators, toolbars, and other UI input methods are not mutually exclusive. I'm very open to adding additional hotkeys to the system. However, keystrokes only is not the answer. Remember the old Wordperfect learning strips that fit around the function keys? Where do you suggest I put the APRIMO strips on my laptop? Keystrokes are for power input, they are neither browseable, discoverable, nor demonstrable to a group. Also, in a graphical surface, you're selecting with the mouse but entering data with the keyboard. The constant switching is problematic.

    Every keyboard I've owned in the last dozen years [except for some thinkpads, and they let you reconfigure keys to get one] has a context menu key. Toggling a mandatory constraint with a role selection is exactly two keystrokes (context menu key, m). Two is much less than several, and a gazillion less than a zillion.

    If you want to add additional hotkeys to the designer, then this is easily done with VS. For example, to associate the 'Is Mandatory' item with Ctrl-M:

    1. Right click in a toolbar area
    2. Choose Customize... at the bottom of the menu
    3. Select the Commands tab and click the Keyboard... button
    4. In 'Show commands containing', type in 'mandatory'
    5. Select the item
    6. Change the 'Use new shortcut in' to 'ORM Designer'
    7. Select 'Press Shortcut Keys' and type 'Ctrl-M'
    8. Assign
    9. OK

    VS doesn't allow single keystroke (just 'm') assignment, but I don't see this as a big loss. If a user fines a set of keystrokes they like let's talk about standardizing them. I also need to review how my commands are defined so that I can get a category in the 'Commands' list in the previously mentioned dialog. This would let you put commands on the other menus and custom toolbars (in addition to keystroke assignment). I think this flexible approach is much cleaner (and more standard) than locking the user into one input approach.

    A 'uniqueness on other roles' command is interesting, but it doesn't work for spanning uniqueness constraints.

    -Matt

  • 08-19-2010 19:08 In reply to

    Re: Feature Request: Streamlined Application of UC's to Binary Fact Types

    Matthew Curland:
    Where do you suggest I put the APRIMO strips on my laptop
    You don't need one. There are only four or five keystrokes relevant at any point, and the prompt text fits on the single status line, changing as you hover over different things. I need to do something a bit different in the iPad, since it has no hover, but I don't think that'll be hard. Tap to select and a small toolbar of options will appear.
    Matthew Curland:
    selecting with the mouse but entering data with the keyboard. The constant switching is problematic.
    Not problematic, on the contrary it's much more efficient to have one hand on the mouse and one on the keyboard. None of the keystrokes require two hands.
    Matthew Curland:
    Two is much less than several
    Nice, but it's still more than one ;-)
    Matthew Curland:
    add additional hotkeys to the designer
    Thanks for that snippet.
    Matthew Curland:
    A 'uniqueness on other roles' command is interesting, but it doesn't work for spanning uniqueness constraints.

    Actually it works fine, because you automatically get a spanning UC whenever you don't have any other UC. It works for multiple constraints in ternaries also. The "other roles" thing is actually easier to think about too, since you naturally think "This has one of those" and want to apply the constraint to "those"... but that's actually the opposite of how the UC is defined.

    The other thing that APRIMO does really well is avoid the need for a toolbox. Double-click on the canvas, you get a new object type. Shift-drag from an object type and release over the canvas, you get a new unary fact type. Release over another fact type to add a role. Shift-drag from a role (with or without additional roles selected) and release on the canvas, you get a new external constraint. Release over the same fact type to reorder roles. Release over an existing external constraint to add roles. Release on an object type to reconnect this role. It's all just so slick and easy compared to NORMA... literally five to ten times faster... This sort of improved interaction was the main thing that motivated Brian C to write ORM-Lite, he was frustrated with NORMA's interaction and knew it was possible to do so much better, but his ideas weren't being accepted. I think I've done it even better than ORM-Lite, but I'm not very experienced with that, perhaps I missed things.

Page 1 of 1 (8 items)
© 2008-2014 The ORM Foundation: A UK not-for-profit organisation -------------- Terms of Service