I have stats on tennis players M&F as far as rankings, name, location, image etc in a mysql DB and excel cvs.
i want to create a page where I can have a form asking for M or F and rank and then have the various stats like handedness, country, image etc come up on the page without refreshing.
I want to do it the quickest way but in the most current type of language or DB or structure or framework.
you need a server to handle the form submit request
form submit is via XMLHTTPRequest to avoid a page reload - server gets request and queries db to get data - server converts data to json - server sends json data back to browser - browser javascript uses json data to update page html
I know how to do this in PHP but I am trying to learn the new technologies.
this is how I do the whole thing in PHP and mysql:
I webscrape the data into a csv file. Then I upload it to hosting site via phpadmin to convert it to mysql. Then I write the sql and php code to do the crud.
But what I am not understanding is how to do this in node or whatever.
I keep reading about having to download stuff to my laptop and do all sorts of command lines to set it up. But isn’t here some place that this is all done for you like is done for a php website?
Do hosting services like godaddy etc have a setup where I can do this as easily as I can with PHP?
Even in PHP I almost never set it up on my laptop. I just do it on the hosting service.
And say I wanted to collaborate with someone via github to do a PHP project would we hammer it out on github THEN ftp it up to the hosting
these are different things - you’re doing some backend work to populate a db - that is relatively straightforward - now you want a web app to use the db - this requires a webserver - writing a server is actually quite easy in node - setting it up needs a bit of server admin - I prefer postgres over mysql - it has the best of both worlds - a relational db with good json support
you could try a cloud database like firebase if you want to avoid writing a server
btw you should never have to pay for webscraping - it usually can be done in a few lines of bash