Book a Demo

Author Topic: Modeling web applications with UML  (Read 18071 times)

mariano774

  • EA Novice
  • *
  • Posts: 13
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Modeling web applications with UML
« on: April 06, 2005, 07:47:15 am »
Hi

I'm modeling some ASP web applications using UML, and I'm using the Rational Propose.  Using this, you model a web page as a class for which  you define attributes and methods, but what I don't see in the paper is how to model the "#Include File".

I'm not sure if I should model it as a composition association, since the included page does becomes a part of the including page, or model it as generalization to show the attributes and methods inherits, that would be including page inherits from included page

Anybody thought of this before ??

thomaskilian

  • Guest
Re: Modeling web applications with UML
« Reply #1 on: April 07, 2005, 01:25:36 am »
I would use the nesting relation. Just a thought...

alexj

  • EA Novice
  • *
  • Posts: 13
  • Karma: +0/-0
    • View Profile
Re: Modeling web applications with UML
« Reply #2 on: April 20, 2005, 08:24:51 am »
Nesting sounds good.

I would go for Aggregation though.

Cheers

slavko

  • EA Novice
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
Re: Modeling web applications with UML
« Reply #3 on: April 20, 2005, 11:04:15 pm »
Typically I’ve also modeled this as an aggregation.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Modeling web applications with UML
« Reply #4 on: April 20, 2005, 11:58:47 pm »
FWIW,

I, too, have been struggling with the conceptual difference between nesting (containment) and composite aggregation.

Does anybody have a definitive answer?

My view is: it has to do with a form of visibility...  If you can't see the contained item without opening the container first, you have containment (nesting).  Else you have composition.

In other posts, I've noted that some other products will actually nest the nested element below the container in the browser! 8)

What they do with multiple containment, I don't know.  It would seem that IS allowed.

Thoughts?

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

thomaskilian

  • Guest
Re: Modeling web applications with UML
« Reply #5 on: April 21, 2005, 02:01:33 am »
To me it seems that nesting is a relation that should be used more along with packages. Most "official" diagrams I've seen used the nesting relation only in connection with packages. Maybe to allow representing some sort of tree structure?

slavko

  • EA Novice
  • *
  • Posts: 17
  • Karma: +0/-0
    • View Profile
Re: Modeling web applications with UML
« Reply #6 on: April 21, 2005, 02:50:04 pm »
I know its not quite UML’ish but I’ve also dragged and dropped other UI diagrams into “parent” diagrams.  When you do this you get 3 options.  Show as a link, Show the actual diagram or show as a frame.  Each has its own benefits, some save space; others can in-effect model linked pages almost like an actual URL.

-Slavko

thomaskilian

  • Guest
Re: Modeling web applications with UML
« Reply #7 on: April 22, 2005, 02:54:30 am »
Quote
I know its not quite UML’ish but I’ve also dragged and dropped other UI diagrams into “parent” diagrams.  When you do this you get 3 options.  Show as a link, Show the actual diagram or show as a frame.  Each has its own benefits, some save space; others can in-effect model linked pages almost like an actual URL.

-Slavko

Wrong thread, isn't it?

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Modeling web applications with UML
« Reply #8 on: April 23, 2005, 03:13:09 am »
Quote
To me it seems that nesting is a relation that should be used more along with packages. Most "official" diagrams I've seen used the nesting relation only in connection with packages. Maybe to allow representing some sort of tree structure?


Yes, Thomas, I agree that the UML specs only show this relation in the context of packages, but they don't (as far as I can tell) exclude it's use elsewhere, presumably so long as it is semantically valid to be used at that point.

In addition, a number of tools (including EA) allow it's use fairly universally.

As you say, it appears to be about structural containment.  So what's the difference between structural containment and composite aggregation?

I think I can use (and am using) nesting for Requirements decomposition.  I'd like to use it in other places, but first I have to understand its applicability.  To understand its applicability I need to understand its nature...  Hence my questions.

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

thomaskilian

  • Guest
Re: Modeling web applications with UML
« Reply #9 on: April 25, 2005, 02:23:54 am »
I do not make (much/any?) use of nesting relations. For what I'm trying to express, simple stereotyped relations seem to be good enough. Probably my kind of work is not so highly sophisticated to actually make the difference visible :P

OTOH it might raise the question why OMG introduced a new kind of relation. I suppose the eggheads found a hole somewhere that had to be filled with a nesting relation. Blame me, I can't see that hole ;)

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Modeling web applications with UML
« Reply #10 on: April 25, 2005, 06:33:40 pm »
Quote
OTOH it might raise the question why OMG introduced a new kind of relation. I suppose the eggheads found a hole somewhere that had to be filled with a nesting relation. Blame me, I can't see that hole ;)


Hi Thomas,

