Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Controller implementation for REST-ws #3

Open
Koziolek opened this issue Sep 5, 2014 · 1 comment
Open

Controller implementation for REST-ws #3

Koziolek opened this issue Sep 5, 2014 · 1 comment

Comments

@Koziolek
Copy link

Koziolek commented Sep 5, 2014

When you will implement this feature take a look at very strong separation between data storage layer and bussiness logic layer. It should be look like

Controller --> EntityGateway --> DataStore (JPA, raw HashMap, file based etc.)

@MirekSz
Copy link

MirekSz commented Sep 5, 2014

Current Operator Controller example is not so bad...ofcourse is connected with Operator Repository which don't have any specific JPA attributes....from the other side it's extends JPARepository, but in very clean way. Spring Data also has base CRUDRepository which can be ported to another datastores like MongoDB.

In my opinion best solution will be
Controller ---------Service ---- ---Repostorory-------- DataStore (JPA, raw HashMap, file based etc.)

The "Core" works on BusinessModel and send to repo(interface) BM objects.
Then RepositoryImpl (JPA, file etc.) thinks how to persists these objects in DS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants