4

I am designing an web application based on 3rd tier architecture client side : HTML5 , CSS , JS , jQuery .. middle tier : nodeJS Database : mysql

I need to do the general design of the middle tier part using UML diagrams. what's confusing is that nodeJS is not class oriented like Java and C++ , so the question is can I implement a class diagram for the node part and if not what are the alternatives ?

D-W-A
  • 551
  • 2
  • 7
  • 12

2 Answers2

0

Don't beat me if I'm too far off but nodeJS is some kind of middleware. That means it transforms some input to some output in a black box. You can model that as component having a required and a provided interface.

Something along this line: enter image description here

qwerty_so
  • 35,448
  • 8
  • 62
  • 86
  • so can how can I model the functions and object using UML? – D-W-A Jun 06 '15 at 20:00
  • See my edit. This should be feasible. The provided interface are methods from NodeJS. If NodeJS needs anything from outside also add the Required Interface (I'm not that deep in those matters to know for sure). – qwerty_so Jun 06 '15 at 20:31
  • okey this sounds like a reasonable design way but is it one of UML diagrams and if so can you please give its name so I can investigate more – D-W-A Jun 06 '15 at 20:34
  • The above is simply a class in a class diagram. The lollipop and socket are alternative representations of realized and required interfaces. – qwerty_so Jun 06 '15 at 20:37
0

You can think your application design in terms of UML Classes and you can code using one of the temporary approaches to Classes in JavaScript and class is planned core feature in the upcoming JavaScript 6. So classes are the way to go.

Object Oriented Programming with classes is a programming paradigm, way to look at things, way to give names to things...

See also:

xmojmr
  • 8,073
  • 5
  • 31
  • 54