Join us on Discord!
You can help CodeWalrus stay online by donating here.

Best programming language for server-side web programming

Started by Ephraim Becker, November 13, 2015, 08:01:23 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ephraim Becker

I already know HTML, CSS, and JavaScript. I'm trying to get my Virtual friend to talk about the latest stuff getting the data from the internet. Which programming language is the best for this and i'm already using JavaScript for my Virtual friend so I think JavaScript will have to connect to the server-side programming language to work.
  • Calculators owned: TI 84 Plus, TI 84 Plus C Silver Edition, TI 84 Plus CE, Casio FX-9750 GII
I have Aspergers Syndrome

Snektron

Most servers use PHP for web side developement, but there is also Lua Server Pages and i believe you can also use python for it.
Also i think you can do it with JS too, with NodeJS but im not entirely sure about that.
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


novenary

You can use pretty much anything for server-side stuff. JS on Node (which is a pretty good idea with websockets apparently), Python, C... Avoid PHP at all costs for real time code, it's definitely not made for that.

alexgt

  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Ephraim Becker

  • Calculators owned: TI 84 Plus, TI 84 Plus C Silver Edition, TI 84 Plus CE, Casio FX-9750 GII
I have Aspergers Syndrome

novenary

AJAX is not a language, it's a communication model used by Javascript programmers. It doesn't solve the problem of what runs on the server side.

Ephraim Becker

  • Calculators owned: TI 84 Plus, TI 84 Plus C Silver Edition, TI 84 Plus CE, Casio FX-9750 GII
I have Aspergers Syndrome

DarkestEx

#7
Quote from: Ephraim Becker on November 13, 2015, 08:01:23 PM
I already know HTML, CSS, and JavaScript. I'm trying to get my Virtual friend to talk about the latest stuff getting the data from the internet. Which programming language is the best for this and i'm already using JavaScript for my Virtual friend so I think JavaScript will have to connect to the server-side programming language to work.
PHP will certainly be the best one. Just send the data using the JSON encoding to the server and get the response.
You can just get stuff. This use case is not server event based so you can unproblematically use GET requests.
I don't see any issue with using PHP, really. Also its what you expect on a normal webhost.
  • Calculators owned: TI-84+, Casio 101-S, RPN-Calc, Hewlett-Packard 100LX, Hewlett-Packard 95LX
  • Consoles, mobile devices and vintage computers owned: Original Commodore 64C, C64 DTV, Nintendo GameBoy Color, Nintendo GameCube, Xbox 360, PlayStation 2

Ephraim Becker

What i'm trying to do is access the RSS feeds from a website (example: cnet)
  • Calculators owned: TI 84 Plus, TI 84 Plus C Silver Edition, TI 84 Plus CE, Casio FX-9750 GII
I have Aspergers Syndrome

DarkestEx

Quote from: Ephraim Becker on November 15, 2015, 12:26:40 AM
What i'm trying to do is access the RSS feeds from a website (example: cnet)
Yes then you should certainly go with PHP and get it using your Javascript application.
If you need any help you can ask me. I did such things pretty often before and I can help you make it output JSON that Javascript can easily read.
  • Calculators owned: TI-84+, Casio 101-S, RPN-Calc, Hewlett-Packard 100LX, Hewlett-Packard 95LX
  • Consoles, mobile devices and vintage computers owned: Original Commodore 64C, C64 DTV, Nintendo GameBoy Color, Nintendo GameCube, Xbox 360, PlayStation 2

Ephraim Becker

I learnt PHP on codecademy. How do I get it to use my JavaScript application?
  • Calculators owned: TI 84 Plus, TI 84 Plus C Silver Edition, TI 84 Plus CE, Casio FX-9750 GII
I have Aspergers Syndrome

DarkestEx

Quote from: Ephraim Becker on November 15, 2015, 12:31:10 AM
I learnt PHP on codecademy. How do I get it to use my JavaScript application?
Well first you have a PHP application that retrieves the feed when called. It should output some JSON formatted array (just a simple associative array and use print(json_encode($my_array)) to send it).
Then you send a web request every time you need new data and download the json response and use JSON.parse(data_from_request) to get an array of your feed stuff.
After that you can just use the data.
  • Calculators owned: TI-84+, Casio 101-S, RPN-Calc, Hewlett-Packard 100LX, Hewlett-Packard 95LX
  • Consoles, mobile devices and vintage computers owned: Original Commodore 64C, C64 DTV, Nintendo GameBoy Color, Nintendo GameCube, Xbox 360, PlayStation 2

Ephraim Becker

What i'm trying to do is when I talk to the Virtual friend about technology news, I want it to fetch data from cnet RSS feed and turn it into a conversation about it. Is there any way to do this?
  • Calculators owned: TI 84 Plus, TI 84 Plus C Silver Edition, TI 84 Plus CE, Casio FX-9750 GII
I have Aspergers Syndrome

DarkestEx

#13
Quote from: Ephraim Becker on November 15, 2015, 12:40:38 AM
What i'm trying to do is when I talk to the Virtual friend about technology news, I want it to fetch data from cnet RSS feed and turn it into a conversation about it. Is there any way to do this?
Well about fetching, yes, but the other part of turning it into a conversation is hard and would be your part and business.

Edit: you could link it up to wolfram alpha and have a lot of facts and functions added.
  • Calculators owned: TI-84+, Casio 101-S, RPN-Calc, Hewlett-Packard 100LX, Hewlett-Packard 95LX
  • Consoles, mobile devices and vintage computers owned: Original Commodore 64C, C64 DTV, Nintendo GameBoy Color, Nintendo GameCube, Xbox 360, PlayStation 2

Ephraim Becker

Should I turn my existing HTML into a PHP or should I create a separate PHP?
  • Calculators owned: TI 84 Plus, TI 84 Plus C Silver Edition, TI 84 Plus CE, Casio FX-9750 GII
I have Aspergers Syndrome

Powered by EzPortal