Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 656921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:46:02+00:00 2026-05-13T22:46:02+00:00

Okay, so I’m designing a stand-alone web service (using RestLET as my framework). My

  • 0

Okay, so I’m designing a stand-alone web service (using RestLET as my framework). My application is divided in to 3 layers:

  • Data Layer (just above the database, provides APIs for connecting to/querying database, and a database object)
  • Object layer (responsible for serialization from the data layer… provides objects which the client layer can use without worrying about database)
  • Client layer (This layer is the RestLET web service… basically just creates objects from the object layer and fulfills webservice request)

Now, for each object I create in the object layer, I want to use different credentials (so I can sandbox each object…). The object layer should not know the exact credentials (IE the login/pw/DB URL etc).

What would be the best way to manage this? I’m thinking that I should have a super class Database object in my data layer… and each subclass will contain the required log-in information… this way my object layer can just go Database db = new SubDatabase(); and then continue using that database.

On the client level, they would just be able to go ItemCollection items = new ItemCollection(); and have no idea/control over the database that gets connected.

I’m asking this because I am trying to make my platform extensible, so that others can easily create services off of my platform.

If anyone has any experience with these architectural problems or how to manage this sort of thing I’d appreciate any insight or advice…

Feel free to ask questions if this is confusing. Thanks!

My platform is Java, the REST framework I’m using is RestLET, my database is MySQL.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T22:46:02+00:00Added an answer on May 13, 2026 at 10:46 pm

    I feel what you explained is sensible and you are trying not to expose the database details and credentials to the cleint level.

    For this situation, you need to think of any design patterns that might help you
    I can think of the singleton pattern , where you create one instance and use it in the Object layer, thus avoiding showing any details about the credentails and URL to the users.

    Second option, what i get in my mind is the use of the hibernate layer, that will help you to hide the details and just access the ORM objects and you can get what you are looking for.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay, so I'm doing my first foray into using the ADO.NET Entity Framework. My
Okay I have created an application where in one of the screens I have
Okay, I'm reading about Linux kernel development and there are some code snippets using
Okay, what have I done wrong here? I'm trying to .POST data from a
Okay, so I've done a bit of research into using PHP to allow using
Okay, so I choose to animate my label using block animation. The logic is
Okay, This may be really simple or it may not even be possible, or
Okay, I think I'm just making a stupid mistake here, but I want to
Okay, so here's my problem: We use FOP for creating pretty report output. We
okay so this is probably a soft pitch question for sombody, but I want

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.