3 Reasons Why Your Self Diagnosed Food Sensitivity Might be Misleading You

Our bodies are a complicated, intricate system. The food we eat causes many different reactions, and some people have serious food allergies or food intolerances. So it’s natural that we want to…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




REST URI naming Best practices

When creating a REST Service different people follow different naming conventions when writing their URIs. However, this can make their code difficult to read and understand by others. In this article, we will be taking a brief look at the best practices to follow when writing a URI.

Example for using Nouns

2. Naming a single object using a singular name : When writing a URI to perform a search for a single object or some form of reading or writing, it is better to use a singular name at the end of the URI as it makes it easier to understand that only one object is modified or read.

Example of using Singular names

3. Naming a collection of object using a plural name : Opposite to a singular object, when referring to a collection of object or a data point that returns multiple records, it is better use a plural name for it. This way its easier for the person who using the URI to store in a suitable datatype.

Example of using plural names

4. Use of forward slash to denote a hierarchy “/” : When naming a URI which goes into multiple resources, it is better to use forward slashes to indicate the hierarchy. It is easier to follow the same hierarchy that was used when designing the database solution.

References

Add a comment

Related posts:

How the Cryptocurrency Adoption And Regulation Affect the Cryptocurrency Market.

Cryptocurrency is a digital or virtual currency that uses encryption techniques to secure and verify transactions and to control the creation of new units. Adoption and regulation are two key factors…

Can You Keep Your Track Record After an ETF Conversion?

We get a lot of questions related to whether or not you can keep your official track record when you do a tax-free ETF conversion. The short answer is yes, you can keep your official track record…

Why CEOs Need to Pay More Attention to the True Cost of Weak Leadership

The definition of leadership in modern origination has evolved over the last 20 years, becoming very exclusive rather than inclusive. Merriam-Webster’s traditional meaning is “a position as a leader…