Note that there are some explanatory texts on larger screens.

plurals
  1. POCan a java program be the mediator between webpage javascript and a Database?
    primarykey
    data
    text
    <p>What do I need to research, know and use for the following project:</p> <p>I want to use javascript to show a map, using googlemaps api, on a webpage. It will have markers on it. The markers will be geolocations using latitude and longitude. The lat and lon coordinates will be found by entering IPs into <a href="http://ip-api.com/" rel="nofollow">ip-api.com</a> which will give me lat and lon. The IPs are taken from a database. This map will also be displayed in a jpanel in a Java program.</p> <p>My biggest concern and confusion is with how I will connect to the DB and get the data. I have no experience with javascript but I heard that it is bad practice to connect to a DB in javascript on the webpage. Is it possible to connect, retrieve, and push data using my java program as the mediator between the DB and webpage? It seems that this would keep data safe but I don't know how I would, or if its possible, to send data from java to the script.</p> <p>Perhaps someone has other suggestions?</p> <p><strong>UPDATE</strong> I initially asked this question with only a general sense of direction and a muddled understanding merely looking for a point in the right direction. Instead of downgrading thinking my question was stupid or that I didn't try finding an answer in the first place, the answers below actually took time to help and were able to guide me to where I needed to go. Next time don't be so quick to downgrade such a clearly inexperienced programmer and attempt to lend a hand. That's what this community is for and why I love using it.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload