Integration of two different applications in ASP.NET MVC

Asked

Viewed 576 times

2

Hello, I need to integrate two different applications: one is a client business administration application and the other a financial management application.

They are two separate applications, so what I need is that, when registering a client in the administration application, this client is integrated into the financial application in real time.

What I once thought:

How the applications were developed in Asp.Net and following the concepts of DDD and I can get the Dlls from services and referencing them in the other application, also referencing the Model and so I can create a client object from the financial application, access the method and add using the logic of her business rule.

I just don’t know if this is the best way. I’ve thought about integrating this way using Dlls, I’ve thought about doing by Web API that on controller i made a call to the integration API by passing a JSON.

I also thought about doing an integrative program that had a team and to make this integration by selects and inserts from time to time.

I would like your opinion. Should I use only the service layer of the DDD? Should I use Web API? Or any other approach?

What is the advantage and disadvantage of each?

  • What is the scale of use of the services? How many users? How many people work in the development of these two applications? Do you predict that there will be many modifications to these applications in the future? Do they run different servers or use the same one? Is the database single or partitioned? What do you mean by "real time"? 10ms, 50ms, 1s? I think the answer depends on all these questions and maybe other.

2 answers

1

I just don’t know if this is the best way. I’ve thought about integrating this way using Dlls, I’ve thought about doing by Web API that on controller i made a call to the integration API by passing a JSON.

There are several advantages to doing this internally. Since your applications already have a common intermediate layer between them, just reference the DLL and use.

The Web API approach is interesting if the integration is for a service or application that you don’t have control over the code. Other than that, the most cohesive alternative is always the best.

I also thought about doing an integrative program that had a team and to make this integration by selects and inserts from time to time.

This alternative is not good because you do not have real-time data availability. You will need to wait for your integrator service to run to have the information available.


Another pattern of design

There is a third design standard that is interesting to mention, and that would be best for your case, which is to make one application read the context of the other’s data, but this would only have validity if you do this of the Entity Framework.

As in your answer you have already said that you have a service layer that does this for you, it means that there is no such concern of mapping, since the entire application is with the integrated data domain.

0

Hello.

As the applications are already ready and running, I believe that the best thing to do would be to use Web API, creating a method in each application that would be called to insert a user. When a user was created in one of the applications, this application would call the method of the other application with the data of this new client, and thus the two applications would be integrated. This seems to be the simplest and fastest solution, but you would need to do some manual work to synchronize already registered customers.

Another option would be to use an integrated database. Thus, the table that stores customer information could be shared between the two applications. But this would require a restructuring of the current application architecture.

If you want the user to log in for access to both applications, you could use a common database to authenticate users. This way, a user would need to authenticate only once and could access several applications. Each application would continue to work independently, and the user’s session would ensure that it is authenticated. This solution would require an even greater effort to adapt the current architecture, but it could be very positive for the user experience to be able to access all applications by just doing one authentication.

The final decision is yours, but I hope I’ve helped.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.