UML design for a nodeJS web application - node.js

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 ?

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:

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:
uml-diagrams.org: Class Diagrams Examples

Related

What type of UML diagram should I use to model the parts of a web app?

What type of UML diagram should I use to model the parts of a web app?
For instance, lets say my parts are as followed:
Server
Database
Web App
Multiple APIs
The web app interacts with all the other parts in some way. From my research, the best options seem to be either component, deployment, or sequence.
Here's a general idea that I'm going for with my diagram, but I do not know which UML diagram this would best be represented in.
If you know the diagram I should use, I would like to know how each part is represented in the diagram. For example, in a deployment diagram, I know that a server/database would be nodes. And, APIs would possible be artifacts?
For designing a web app (or any other type of software application), following a best practice Model-View-Controller (MVC) codebase architecture, you first need to make an information design model, typically in the form of a UML class diagram, defining the model classes, or the "model", of your app. The "view" (or user interface) of your app is based on the model.
Your diagram attempts to model the deployment architecture of your app. But this question comes after choosing a codebase architecture and an information architecture.
You can find more explanations about the architecting process, and the code of several example web apps, in my book Web Applications with JavaScript or Java, which is also available as an open access online book.
This depends a lot on what you're wanting to model and communicate. All of the diagram types you mention would be useful ways to describe a web app. Each focuses on a different aspect of the web app -- component models are about software component structure (database, web app, apis), deployment models show how instances of these components are deployed into deployment nodes (servers, devices etc). Like Thomas says, this is a very broad question -- in essence you are asking how should you describe your web app's solution architecture which is not a trivial exercise. Is there something more specific I can help with -- can you narrow down what it is you want to show about your app?
Your start with the component diagrams is fine. Generally your question is too broad to be answered here, but a few bread crumbs anyway:
In a next step you can describe the single components which are hosted inside the single nodes. You can make the nodes navigable (means you have a composite diagram showing their guts) so you can place component instances showing their interfaces. The latter can be shown with either lollipops or as stereotyped classes which the single components implement. Following that you can break down components in a similar fashion showing how the components are implemented with various classes and how these realize the single interfaces. It's possible to show the interfaces outside the components and <<delegate>> them inside the specific classes.
The story goes on, but it's too big to be told here.

What is the difference between a UML node and a UML component?

I am designing an UML diagram for an Apple Watch Extension. How should I represent host app using UML ? UML Node or UML component ? Please note that there can be inter app communication between the extension app and the iPhone app (host app).
UML nodes are apparently used to depict physical resources, so your watch would be a node, whereas a component is usually understood as a software component. Since you want to model software, go with components (which will also nicely visualise the plugging between extension and host).
uml-diagrams.org explains the basic difference as "node is a deployment target" while "component is a structured class representing a modular part of a system"
They're typically used in different kinds of diagrams with different purposes. e.g. in UML Class Diagram both extension app and iPhone app would be represented as UML Class
You can, however, create your custom diagram mixing whatever UML artifacts you need - to make your design message clear to the readers
-Node represent the physical part of the system. for instance , server ,network and printer etc.
-Component represent any part of the system it might be physical aspect such as libraries ,file ,executables,document,packages etc that reside on the node.
-Component - refers to a module of classes that represent independent systems or subsystems with the ability to interface with the rest of the system.so it tells who does the system functionality.
Components are things that participate in the execution of a system; nodes are things that execute components.
Components represent the physical packaging of logical elements; nodes
represent the physical deployment of components.

UML - Hybrid between component and activity diagrams

I currently work on a rather large system that consists of a WinForms app that uses WCF services and a database at the bottom. If you think about a use case or a requirement, what a developer needs is a quick overview of the implementation of that particular use case (or requirement). A person who knows the systems could very quickly verbally explain that these two views (or subviews) are used in the UI, they are data-bound to this controller, which uses this WCF service to get this DTO. The service uses this business class, which uses this data adapter, and the data is in these tables in the database.
I think in most cases it would be possible to convey all this information in a single diagram. However, it would be a kind of a hybrid between component and activity diagrams as it shows both workflow and the components that are involved. UML obviously doesn't have such a diagram, but I was wondering if anyone has done anything on these lines and what tools you have used.
I dont think activity diagram is appropriate here. Activity diagrams, as far as i believe are intended for somebody to understand how the module/system works without getting into the technical part. But then if you can express all that what you said in an activity digram and if your team and your audience are able to decipher things, then sure. Getting back to your scenario, i have done this before and a UML sequence diagram has helped me here. A sequence diagram depicts sequential object interactions. You might wanna check it out

Suitable diagramming type and tool for a model based on DevExpress Domain Components

I'm busy prototyping a training management app using the DevExpress eXpressApp framework & Domain Components. This paradigm uses interfaces to specify domain entities, with default implementation logic generated at runtime, so that I can effectively enjoy multiple inheritance in my business entities.
I'm curious as to what sort of diagram I could use here to communicate my design assumptions to my client, without requiring me to build and deploy too frequently merely to confirm my assumptions etc. Hopefully fellow SO users familiar with this framework and it being used like I am doing can shed some light on this.
I felt that your question is a duplicate to Design and Modeling for DexExpress eXpressApp Framework. Basically, you will be able to model individual domain components using built-in Visual Studio modeling tools. It works pretty well with interfaces. Probably, you can also build a custom modeling solution based on an open source Liekhus ADO.NET Entity Data Model XAF Extensions tool.
Finally, since you are using XAF (and I believe you are also a DevExpress customer), I suggest you contact our Support Team to get fast and guaranteed assistance on XAF or any other DevExpress products.
You can model with a class diagram but what is generated at run time can not be modeled. I mean that for example if you have a model then you use the Model Driven Development in order to generate a code from your model then the generated code is not anymore your model but only the code like your run time classes.
Hope this help.

UML diagram for web service dependencies

I am attempting to draw a UML diagram for the our web service dependencies. I need to break down how all the projects in our solution interact with different web services.
My initial thought what to use Communication Diagram but that did't seem like the right choice when I looked at some examples. Does anyone have any suggestions? Is there an industry standard? I did seethis question here as well but I am asking what TYPE of diagram do I choose.
Looks like according to this I should be using a Package Diagram

Resources