In this article, we are going see about what is YAML file, Why we need this and what is the advantage of using this file.
YAML stands for Ain't markup language.
YAML file is mostly used for providing configuration information which is needed for an application. For example, it provides server port, database related details like a database, username, password, customs data and etc. We can say YAML file is alternative of the property file(e.g file_name.property).
It contains configuration information in the hierarchical format so it is very easy to read and edit.Whereas in Property file repeated line will occur. This one of the reason people moved to the YAML file(e.g file_name.yml) instead of the Property file.
YAML is a human friendly data serialization standard for all programming languages. The YAML file end with the filename.yml (.yml) extension.
The following points will illustrate why YAML file is most using for configuration:
Conclusion:
I hope above given reason will illustrate Why YAML file is mostly using for configuration instead of the Property file for configuration.
Below comment it if you have any queries or doubt regarding this article.
YAML stands for Ain't markup language.
YAML file is mostly used for providing configuration information which is needed for an application. For example, it provides server port, database related details like a database, username, password, customs data and etc. We can say YAML file is alternative of the property file(e.g file_name.property).
It contains configuration information in the hierarchical format so it is very easy to read and edit.Whereas in Property file repeated line will occur. This one of the reason people moved to the YAML file(e.g file_name.yml) instead of the Property file.
YAML is a human friendly data serialization standard for all programming languages. The YAML file end with the filename.yml (.yml) extension.
The following points will illustrate why YAML file is most using for configuration:
- It used to represent the data in the hierarchical format. So this makes it easier to read, understand and edit.
- It removes the boiler plate code to provide configuration information where as in Property file we need to rewrite the same configuration information for the particular category. For example, let's take it as database information, in that repeated line of code will occur to give database name, Dialect, username and password.
- It is alternate of the property file for providing configuration information which needs for an application.
- It is a subset of JSON Library.
- It supports externalized configuration. Like we can give the different environment details in the same file separated with (---) 3 dash. e.g we can provide configuration detail in a single file for to use testing, development, and production environment.
- It is used to provide external application properties like hard coded details, constant values wherever needed. it is like a global access.
Conclusion:
I hope above given reason will illustrate Why YAML file is mostly using for configuration instead of the Property file for configuration.
Below comment it if you have any queries or doubt regarding this article.
