Why to diagram all before start coding

Even if you already understand what is required and how to start coding your solution. The best approach will be create one or more diagrams of how will your solution be interact with its environment.

A sequence diagram will help you to know how your classes and participants will interact and what could be optional.

For example it is easy to do a simple code to add two numbers, but what about possible errors and how interaction will work, do have a better idea and to have clear the responsibilities a good idea could be a simple sequence diagram.

*
This diagram could show us a better idea of how the app will work and maybe can help us on understand better how we should do the division of the work or which kind of pattern could we use.

Now what if we create a class diagram to separate the responsibilities and organice how code will be done.

**

This diagram could help us to define classes with its attributes and methods that could make easier to know the code we will made.

This is just an example but hope it could be as a quick intro on how and why we need to diagram our solution. Please feel free of asking any thing or suggest any change.


-------------------------------------------
* https://www.websequencediagrams.com/
** https://www.draw.io

Comentarios

Entradas populares