What is your least preferred technical catchphrase

Technical things for non-technical people (part 1)

Inside adesso

May 3, 2018 by Annegret Junker

I am often asked to explain very technically complex things to people who have no IT knowledge, for example. Due to the lack of knowledge, I tried to explain certain basics in such a way that this group of people is also able to recognize the technical principles, connections and dependencies. In the first part of my blog series "Technical things for non-technical people" I would like to explain various data formats to you in more detail.

Data structures - what do they mean?

Data is usually stored in a more or less structured way. The following example will make the whole thing a little easier to understand: Let's assume you want to open an online clothing store. Your shop is set up in such a way that the user is able to create a user profile, which means that special offers for all equipment can be created automatically. Specifically, this means that visitors to your shop can define their favorite color, their favorite pants and shirt styles or their preferred shoes in their profile. In a structured way, such a user profile would look like this:

Structured representation of a possible user profile

You need this structure to transfer the relevant information from one service to another - for example from a configuration service to the shop or from a backend service to the web or mobile client. In simplified terms, you can better imagine the structure shown above as an Excel table. This would then look like this:

As you can see, you always need the name of an item and its value. The whole thing is called the “key value database” (key value pairs). Admittedly, in our example, such key value pairs don't really look efficient and they would hardly be used. But if you have settings that rarely change and are usually only changed at individual points, key value pairs make sense.

However, you can only interpret the content correctly if the indentations are correct. Otherwise the user of your online shop might get a leather shirt instead of a cotton shirt. Accordingly, it makes more sense to transmit all of the information and structure it with indentations. You can use different formats for this, three of which I would now like to introduce to you in more detail.

YAML, JASON and XML

The YAML format - short for "YAML Ain’t Markup Language" - is a simplified markup language for data serialization. YAML assumes that any data structure can only be represented with associative lists, lists and individual values. Therefore, this concept is much easier to read and write by humans than, for example, XML. In addition, the further processing of the data is simplified, since most languages ​​have already integrated such constructs.

YAML uses indentations to represent hierarchical structures:

Example of using YAML

The following format is called JSON - Java Script Object Notation:

Example of using JSON

This format is used in mobile and web applications to exchange data between the client (e.g. an app) and the server side (e.g. a cloud). JSON is widespread and is used specifically for microservices and REST interfaces.

As you can see, we also have key value pairs here that belong “somewhere”. This “belonging” is expressed by indentations and curly brackets.

The end of an entry can be described by a comma or by a curly bracket. There is a risk of errors in the content, even if the data is syntactically correct. To be sure where an object ends, you need a key at the beginning and at the end.

The next format I'd like to introduce to you is called XML - Extended Markup Language:

Example of using XML

Although this markup language is very reliable, it requires more memory. In addition, with XML you have a poorer performance in terms of data storage. Therefore, interfaces that use XML - such as SOAP - are usually "slow" and cannot be adapted that quickly. However, the use of XML offers an easily understandable markup language that can be used by many tools and standards.

Conclusion

As you have seen, there are definitely differences between the three markup languages ​​mentioned. YAML is very easy to read and edit, JSON is easy to understand thanks to its simple notation and XML scores above all for its versatility. Of course, there is a lot more to know about these three formats. However, I hope that with my contribution I was able to bring the rough differences closer to you in a simple and understandable way.

By the way, in my next blog post I will deal with microservices and REST interfaces. So it remains exciting.

Would you like to find out more about exciting topics related to software, development or projects? Then take a look at our other blog posts.

More blog posts from this section:

Author Annegret Junker

Annegret Junker is a Senior Software Architect at adesso. She has been working in the software industry for more than 25 years - also in very different domains: Automative, FinTech and general administration. Annegret is interested in new technologies, architectures and approaches.