Reputation: 43
I have an ASP.NET MVC 5 Web Application that talks to an AS400 backend system. I made calls to AS400 Programs through IBM iSeries Client Access Library
Which way is correct
a) Create a class library with all functionalities and reference through my Web Application or
b) Create a Web API, make a reference to the class library and host it to IIS
I think this is a better solution because it would be in another application in IIS and not in the same process as in the first approach. I will be more asynchronous. I'm right?
Upvotes: 0
Views: 599
Reputation: 5371
I used both a and b in same system(as400 and .net), but for different cases. If you want to isolate as400 things from your application, then go with web api(b). This will give you more flexibility to work(maintain wise). And this way good if you have many functions with deal with. This will also make your life complex. Like security...
I used case a, when I just need to do only a login through as400 and few more things.
Usability with other applications
a) You can reference that dll to many other applications(.net only)
b) You can use api for almost any type of application
Upvotes: 1