Reputation: 51
I need to make a web page where the input and the output is displayed, but the code where I "do stuff" must be in writing in Julia, how can I do this?.
to be clear, I want something like this:
Web ----> Julia ----> Web
|input | do stuff | output
I don't know what I need to make this possible, I need any kind of Server-side?
I'm a very novice in programming, so I don't know how to search this on internet, I will be thankful with any help.
Upvotes: 2
Views: 3429
Reputation: 401
If you need to accept input from the web and then output corresponding data after processing it with Julia, then definitely you need to use some form of server side Julia, since Julia does not run in the browser.
In terms of workflow, what you need is very simple:
1/ first, you need to display a form, to accept user input;
2/ second, the form needs to be POST-ed back to the server - where the data in the payload is processed;
3/ finally, you need to send back a response.
You can use a Julia framework like Genie (author of Genie writing this, btw) to have everything Julia in your stack - or you can use some other web stack (PHP, ruby, python, etc) for 1/ and 3/ and have a local Julia script process the data, invoked by the web scripts.
If you don't have experience developing web apps but have/need Julia skills, you're probably better off using Genie. It knows how to render HTML, it provides a nice MVC workflow, has a clear file structure and comes with some generators, does input sanitization in the persistence layer, etc. And it's very easy to accept input, add your data processing logic, and output your response.
But I must warn you that it's still very much work in progress - and this is visible in the state of the documentation (working on it, but boy this is time consuming). You can give it a try and open up issues in GitHub if you get stuck. Also, I would not recommend it for any mission critical apps yet - it needs more testing.
Upvotes: 4
Reputation: 2097
I will copy part of the answer from: How to make a GUI in Julia?, and add a few more.
All of these packages are currently useful and well maintained. Unfortunately, some of the higher level frameworks in juliawebstack are no longer maintained.
Upvotes: 2
Reputation: 19132
In addition to the Julia webstack, you might want to look into Genie.jl. It's looking like a nice framework and was used to build this website.
Upvotes: 5