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 550023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T11:14:44+00:00 2026-05-13T11:14:44+00:00

I’ve got a web interface from which I will gather user data (username,pass,email,etc..) and

  • 0

I’ve got a web interface from which I will gather user data (username,pass,email,etc..) and the backend has to provision these data into 3 other systems (SystemA, SystemB, SystemC).

The provisioning is being done by 3 different APIs one for each system (A,B and C).

My current design in the backend looks something like this:


interface ProvisionData
{
    public function createUser();
    public function deleteUser();
    public function changePassword();
}


class SystemA_API_wrapper implements ProvisionData
{
    public function createUser(){ ... }
    public function deleteUser(){ ... }
    public function changePassword(){ ... }
}

class SystemB_API_wrapper implements ProvisionData { public function createUser(){ ... } public function deleteUser(){ ... } public function changePassword(){ ... } }

class SystemC_API_wrapper implements ProvisionData { public function createUser(){ ... } public function deleteUser(){ ... } public function changePassword(){ ... } }

Each of the System*_API_wrapper has different implementation of createUser() (and the rest) functions.

In the frontend I've created a kind of proxy class which I feed with the data gathered from the web interface.. It looks like:


class provisionProxy
{
    public $sA = null;
    public $sB = null;
    public $sC = null;

//constructor instantiates all System*_API_wrapper objects
public function __construct() {        
     $sA = new SystemA_API_wrapper();
     $sB = new SystemB_API_wrapper();
     $sC = new SystemC_API_wrapper();
}

// proxy function deleteUser calls deleteUser() of each of 
// our APIs 
public function deleteUser($username, $password) {
     $this->sA->deleteUser($username, $password);         
     $this->sB->deleteUser($username, $password);
     $this->sC->deleteUser($username, $password);
}

}

Does anyone have any suggestion or a better practice?

(I've already posted the same question but due to technical problems I can't login to my old account, so the question is revised and posted again under my new account. Original question can be found here: Design Question: Which is Better practice? - thanks)

  • 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-13T11:14:44+00:00Added an answer on May 13, 2026 at 11:14 am

    Based on the assumption that you can’t change your three backend systems to all access a central system for user management (which would be better), the only change I would suggest is for your proxy, where you are hard coding calls to each of your three systems – it would be better to create a list of ProvisionData objects in your constructor and then in your delete/create calls, loop through that list and call the appropriate method on each.

    This means that if, at some point in the future, you have to add system D to this, then that can be done with a change in a single place.

    (My PHP skills are a bit ropy, so won’t attempt to provide the code).

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

Sidebar

Related Questions

No related questions found

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.