More

    ET – DESIGN DECISIONS

    Package name: Plural vs Singular (controllers vs controller, services vs service etc..)

    Packages assists with organization of code and resolution of naming conflicts. If a package is named in the singular, it doesn’t mean that each member of the package is an instance of the package; it contains related but heterogeneous concepts. If it is named in the plural (as they often are), I would expect that the package contains homogeneous concepts. (https://softwareengineering.stackexchange.com/questions/75919/should-package-names-be-singular-or-plural)

    Normally we follow naming package in singular but plurals can also be used and it should be named properly . Refered below link

    https://stackoverflow.com/questions/11673750/is-it-good-practice-for-java-class-names-to-be-plural

    Collection URLs in REST (expenses vs expense)

    Collections are set of resources, e.g Companies is the collection of Company resource.

    The resource should always be plural in the API endpoint and if we want to access one instance of the resource, we can always pass the id in the URL.

    Use “plural” name to denote collection resource archetype.

    http://api.example.com/device-management/managed-devices
    http://api.example.com/user-management/users
    http://api.example.com/user-management/users/{id}/accounts

    References: https://restfulapi.net/resource-naming/

    https://hackernoon.com/restful-api-designing-guidelines-the-best-practices-60e1d954e7c9

    Open Questions:

    1. Spring Data Rest vs Spring Data JPA vs Spring JDBC

    NOTE: This is a running note.

    Recent Articles

    OAUTH – FREQUENTLY ASKED QUESTIONS FOR INTERVIEWS AND SELF EVALUATION

    Why is refresh token needed when you have access token? Access tokens are usually short-lived and refresh tokens are...

    SUMO LOGIC VIDEOS AND TUTORIALS

    Sumo Logic Basics - Part 1 of 2 (link is external) (Sep 29, 2016)Sumo Logic Basics - Part 2 of 2...

    GIT – USEFUL COMMANDS

    Discard all local changes, but save them for possible re-use later:  git stash Discarding local changes...

    DISTRIBUTED COMPUTING – RECORDED LECTURES (BITS)

    Module 1 - INTRODUCTION Recorded Lecture - 1.1 Introduction Part I – Definition

    BOOK REVIEW GUIDELINES FOR COOKBOOKS

    Whenever you add reviews for the book, please follow below rules. Write issues in an excel.Create an excel...

    Related Stories

    Leave A Reply

    Please enter your comment!
    Please enter your name here

    Stay on op - Ge the daily news in your inbox