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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T02:20:53+00:00 2026-05-19T02:20:53+00:00

I have an in-house enterprise application (EJB2) that works with a certain BPM vendor.

  • 0

I have an in-house enterprise application (EJB2) that works with a certain BPM vendor. The current implementation of the in-house application involves pulling in an object that is only exposed by the vendor’s API and making changes to it through the exposed methods in the API.

I’m thinking that I need to somehow map an internal object to this external one, but that seems too simple and I’m not quite sure of the best strategy to go about doing this. Can anyone shed some light on how they have handled such a situation in the past?

I want to “black box” this vendor’s software so I can replace it easily if needed. What would be the best approach from a design point of view to somehow map an internal object to this exposed API object? Keep in mind that my in-house app needs to talk to the API still, so there is going to be some dependency between the two, but I want to reduce it so I can also test in isolation from this software using junit.

Thanks,
Jason

  • 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-19T02:20:54+00:00Added an answer on May 19, 2026 at 2:20 am

    Create an interface for the service layer, internally all your code can work with that. Then make a class that uses that interface and calls the third party api methods and as the api facade.

    i.e.

    interface IAPIEndpoint {
        MyDomainDataEntity getData();
    }
    
    class MyAPIEndpoint : IAPIEndpoint {
    
        public MyDomainDataEntity getData() {
            MyDomainDataEntity dataEntity = new MyDomainDataEntity();
            // Call the third party api and fill it
            return dataEntity;
        }
    }
    

    It is always a good idea to interface out third party apis so you don’t get their funk invading your app domain, and you can swap out as needed. You could make another class implementation that uses a different service entirely.

    To use it in code you just call

    IAPIEndpoint endpoint = new MyAPIEndpoint(); // or get it specific to the lang you are using.
    

    Making your stuff based on interfaces when it spans multiple implementations is the way to go. It works great for TDD as well so you can just swap out the interface to a local test one that can inspect your domain code entirely separate from the third party api.

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

Sidebar

Related Questions

We have an in house winform application that is used by about 20 users
We have an in-house PHP web application that is a financial analysis tool for
We have an in-house application that pulls some data from some of Amazon's pages
In a typical enterprise scenario with in-house development, you might have dev, staging, and
I've been thinking about the number of projects we have in-house that are still
I have an In-house windows form app that I would like to use Spell
We have an in house developed web-based admin console that uses a combination of
We have an in-house iOS app that we use for quickly entering time into
I have a House model in my rails app that has_many deals. I am
I have a few tables that are created by entity framework that house my

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.