Sending data to and from two applications? - javascript

I'm trying to write a test application for hardware and it needs to be webbased however the actual program for controlling the hardware is already made.
I made a webpage with html and javascript but i need to send data between these two applications, the applications both run on the same machine. I tried looking on the web but I cant figure it out. If anyone has an example or a direction for me to look at/in I would appreciate it.

Related

recommended librairies for a dynamic data-driven website

First I know this might be received as an opinion-based question. If it is the case, could you advise some other appropriate places to get some feedback.
I want to make a web app that renders graphically tree data structure that needs to be updated on the browser as the data changes in real time on the server, and as we navigate through the data on the client-side (like if we were moving through a 2D map in a game, getting data as we progress and as it changes)..
I can do MongoDB, nodejs, and react at the moment. I'm planning to have a deeper look graphQL based on a guess that it might be helpful. Other than that I don't have too many ideas regarding open connections (is there anything other than socket.io that I should look into?)
About the GUI, I did a bit of canvas, a while ago, but I really don't know in which directions to look to see what exists today, and even if it is worth getting refreshed in python for example..
Any feedbacks appreciated before the question is deleted..

How can I automate the web from a web server?

I'm attempting to create my first ever full-blown website. The site will host a form that takes a user's link and scrapes the inputted website. Besides scraping, I'm also looking for click and input functionality (for future projects).
I managed to create a PhantomJS function that scrapes a website depending on the parameters. However, I have absolutely no idea how to implement this into my Xampp server which locally hosts my website...PhantomJS only runs off of a command line as far as I'm aware.
Is it even possible to host a PhantomJS program on a website? Should I be using something else, such as NodeJS or another language? Ultimately, I'll go learn anything in order to make this happen.
Any ideas/suggestions are much appreciated. I apologize if this question seems dumb.

How to make a real time roulette in the website

I am learning some web developing and though I could make a web game just to practice some more.
So far I have made this fancy roulette with js, html and css:
Codepen code
The question now is how do I make it real time? Been looking around but couldn't find the answer. Do I have to use web sockets? Node.js? I'm lost. I want it to look the same for everyone not individually different once you open it. A simple point out to where I should look next would be perfect.
Also I am running it through the web server that I bought. Thanks !
You can keep this application running in your webserver and stream the data using socket.io. Another option would be to use firebase.

Web App Creation Toolchain with CSS/HTML/Javascript

I want to create a score keeping app that allows me to enter scores into the app, save score history by user, and have a webpage that can display the score in real-time as well as pump out some stats on previous games.
I've been doing some front-end development the past few years and I would say that my CSS/HTML/Javascript skills are intermediate. I have a rough game plan on how it would work, but having very little backend experience there are some gaps in my knowledge that I need help with.
The app: I would build it with what I know: CSS/HTML/Javascript. I would it to be assessable via a webpage or native app. The plan for the latter was putting it through PhoneGap.
Database: SQL? This is were I would save the scores.
The webpage: This is where things get tricky. I need live reporting for the current game status. Web sockets?
I would use a Javascript graphing library to create charts of stats based on current and previous game history. I need that data to be automatically refreshed (AJAX) but how would I do that with a SQL/JS interaction?
Also, ideally the graphs on the webpage would allow visitors to copy and paste iframe code so they can paste the stuff into their own website. I don't even know where to get started with that.
I'm not sure if I'm even asking the right questions so any help would be greatly appreciated!
Since you're a front-end developer I think you'll really like http://nobackend.org/
There are a number of Back-end as a Service solutions which handle both data persistence and data synchronising across multiple devices.
These solutions answer your SQL and WebSockets questions. You could implement these yourself using either open source solutions or by combining a number of services. But I'd give the BaaS options a go.

Building an interactive website for multiple clients

I am a programming novice, so please forgive the technical ambiguity here. I will try to be as specific as possible about what I am trying to accomplish.
I am trying to build an interactive website where multiple clients can log on and view a board game. The board game consists of regions on a map with color (player who controls it) and number (armies) variables, as well as draggable tokens.
I have built a client-end version in JavaScript using the Raphael interface for SVG graphics, and would like to build a server that can process any changes one client makes to the board and update the boards of the other clients. In my mind, the sequence would be something like:
Action performed by the user
Action listener updates client view
Update sent to server
Server changes database to reflect change
Server notifies all clients
Clients update view
I've read up on Ajax/XML a bit, but the tutorials I have found have mostly been about getting static data, and I haven't seen an example of actually CHANGING dynamic data on a server, nor have I been able to find any examples of what the server functions should look like.
So basically my question is, can anyone point me in the right direction here? I would very much appreciate a general outline about how I could go about accomplishing this, as well as direction to a tutorial or two that relates to the task. Thank you!
You may look at nodeJS and socket.io.
With this technology it is possibile to create real time web applications.
Its a bit older, but here is a game we did some time ago:
https://github.com/stravid/unitacs
It also uses raphaelJS.

Categories

Resources