Unified Modeling Language (UML) is not a program language that where you can write code and create something that a computer will understand; but is a way to represent, build or record the elements of an oriented object software.
“Modeling is the designing of software applications before coding.”
In UML you design diagrams that can contain different elements of the software, for example, the most common is the one where you write the name of the class, its attributes and its methods. But it all depends of the diagram you use. In UML there are many different diagrams with different uses and elements that you can write.
Is not necessary to become an expert of UML because is not actually a must for learning actual coding, but is important to know about it because it helps in the design part of software. Creating an UML diagram is like drawing a sketch, is not that important and is unnecessary to put much effort on it, just with understanding the idea is enough.
There are many UML diagrams (13 to be exactly) so in the next section there are only the three most important.
Activity Diagrams are used to design complex methods. It describes phases or activities done by the computer or an user. They are also used to describe business processes in a single usage scenario. They look a lot like flowcharts, actually, activity diagram is an upgraded version of flowcharts. Take a look at this example:
flickr photo by jean-louis zimmermann https://flickr.com/photos/jeanlouis_zimmermann/3204423336 shared under a Creative Commons (BY) license
This example describe a generic shop process. As you can see some task are only for a specific agent and reading it is really if you already know flowcharts. The diagram starts from the top and tells perfectly who is doing what and what conditions need to be completed first to start doing it. Activity Diagrams is one of the most important because describe the task of the program while being used by the consumer in a really simple way. Also, it is not only used on Software Engineering, it is important in business to analyze the interaction between the whole process of delivering a service.
This diagram is used to represent classes and their relationship. They’re represented by using boxes and arrows. Each of the boxes represents a class and the stuff inside it. Most of the time they are broken into three parts: class name, attributes, and methods. Agile Modeling mentions that using this structure means making a design decision and should be avoided if one is only looking for a conceptual model of the class. The arrows are used to represent inheritance and other relationships between classes. Here is an example of a simple class diagram:
<div about='https://farm1.static.flickr.com/102/313279701_1d01a732c5.jpg'><a href='https://www.flickr.com/photos/beatak/313279701/' target='_blank'><img xmlns:dct='http://purl.org/dc/terms/' href='http://purl.org/dc/dcmitype/StillImage' rel='dct:type' src='https://farm1.static.flickr.com/102/313279701_1d01a732c5.jpg' alt='Class Diagram: Builder Pattern by beatak, on Flickr' title='Class Diagram: Builder Pattern by beatak, on Flickr' border='0'/></a><br/>"<a href='https://www.flickr.com/photos/beatak/313279701/' target='_blank'>Class Diagram: Builder Pattern</a>" (<a rel='license' href='https://creativecommons.org/licenses/by-nc/2.0/' target='_blank'>CC BY-NC 2.0</a>) by <a xmlns:cc='http://creativecommons.org/ns#' rel='cc:attributionURL' property='cc:attributionName' href='https://www.flickr.com/people/beatak/' target='_blank'>beatak</a></div>
Connections between classes may have tags that further explain how the objects will communicate. Some phrases to describe relationships are: lives at, enrolled in, instructs, and on waiting list. These relationships can also contain numbers that specify the amount of objects on each part of the relationship. One Object may hold many instances of another class while those hold even more objects. These numbers help control interactions and how often they should happen.
Class diagrams are among the most popular in UML thanks to the popularity of Object Oriented Programming. It also helps that OOP can be represented in a very understandable and simple way. UML lets developers communicate what a class will do.
According to Donald Bell in an article for IBM developerWorks, this diagram is used to show in sequential order the interactions between two objects. This diagram is also called event diagrams or event scenarios. The main purpose of a sequence diagram is to define how related event sequences should result in a desired outcome, it models in a graphic way the flow logic of a system and it’s typically used to model usage scenarios and the logic of methods or services.
This kind of diagram is important because it shows the interaction logic between the the objects in the system in the time order that the interactions occur, which makes it specially useful to use to document a system's requirements and design and it allows people to document and validate their logic. .
<div about='https://farm3.static.flickr.com/2416/1748174721_c87cf0c363.jpg'><a href='https://www.flickr.com/photos/carolshergold/1748174721/' target='_blank'><img xmlns:dct='http://purl.org/dc/terms/' href='http://purl.org/dc/dcmitype/StillImage' rel='dct:type' src='https://farm3.static.flickr.com/2416/1748174721_c87cf0c363.jpg' alt='Sequence diagram for synchronisation of by carol shergold, on Flickr' title='Sequence diagram for synchronisation of by carol shergold, on Flickr' border='0'/></a><br/>"<a href='https://www.flickr.com/photos/carolshergold/1748174721/' target='_blank'>Sequence diagram for synchronisation of</a>" (<a rel='license' href='https://creativecommons.org/licenses/by/2.0/' target='_blank'>CC BY 2.0</a>) by <a xmlns:cc='http://creativecommons.org/ns#' rel='cc:attributionURL' property='cc:attributionName' href='https://www.flickr.com/people/carolshergold/' target='_blank'>carol shergold</a></div>
UML is not a development method, but from there you can create oriented object software with any language that support oriented object programming, just like if they were instructions of how to do something, and the language you use, is the tool to create it.
If you want to check out my partners' blogs:
Gerardo Juarez Lopez ( https://gerajrz.wordpress.com/ )
Andrés Barro Encinas (andresbarroe.wordpress.com)
Lucía Velasco García (luciasblogweb.wordpress.com)
And as always, here is another video:
And as always, here is another video: