JavaScript Mode: Retrieving data from MySQL and visualize them

edited November 2013 in JavaScript Mode

I've designed a data acquisition project which consisted of two Processing applications.

The first one is a standalone application (executable). I use this to capture data sent from an ATmega328P microcontroller system through serial port. At the initial testing stage, I've successfully saved them into a CSV file. But now, I would like to save them into a database by using MySQL, to be later picked by a web application. There's a library called BezierSQLib that it seems up to the task. I've also had a working XAMPP installation.

The second one is web application, built by JavaScript mode. All I want to do is using this application to retrieve data from MySQL and visualize them. But I'm wondering, can this be achieved? If so, what is the practical method to use? To be honest, I'm new to this JavaScript mode and had a limited knowledge over MySQL databases, especially how it connects to Processing application.

As a side note, all those applications and XAMPP installation are supposed to run from my computer (local server).

Comments

  • If you run in JS mode, you cannot use a Java library like Bezier SQLib.

    The solution is to make Ajax calls from JS to the server (and back): the JS requests the server to do the SQL operations, the server can answer with the result. So you need to write some server-side code (PHP or other).

Sign In or Register to comment.