Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Service Layer question - UrlyBird

 
Fernando Franzini
Ranch Hand
Posts: 489
2
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rancher

I'm doing some designer choices and .........Can I create a interface that will be CRUD methods with POJO as parameter that will be called by GUI layer ? I mean that I dont wanna expose DBAcess interface to GUI Layer...I've tought in create a new Interface called Database like "service layer" that encapsule all called of DbAcess..... and GUI layer will deal with it...remote or local.....
 
Roel De Nijs
Sheriff
Posts: 10662
144
AngularJS Chrome Eclipse IDE Hibernate Java jQuery MySQL Database Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Fernando,

I didn't expose the DBAccess methods too, so i created a service layer containing just 2 methods: a findRooms and a bookRoom method. and that interface was 2x implemented (1 direct and 1 rmi implementations). And the implementations call the appropriate methods from DBAccess.

Here you can find a whole discussion about exposing lock/unlock to the client or not. So it's up to you to decide which approach you'll take

Kind regards,
Roel

 
Fernando Franzini
Ranch Hand
Posts: 489
2
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Roel

and that interface was 2x implemented (1 direct and 1 rmi implementations). And the implementations call the appropriate methods from DBAccess.

Yahh...I thought the same....Local and Remote.....
Thanks..
 
Fernando Franzini
Ranch Hand
Posts: 489
2
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ri ranchers
How much I read the foruns mess....I've been confused...about do or dont expose sun assignament interface DBAcess or create another hight level abstract layer to hide lock/unlock and cookie issues....
This thread is very complicate - http://www.coderanch.com/t/184224/Developer-Certification-SCJD/certification/Should-lock-methods-callable-by
OHH MY GODD !!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic