0
votes

I need to do a Stack MEAN UML diagram, the problem is that JavaScript is a prototype based language, and it doesn't have classes.

How can I represent the relations between JavaScript objects in UML?

In the other hand, Angular has a lot of features that implement design patterns for themselves like dependency injection, routes, factories, $scope, $inject...

How can I represent this pattern design in an UML diagram?

1
In theory you could model your JavaScript objects as objects in uml as this is what they are. You could set run state using this method. However I’ve never tried representing prototyping, I wonder if a generalisation would be good enough. This is tricky as protyping is a dynamic process and timing would be absent from such an model.muszeo
This blog does a pretty good job IMO using deployment and sequence diagrams. As for the general question about JavaScript and UML, I think it's been asked here: softwareengineering.stackexchange.com/q/164958/51948Fuhrmanator

1 Answers

0
votes

These patterns can best be described using UML sequence diagrams. The life lines in these diagrams represent JavaScript objects. In order to avoid too many life lines in one diagram, you should carefully choose which kind of objects you do and which kind you don't display.

Based on my experience in designing Angular applications, I have written a white paper on this subject: Technical design in UML for Angular applications.