So I am not a web developer. Sometimes I do web stuff at work, and a little for fun. I was doing some thinking, and a question came to mind. Why can’t Julia be a serverside web language like PHP?
Please don’t judge the pseudocode here I just quickly scrapped it together
<julia> function do_stuff_now(x) out.value = x*3 end </julia> <body> <form name = "form1"> <input type = "text" name = "in"/> <input type = "button" value = "do it" onclick="do_stuff_now(form1.out.value)"/> <input type = "text" name = "out"/> </form> </body>
How much of that has to happen in the browser vs how much of that has to happen serverside? If julia were to run clientside I see that as being very browser heavy and wades into politics, but, I think it would be very possible to allow the julia to run on the server instead and get the same behaviour, but, at greater cost to the host…
Server-side: I can imagine we could sort of parse html(remove ref’s to
<julia>...</julia>) , get the DOM for each page. Stand up either julia microservices via post commands, or use something like Genie to host with the code baked in. Something like a “compiled” website…
Issues here would be things like security, and also, what if you had 200_000 users all executing functions. Kind of like a reverse proxy nightmare. But maybe that’s not too different from a language like PHP?
Hoping to learn something here, color me clueless,