Like you, I was surprised to see it there...  But on the whole I've found the eggheads on UML2 to be pretty good so far.  What about a Sparxian throwing in their view?  They've implemented it, what was their understanding?

Paolo
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: Modeling web applications with UML
« Reply #11 on: April 25, 2005, 07:30:39 pm »
I dont know whether this is the real reason, but I have found the following syntactical use for nesting links in any diagram between (sort of) any element pair.

In some models it is clear what the intent of association links (and aggregation links) mean within the specific context of the diagram.  For example, an association between two nodes in a deployment model adorned with the label <<TCP/IP>>  fairly easily indicates a communication link.  Now add another element - named "TCP/IP stack".  I want to show that the stack is contained within one of the nodes.  Using a nesting link clearly visually indicates to the viewer that I am talking about a different  type of connection here.  

Now, if we start to decompose the TCP/IP stack on the same diagram  into a set of TCP and IP and linked list classes, the aggregation links convey a specific semantic relationship between elements that is again very different from the nesting link between the stack and the node.

IOW, I see the nesting link as a visual highlighter, yes representing "physical containment"  but adding no other implied relationship.

By that I mean the following.  Lets start with something pretty stupid, a class with an inner class that has no logical relationship to the containing class. Say class "fruit" with an inner class of "screwdriver".  There is no logical association, or aggregation, between fruit and screwdriver.  But there is a containment relationship, and one with no implied logical relationship.

Now we wouldn't build this class structure - well no sane coder would anyway - but if we stop the sillyness and talk about a more logical example.  Consider class "tree" with an inner class of "fruit".  Now there will be a logical relationship between the two - maybe even more than one - maybe even multiplicity is involved.  These can be modelled using the appropriate association and aggregation links, each of which conveys that specific logical relationship.  Now maybe the containment is unimportant from the POV of the model, and need not be included.  Perhaps it is even implied somehow in the diagram.  But if I want to explicitly talk about this containment I can use a nesting link.

bruce
« Last Edit: April 25, 2005, 07:51:38 pm by sargasso »
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.

Paolo F Cantoni

  • EA Guru
  • *****
  • Posts: 8626
  • Karma: +259/-129
  • Inconsistently correct systems DON'T EXIST!
    • View Profile
Re: Modeling web applications with UML
« Reply #12 on: April 25, 2005, 09:27:15 pm »
Quote
I dont know whether this is the real reason, but I have found the following syntactical use for nesting links in any diagram between (sort of) any element pair.

[SNIP]

IOW, I see the nesting link as a visual highlighter, yes representing "physical containment"  but adding no other implied relationship.

[SNIP]

bruce


Sounds good to me, Bruce, and would be consistent  :D with Thomas's points.

So, if I understand you correctly, syntactically, "nesting" would only apply to those elements that are able to contain (collections of) other elements?

Back to my observation that some tools will automatically alter the browser when you "nest" one element inside another.  In your example, fruit would appear "under" tree and not be visible, until you "opened" tree.  Does that fit in with your ideas?

If so, do you see any problems with multiple containment (such as the TCP/IP stack in multiple nodes).  Would each node become a branch with a stack elements "underneath" (within) it?

Paolo
« Last Edit: April 30, 2005, 06:04:31 am by PaoloFCantoni »
Inconsistently correct systems DON'T EXIST!
... Therefore, aim for consistency; in the expectation of achieving correctness....
-Semantica-
Helsinki Principle Rules!

jeshaw2

  • EA User
  • **
  • Posts: 701
  • Karma: +0/-0
  • I'm a Singleton, what pattern are you?
    • View Profile
Re: Modeling web applications with UML
« Reply #13 on: April 29, 2005, 09:31:39 pm »
Quote
FWIW,

I, too, have been struggling with the conceptual difference between nesting (containment) and composite aggregation.

Does anybody have a definitive answer?



I'm not a UML expert, or even a journyman, but I think the onset of nested classes in UML may be in support of a feature lately added to the Java Language.  Here is a link to the Java tutorial that talks about what a nested class and what kinds of problems it solves.

http://java.sun.com/docs/books/tutorial/java/javaOO/nested.html

I have other similar links if anyone is interested...

Cheers
Jim
« Last Edit: April 29, 2005, 09:34:55 pm by jeshaw2 »
Verbal Use Cases aren't worth the paper they are written upon.

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: Modeling web applications with UML
« Reply #14 on: May 01, 2005, 09:14:59 pm »
Quote
problems with multiple containment (such as the TCP/IP stack in multiple nodes).


In that specific example, no. This is because the nested elements would be instances not the TCP/IP classifier.  So each node would have its own object nested beneath.  Why you would want to have that on a model is oos!

In the case of nested classifiers, I cant think of an example where you would want to have the classifier nested in two places.

bruce

"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.