Download presentation
Presentation is loading. Please wait.
Published byAvice Carpenter Modified over 9 years ago
1
University of Utah SoCCS 6961 - Lecture 151 Inside UML CS6961 – Lecture 15 Nathan Dykman
2
University of Utah SoCCS 6961 - Lecture 152 Administration Grading Started –Please get in HW4, if you haven’t already. Okay, topics of discussion coming up: –QA, Testing and Release Engineering Metrics –Reverse Engineering of Complex Systems Real World Examples –MDA and SOA –Refactoring –Did I miss anything?
3
University of Utah SoCCS 6961 - Lecture 153 Today’s Lecture Today: I’m going to give you a peek behind the UML curtain –Give you an idea of how UML is put together
4
University of Utah SoCCS 6961 - Lecture 154 UML Worries The main question people ask after dealing with UML after a while is: “Why it is so complicated?” I’m sure you have some of these kinds of questions –Examples? This lecture hopes to explain some of the complexity
5
University of Utah SoCCS 6961 - Lecture 155 UML: Incompleteness The major part that throws people is that UML allows incomplete models –But, in some cases, complete information must be provided. (Example?) –Some view this as a major shortcoming It is a shortcoming, but not as big as it seems. –But is incompleteness really bad? Think about regular code files here.
6
University of Utah SoCCS 6961 - Lecture 156 UML: Incompleteness The hard part about UML is that you can’t just save a model in “any old state” –There is work on this, actually. But, most tools disallow some kinds of invalid models to be created –But, not all. A model can be semantically incorrect, but still created in a tool. Why?
7
University of Utah SoCCS 6961 - Lecture 157 UML: Ambiguity One constant annoyance in UML is that if something isn’t there, doesn’t mean it isn’t somewhere. –What’s worse, in some cases, missing information “assumes” default values, in others, it is merely “unspecified” The rule is to assume the least possible –This works in most cases, but not all.
8
University of Utah SoCCS 6961 - Lecture 158 Class Example
9
University of Utah SoCCS 6961 - Lecture 159 UML: Ambiguity This problem comes from a subtle part of UML. Diagrams aren’t models. –A diagram is merely just a view on a model. A model is complete. –Why is a diagram just a view on a model? Programming languages don’t do this, right? –So, we can view the previous example as three different views on a single class. In the model, there is one class
10
University of Utah SoCCS 6961 - Lecture 1510 UML: Ambiguity The problem is made a more difficult in that there is diagrams are the only UML syntax that tools provide –This made worse by the standard XML format of UML (XMI) To my mind: XMI is pretty broken The latest versions may help address this –But there are too many versions to deal with in the first place.
11
University of Utah SoCCS 6961 - Lecture 1511 Modeling Future In the future, it is likely UML and other modeling languages will require better textual formats as well as visual syntax –There is already a standard “human-usable” format that looks more like code Sadly, very little support for it. –Some tools provide a data-grid like editors. –But, we need things like XML, Relational Schemas, etc.
12
University of Utah SoCCS 6961 - Lecture 1512 UML: Complexity Another major complaint about UML, is well, there is sure a lot of it –I agree with this. UML could lose some bulk –Main problem is nobody can really agree on what to cut, and everybody has something they want to add –UML in the middle of the “second-system” effect Hopefully, feature set will shake out with more use
13
University of Utah SoCCS 6961 - Lecture 1513 UML: Complexity Of course, just because it’s there, doesn’t mean you have to use it –In many cases, a large part of UML is for specialized audiences Some talk of making a xUML language for these advanced bits –Strive to use the smallest subset that does the job But don’t reinvent the wheel either.
14
University of Utah SoCCS 6961 - Lecture 1514 UML: Complexity As model-driven development moves forward, hopefully the complexity will start to pay off –More complex code generation –Direct model execution or interpretation –Better integration with languages For now, certain domains benefit the most –Telecommunications, embedded real-time are the best examples.
15
University of Utah SoCCS 6961 - Lecture 1515 Behind The Curtain One common benchmark on computer languages is “can it describe itself” –Some languages make this dead easy (Scheme) –Others, more complex (Perl Compiler in Perl) –This “benchmark” has major drawbacks “Little languages” (Domain specific programming languages) suffer in this area.
16
University of Utah SoCCS 6961 - Lecture 1516 The UML Metamodel UML is used to describe UML. –Well, in reality, it’s more complex than that –Only a small subset of UML is used currently Restricted class diagrams Object Constraint Language (which has a metamodel as well) –Metamodeling still an area of research and development My PhD work lives in this space, for example EMF from IBM, Corona from Microsoft
17
University of Utah SoCCS 6961 - Lecture 1517 Metamodel Example
18
University of Utah SoCCS 6961 - Lecture 1518 Metamodel Example As you can see, the metamodel really isn’t fit for normal consumption –Certain parts of the metamodel are much more complex than this –You have to learn how to “read the runes” However, the UML metamodel is the core what is legal and illegal UML –What can relate to what, what contains what, the data, etc.
19
University of Utah SoCCS 6961 - Lecture 1519 Metamodel Example 2
20
University of Utah SoCCS 6961 - Lecture 1520 Metamodeling After seeing these models, I hope you feel a bit better about your class models –I mean, I could make you do this kind of thing. Really. I did it, so you can too… Right? Of course, these models aren’t example of “real-world models” –They have a very specific purpose. –“Real world” models much closer to code.
21
University of Utah SoCCS 6961 - Lecture 1521 UML: Extensibility UML was built to be extended. For most people, it is enough to know that there is a thing called a “stereotype” –An a collection of stereotypes is a “profile” This should work for you as well –But UML can be extended in much more powerful ways (tool support missing)
22
University of Utah SoCCS 6961 - Lecture 1522 UML, DSMLs, Extensiblity Microsoft’s new initiative focuses on “Domain Specific Modeling Languages” –Part of Visual Studio 2005 modeling tools is a toolkit for building new modeling languages –Codenamed Corona, now just part of VS 2005 –Keep a eye on this (It’s really cool) –UML, Eclipse/Java community will get shaken up by this, I think
23
University of Utah SoCCS 6961 - Lecture 1523 UML Deconstructed Trust me when I say we can have a class just on the future of modeling, DSMLs, advanced model development… –Well, I hope so, because… It’s a planned seminar next semester (CS 7940-00x, TBA) –Prof. Kessler likely to be the official instructor I’ll be lucky to TA a 1000 level class after this…
24
University of Utah SoCCS 6961 - Lecture 1524 UML Seminar Open to all that took this class –This includes seniors as well If you’ve never taken a seminar, I encourage it highly! Much different than this class –One credit hour: You must present a paper to the class (Suggested papers will be available) –Three credit hours: Independent project subject to my approval (limited to 2 students)
25
University of Utah SoCCS 6961 - Lecture 1525 Coming Up An assortment of topics of interest to you –Or, pick your instructors brain. Again, if you have any other suggestions, let me know. –Also, look for HW5 this week!
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.