JavaScript can’t access local files; this makes it troublesome to work with databases and files without including someone’s “black box” and risking all manner of compatibility and security issues you have no control over.

Required Skillsets


You need to be familiar with both Javascript and Python, and their typical execution environments, for this information to be useful to you. Both are easy languages to learn, and the web is replete with tutorial sources aimed at providing that familiarity. Database use with Python can be with SqLite, or PostgreSQL, or MySql. Again, plenty of resources out there to help with learning SQL.

Python, on the other hand, has no such problems. It can handle files and databases directly, and you have every opportunity to keep things safe and secure. Python is readily available on your typical server; Javascript is built into most browsers.

So here is a skeletal example of how to get data from JavaScript to Python and back again that doesn’t require any extra JavaScript components, and therefore puts you in complete control of whatever risks you face, including resolving any bugs without having to depend on anyone else.

You can use this to build your own communications, adding all the security and reliability tweaks you desire, or none, for private, off-net use.

If, in pursuit of the kind of inter-language linking I demonstrate here, you’re thinking “Database!”, then I would also point you to my SqLite simplifier and PostgreSQL simplifier projects.
Read the rest of this entry »

Tags: , ,