Answered by:
WebService (i think...)

Question
-
Hi
Im not 100% sure on the name of what im looking to do so i'l try and explain!
Current Process. I am currently getting & posting data from my winforms app to / from sql server over internet using a set of BLL DAL classes that i wrote. They work very well and super fast. It isnt secure though as the ipaddress is in the code. Im an now at a point where this needs to be more secure. I think im looking for a Web Service or a service of some kind that would be a project / set of classes sitting on my online webspace that i could call instead?
Im thinking-
- Call service from desktop app with public security key and call type i need for data
- service receives call, checks public key
- on approval, call the relevant data call to get / set data and return
What would this typically be called, where could i find more info and would there be any examples / boiler plate templates that i could use?
Thanks
I am here to ask questions and learn from others. Cor Ligthert DO NOT REPLY TO ANY OF MY POSTS!!
- Moved by Xingyu ZhaoMicrosoft contingent staff Thursday, October 8, 2020 3:18 AM
Thursday, September 24, 2020 2:57 AM
Answers
-
I think im looking for a Web Service or a service of some kind that would be a project / set of classes sitting on my online webspace that i could call instead?
Yes that is correct. Now of days, one would create a ASP.NET WebAPI Restful Web service. The WebAPI would do CRUD operations with reference to a DAL.
https://www.geeksforgeeks.org/what-is-web-api-and-why-we-use-it/
Current Process. I am currently getting & posting data from my winforms app to / from sql server over internet using a set of BLL DAL classes that i wrote.
If you are using datasets and datatables, that would have to change. And you would need to move to a custom data container object like a DTO and a collection. You don't need to use EF, but what travels between the WebAPI client your Windows form program and the WebAPI service is a single DTO or DTO(s) in a collection.
https://dzone.com/articles/reasons-move-datatables
https://en.wikipedia.org/wiki/Data_transfer_object
The next two links is why the need to use the DTO
https://www.codeproject.com/Articles/1050468/Data-Transfer-Object-Design-Pattern-in-Csharp
https://docs.microsoft.com/en-us/aspnet/web-api/overview/data/using-web-api-with-entity-framework/part-5
Most use Token-Based Autentication between the WebAPI client and WebAPI service.
https://nordicapis.com/the-difference-between-http-auth-api-keys-and-oauth/
Example VB.NET MVC solution using WebAPI 2 service. So, it doesn't matter what the client is Win desktop, ASP.NET MVC etc. and etc. Your BLL needs to sit on the client-side with the BLL using the WebAPI for CRUD with the database. The DTO or DTO(s) in a collection travel between the WebAPI client and WebAPI service.
https://github.com/darnold924/ProgMgmntVB
There is a WebAPI forum is ASP.NET forums.
You should also look into use MVP UI design pattern for the Windows form presentation layer.
https://www.codeproject.com/Articles/228214/Understanding-Basics-of-UI-Design-Pattern-MVC-MVP
If you want to understand the MVP for Windows form VB.NET, then I suggest you watch all the shows.
http://polymorphicpodcast.com/shows/mv-patterns/
You have and questions feel free to ask.
Thursday, September 24, 2020 5:51 AM
All replies
-
I think im looking for a Web Service or a service of some kind that would be a project / set of classes sitting on my online webspace that i could call instead?
Yes that is correct. Now of days, one would create a ASP.NET WebAPI Restful Web service. The WebAPI would do CRUD operations with reference to a DAL.
https://www.geeksforgeeks.org/what-is-web-api-and-why-we-use-it/
Current Process. I am currently getting & posting data from my winforms app to / from sql server over internet using a set of BLL DAL classes that i wrote.
If you are using datasets and datatables, that would have to change. And you would need to move to a custom data container object like a DTO and a collection. You don't need to use EF, but what travels between the WebAPI client your Windows form program and the WebAPI service is a single DTO or DTO(s) in a collection.
https://dzone.com/articles/reasons-move-datatables
https://en.wikipedia.org/wiki/Data_transfer_object
The next two links is why the need to use the DTO
https://www.codeproject.com/Articles/1050468/Data-Transfer-Object-Design-Pattern-in-Csharp
https://docs.microsoft.com/en-us/aspnet/web-api/overview/data/using-web-api-with-entity-framework/part-5
Most use Token-Based Autentication between the WebAPI client and WebAPI service.
https://nordicapis.com/the-difference-between-http-auth-api-keys-and-oauth/
Example VB.NET MVC solution using WebAPI 2 service. So, it doesn't matter what the client is Win desktop, ASP.NET MVC etc. and etc. Your BLL needs to sit on the client-side with the BLL using the WebAPI for CRUD with the database. The DTO or DTO(s) in a collection travel between the WebAPI client and WebAPI service.
https://github.com/darnold924/ProgMgmntVB
There is a WebAPI forum is ASP.NET forums.
You should also look into use MVP UI design pattern for the Windows form presentation layer.
https://www.codeproject.com/Articles/228214/Understanding-Basics-of-UI-Design-Pattern-MVC-MVP
If you want to understand the MVP for Windows form VB.NET, then I suggest you watch all the shows.
http://polymorphicpodcast.com/shows/mv-patterns/
You have and questions feel free to ask.
Thursday, September 24, 2020 5:51 AM -
Much appreciated, it helps alot and i think i know where i am going with this now :)
Thanks
I am here to ask questions and learn from others. Cor Ligthert DO NOT REPLY TO ANY OF MY POSTS!!
Friday, November 6, 2020 6:26 PM