I am writing web application which exposes REST interface and web socket for clients. This project interacts with underlying database. The UI layer and overall business logic is handled as separate project. Now I wanted to apply layers in this web application.
I have split my web application as,
1. Service layer (Exposes REST and Websocket) 2. Domain layer (Handling web application's Business logic) 3. Persistance layer (DB access)
Is this separation right? or Should i consider REST as application layer
? Is application layer
a.k.a service layer
? Which is more meaningful here?