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-pac...)

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-jav...

 

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-practic...

 

Open Questions:

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

 

NOTE: This is a running note.

Contact

We learn together, do innovations and then document them at cloudericks.com.

Offline Contact
We connect physically only in Bengaluru currently, but most of our activities happen online. Please follow us here or in social media for more details.
WhatsApp (Primary): (+91) 7411174113
WhatsApp (Secondary): (+91) 7411174114

Business newsletter

Complete the form below, and we'll send you an e-mail every now and again with all the latest news.

About us

Team Cloudericks is a community started by Heartin Kanikathottu to learn about and master cloud computing. Our current focus is on Amazon Web Servivces.

Cloudericks.com aims to document what we learn. We believe that knowledge is useless unless you share it; the more you share, the more you learn.

Recent comments

Photo Stream