• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Service Layer question - UrlyBird

 
Ranch Hand
Posts: 497
2
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.....
 
Sheriff
Posts: 11604
178
Hibernate jQuery Eclipse IDE Spring MySQL Database AngularJS Tomcat Server Chrome Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 497
2
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 497
2
Spring Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 - https://coderanch.com/t/184224/Developer-Certification-SCJD/certification/Should-lock-methods-callable-by
OHH MY GODD !!!
 
I have gone to look for myself. If I should return before I get back, keep me here with this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic