From Classes to Code

Making diagrams while developing a project is really useful, it helps connect ideas, shows a clear way of the architecture or the behavior of the various systems and they will become kind of a guide at the moment of coding the project. But at te end of the day diagrams are just diagrams, a pretty picture. What it is important is the value given to it and what useful information is put to it. In other words various diagrams will have different importance at the time of actually starting to code something. This really depends on your approach in choosing the language of implementation, libraries to be used or maybe databases or services to be created.

That is why this blog will attempt to explain how is the process of collecting data shown in diagrams and actually implementing it it’s done.

UML Diagram
Code made from interptreting an UML Diagram

Choose your tools:

 Deciding what is the best language to code the software is very important to translate a diagram. Yes technically all languages are capable of just about the same thing but some of them perhaps will make the software run faster or be optimized, and the most important point, the implementation can be a lot more difficult in one language than in another.  

Some things to consider:

While it is important to consider the efficiency a language can bring to the table before others, it is also recommended choosing one that you are familiarized well enough with. Otherwise yes, maybe it will be efficient and in better state but the time to code it will raise a lot more than if you code it with something well-known or, because of the inexperience with the language, the program will turn out buggy or even inefficient. Do not misunderstand in allways choosing the language you know best, just choose from the ones you kind of know about.

Familiarize yourself with what the diagram means, the difficulty of translating a diagram into code varies a lot between projects and developers, one criteria being the understanding of the software to be implemented and the things it will require.

Finally don’t be afraid of  potential mistakes, when translating a diagram to code a lot of common logical mistakes are avoided already, the ones left will be easier to solve than if the code was made without planning first. The errors that will occur during the implementation will be eventually solved.

Diagrams to a non-object oriented language:

Lots of diagrams in UML tend to direct themselves to an object oriented environment. But worry not because translating diagrams can also be done into a non-object oriented language. UML diagrams or well object oriented diagrams tend to represent two things off of software: The architecture (how it is made or what are its components) and its behavior (what will it do or how will it interact). Meaning objects, while recommended, are not entirely necessary to the process. You just have to pay attention to the requirements of a system and how would it behave.

Leave a comment

Design a site like this with WordPress.com
Get started