Results 1 to 9 of 9

Thread: Adding Api for my desktop application

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2020
    Posts
    5

    Adding Api for my desktop application

    I made desktop application for my client and he asked to make him API, I am new to the programming world my question is it is possible to make api for desktop made using vb, the second question if I made api using .net core and how can I link the exsting database to the class I create?

    thanks in advance

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,302

    Re: Adding Api for my desktop application

    What is the purpose of the application and what is the purpose of the API?

  3. #3
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,990

    Re: Adding Api for my desktop application

    An API can mean a few different things. Perhaps the most common is to set up some web service exposing various methods that can be called via the web. That would be a totally separate program from a desktop application, but if you connect to the DB with the desktop application, you'd be doing pretty much the same thing for the web service....depending on where the service is being deployed. If the service is on a server that you control, then you won't see much difference. If you are expecting to publish the web service to somewhere else, then you'd likely need the database in that other place, or at least directly accessible from that other place, and that may be problematic.
    My usual boring signature: Nothing

  4. #4

    Thread Starter
    New Member
    Join Date
    Sep 2020
    Posts
    5

    Re: Adding Api for my desktop application

    thanks for reply , i need the API is for integration the desktop application with the web based application.

    the desktop application has it is own database in local installation and i made the web application API server located on the cloud, so my question after identify the class in desktop how can i made endpoint to access in both direction (desktop->web app and web App to desktop ).

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,302

    Re: Adding Api for my desktop application

    What you should do is build a web service and pull all the service code out of your web application and move it into that. The web application is then just an interface, as is the desktop application. They would both make calls to the web service for the common functionality. There is no communication between the desktop app and the web site.

  6. #6

    Thread Starter
    New Member
    Join Date
    Sep 2020
    Posts
    5

    Re: Adding Api for my desktop application

    thanks for response, I should fetch data in web service, but what about I save access_key and make communicate by pass header access_key in api call hit specific endpoint to post aswell as get

  7. #7
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,302

    Re: Adding Api for my desktop application

    If you want to understand security in web services then you should do some reading on security in web services. It's not really for us to teach you the subject from the ground up.

  8. #8

    Thread Starter
    New Member
    Join Date
    Sep 2020
    Posts
    5

    Re: Adding Api for my desktop application

    one more question, when I delete on the web app, it successfully delete from webservice and how did I execute on the desktop (b/c already removed from cloud). beside this consider I have 1k desktop app user (they own local database ), request cron job every 30sec to fetch data from cloud (either there is new record, update record & delete record), this will increase server load right ? how should I manage this ?

    thanks, one key thing I am new on developer environment , thanks again

  9. #9
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,302

    Re: Adding Api for my desktop application

    Quote Originally Posted by aronaman View Post
    one more question
    And then you ask two more questions, neither of which is specific to the topic of this thread. One topic per thread and one thread per topic. If you have two new topics to ask about then create two new threads. You don't just keep asking loosely related questions in the same thread and then end up with multiple conversations crossing over each other.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width