Vladimír Oraný
1 min readJan 14, 2020

--

Yes, exactly. Java has already its own conventions which you have mentioned (e.g. IllegalArgumentException for wrong arguments). I believe it's cleaner to stick with these conventions for the business logic and keep the mapping to HTTP conventions to the HTTP layer but it's completely up to you which approach you choose. If it reduces the complexity significantly in your project just keep the business layer and the web layer tightly coupled.

--

--

Vladimír Oraný
Vladimír Oraný

Written by Vladimír Oraný

Principal Software Engineer at @agorapulse

Responses (1)