By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,281 Members | 2,216 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,281 IT Pros & Developers. It's quick & easy.

How would the relationship between an object and its prototype be depicted...

P: n/a
Ray
in UML? I just found that UML is actually very class-based. It's
difficult to depict the relationship between a constructor function,
its prototype property, and objects that are created using that
constructor function using UML.

Have any of you ever attempted this? How would you do it?

Thanks,
Ray

Jan 18 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a

Ray wrote:
in UML? I just found that UML is actually very class-based. It's
difficult to depict the relationship between a constructor function,
its prototype property, and objects that are created using that
constructor function using UML.

Have any of you ever attempted this? How would you do it?

Douglas Crockford depicts objects visually many times in the first of
these three videos

<URL: http://yuiblog.com/blog/2006/11/27/video-crockford-advjs/>

Don't know if that is formal UML or not but I have a feeling it isn't.
Perhaps it will give you some ideas.

Peter

Jan 18 '07 #2

P: n/a
Ray
Peter Michaux wrote:
Douglas Crockford depicts objects visually many times in the first of
these three videos

<URL: http://yuiblog.com/blog/2006/11/27/video-crockford-advjs/>

Don't know if that is formal UML or not but I have a feeling it isn't.
Perhaps it will give you some ideas.
Many thanks, Peter!
Peter
Jan 18 '07 #3

P: n/a
Ray wrote:
in UML? I just found that UML is actually very class-based. It's
difficult to depict the relationship between a constructor function,
its prototype property, and objects that are created using that
constructor function using UML.

Have any of you ever attempted this? How would you do it?
I thought UML was for modelling logic and processes in a way that is
independent of the programming language that might be used to implement
them.

You might be interested in using it to depict prototype inheritance if
you are using UML to model javascript itself, otherwise it makes no
sense to me.
--
Rob

Jan 18 '07 #4

P: n/a
Ray
RobG wrote:
I thought UML was for modelling logic and processes in a way that is
independent of the programming language that might be used to implement
them.

You might be interested in using it to depict prototype inheritance if
you are using UML to model javascript itself, otherwise it makes no
sense to me.
Hi Rob,

Yes, indeed, you are correct. I am modeling JavaScript itself, wrt its
mechanism for prototype-based OOP.

Thanks,
Ray
>

--
Rob
Jan 19 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.