How can i connect imagine a Qt interface(C++) with a logic in java. I feel like I’ve should know this already but I don’t, I know there are API but I don’t want to do it,

More context: They told me to write an aplication, game such as 4 connect, battleship or that kind of games, so I’ve thought to make the “snakes and ladders”, i knew how i could do the 2 thinks separately but I don’t know how to connect the frontend with backend, even tho I knew the games should works with threads. So I don’t know if I could do it with the interface in Qt, because the main porpouse of the practice is to work with threads

  • MadhuGururajan@programming.dev
    link
    fedilink
    English
    arrow-up
    1
    ·
    6 hours ago

    on the other hand challenges like these give us valuable experience. Its not often one has the opportunity to write two programs in different languages from scratch and figure out the coupling. I know I would be excited if I got paid to do such things.

    And loose coupling is a good constraint to force a good design for your application.

    • ulterno@programming.dev
      link
      fedilink
      English
      arrow-up
      0
      ·
      31 minutes ago

      I once had to use a network API, which was only available for Python, with sensor drivers whose API was only available in C.
      I just used a file as a buffer to transfer data between them and didn’t need any other interfaces.
      The price paid, was polling.