Hello EpiUsers,
I am trying to migrate the old code using wcf implementations in our .net framework 4.8 solution to a .NET 8 solution. I thought I would find easily a REST Client that is generated using Swagger/Swashbuckle/OpenAPI among the assemblies but the only dll I found is in .net framework 4.8
I also found a nuget package in .net core but it is not official and deprecated as it has critical bugs and is no longer maintained.
I would love to make the migration as quick and smooth as possible but it seems like there is no rest client dll in .NET (not .net framework) out there that I can just grab and start using.
I was wondering if it is easy to generate that client myself using the dlls in the server or if the Epicor support can generate one for .NET.
It is funny how life is. It looks likes Nuget Search from Visual Studio didnāt show me all. Right after my initial post, I tried again in nuget.org website and it seems like there are some librairies that could respond to the expressed need.
Hello @josecgomez ! Thanks for you quick reply, I have searched in the forum too but didbāt see this amazing post!!! I was using key words like Api Rest and Clientā¦
Think about upgrades and how tightly this portal is dependent on the raw APIs. Any changes in Kinetic may force you to changes in your client. If you can encapsulate the functionality in Functions/BAQs, you can escape most of this.
Also, you will reduce the number of calls over the wire drastically.
I hear you and it makes sens. However, if I interact with Order for instance to change itās status (firming it) or modify a BoM. How likely are those endpoints be affected?
Whatās the advantage to making more calls than fewer? Of adding more logic to the client to shape the data of those calls into a format decent to display to the customer? Moreover, the client is insecure. Any extra data that comes to the client wonāt be protected.
I would also vote for putting all your logic in a function and calling the function via the RestAPI.
We have a DotNet 6 ASP.Net core website that interacts with Epicor. It is currently using a Swagger generated API / wrapper to call the Epicor Rest endpoints. We migrated this from the wcf boās a few years back. I found that the swagger generated client was fairly easy to swap out the wcf calls. But the swagger client was very hard to generate - had to download the spec from Epicor server, put that into an app that generates the client, set a bunch of setting to make sure it generated the right codeā¦ it was a fragile process and I want to move away from that. We are slowly moving sections of the website to Blazor and using functions in Epicor for all the business logic.
The Epicor way of updating data is very chatty. By using functions you can make a single call to the function and all the chit chat can happen in the function on the server. This gives you lower latency and during upgrades you donāt have to recompile and re-deploy your client app, just update the function if the BO Api has changed.
@Mark_Wonsil@klincecum@bmanners
I appreciate all the insightful responses youāve provided. Iāll definitely keep your advice in mind and inform the client about potential challenges with future updates. Given the time constraints, Iāll likely opt for the quickest solution for now, with a plan to gradually transition to internal functions.
I understand. This is a popular path for many companies:
Make it quickly.
Now, make it faster.
Oh , make it secure.
Hopefully the client understands they may be exposing sensitive data, especially if this is external facing. A few years ago, the State of Missouriās web page pulled in too much data into the client - including SSNās that were visible to anyone who uses the Dev Tools. Iām much less concerned about poor performance and upgradability than security. There is no security at the client - both the browser and our customers.
This is the thing about Best Practice. Itās a Best Practice for a reason. Itās not a Required Practiceā¦ but learning from the mistakes of othersā¦