Javascript client-side what databases are available excluding browser specific ones - javascript

Trying to determine what actual non-browser (HTML 5) specific databases that are available for use in JavaScript client-side programing. I do not want to use activeX controls.

If you are looking for a NoSQL-style db on the client you can check out http://www.forerunnerdb.com. It supports the same query language as MongoDB and has a data-binding module if you want your DOM to reflect changes to your data automatically.
It is also open source, is constantly being updated with new features and the community around it is growing rapidly.
Disclaimer, I'm the lead developer of the project.

Initially the W3C created Web SQL, but that is no longer active. The current flavour is the Indexed Database API, which is a stand alone specification but requires support for DOM 3 Events, HTML5, WebIDL and WebWorkers.
Recent browsers should provide some support, however I don't think it's all that complete and certainly not ubiquitous. If you are targetting popular mobile devices or recent desktop browsers, you may be OK.

Related

How compliant are HTML5 websockets to accessibility standards?

One of the major requirements for accessibility standards such as WCAG is that the web site or application displays without the use of javascript or provides some sort of non JS alternative. I did some initial research and couldn't find much information on this in regard to websockets. Should I assume websockets are treated similar to AJAX?
Since Websockets require JavaScript to do anything useful, if you have a standard that requires you provide a non-JavaScript alternative, you will need to provide a non-JavaScript alternative that doesn't use Websockets. Yes, Websockets are just like AJAX; they're really just a way to create a persistent, 2-way connection rather than a one-time, request-response that AJAX provides. You should treat them just like you treat AJAX.
While WCAG 1.0 requires that you provide alternatives to JavaScript, WCAG 2.0 is more technology neutral; instead of requiring an alternative to JavaScript, it provides a set of techniques for making web pages involving client-side scripting more accessible. You should keep in mind that not all of your users will have JavaScript enabled; there are still some users who prefer to browse with it disabled entirely or by default. But accessibility technologies today are able to deal with certain uses of JavaScript, so you can write accessible sites even when there is no non-JavaScript fallback.
Brian's answer is good, but I figured I'd add some additional insights.
There's really two issues here: technology, and compliance.
As far as compliance goes, if for some reason you need WCAG 1.0, then you need a non-JS version. Because WCAG 1.0 says so. It used to be the case that some screenreader users would disable JS because it caused problems for screenreaders, but that's several generations of technology ago. A recent survey of screenreader users on the web showed 98.6% with Javascript enabled.
As far as the technology goes, the issues with Javascript and accessibility really have nothing to do with Javascript itself: the accessibility issues have to do with the fact that something (usually Javascript) is manipulating the UI via the DOM. It's that manipulation of the UI that's at issue with accessibility; care must be taken to ensure that the resulting DOM is accessible, and that screenreaders handle the changes appropriately - eg using ARIA live regions to ensure that a screenreader will read out new content if that is appropriate, or that keyboard focus doesn't disappear and end up somewhere unexpected.
Any javascript that doesn't change the UI pretty much by definition will itself not have accessibility issues: so web sockets, web workers, local storage and so on do not in and of themselves have accessibility issues; what matters is if and when you update the DOM later on.

Can I recognise (graphic tablet) Pen Pressure in Javascript?

Is there any way to recognise pen pressure using javascript.
Preferably I don't want to make any use of Flash and try get this done as pure JS.
EDIT: okay I realised that it is kind of possible for Wacom tablets as they come with software that can work with their javascript api to make it possible (demos). But it's no good for people with Trust tablets or any other brand... So no good really.
Any body know how to do it in C# if not JS?
Yes - if the user has a Wacom tablet installed, then their browser will have a plugin for it that you can access. http://www.wacomeng.com/web/index.html
edit from author: I wrote this a very long time ago. Please see the comments below
Microsoft implemented something called Pointer Events in IE 11. It allows you to access pressure property along with stuff like pen tilt and size of contact geometry.
So far it only works on IE11 (and IE10 with vendor prefixes) but there is a W3C candidate recommendation so maybe it will be standard in future.
Javascript as a programming language in itself has no more ability or lack of ability to read this kind of data than any other language.
The language isn't important. What is important are the APIs available to you from within the language.
Javascript can be run in a number of different environments, some of which may possibly have access to APIs for this kind of hardware. However most Javascript is run in a web browser environment, and this is clearly what you mean.
The web browser environment provides a number of APIs. The most obvious is the DOM, which gives you the ability to manipulate the page, etc. There are other APIs available in the browser as well though. For example, the Geolocation API.
All these are standard APIs which have been defined by the W3C (or in some cases are in the process of being defined by the W3C), meaning that all browsers that support them should make them work the same way.
Unfortunately for you there isn't a standard API for working with pressure pads, so the direct answer to your question is no, it can't be done.
Whether one will become available in the future remains to be seen, but I have my doubts.
There is one way that you can do it though: ActiveX.
ActiveX is an API provided by Microsoft in older versions of IE. It basically provides a way of accessing virtually any Windows DLL code from within the browser.
Since the pressure pen device driver for Windows will be provided as a DLL, this means you should theoretically be able to access it in the browser via an ActiveX control. So therefore yes, you would be able to program it using Javascript.
The bad news, though, is that this is not something I'd recommend. ActiveX as a browser-based technology has long since been abandoned, due to the massive security holes it caused. I don't think the latest versions of IE even support it (I hope not, anyway), which means you'd be forced to use old versions of IE (and only IE - no other browser ever supported it) in order to run your code. Not ideal.
No, that's not possible. Probably not even with Flash.
You can only do so in an Native app. Javascript does not have access to pen pressure information

Is it safe to use HTML5 Web SQL Database API?

After reading http://www.w3.org/TR/webdatabase/ and more specifically:
This document was on the W3C Recommendation track but specification
work has stopped. The specification reached an impasse: all interested
implementors have used the same SQL backend (Sqlite), but we need
multiple independent implementations to proceed along a
standardisation path.
I am wondering if it is "safe" (i.e. ongoing support) to use the HTML5 Database API?
It is strongly inadvisable. It has stopped and is being replaced with the IndexedDB API. Eventually, Web SQL Database will be removed from browsers which currently support it.
You might like to read current browser support figures for Web SQL Database and IndexedDB. Web SQL Database has more browsers which currently support it, but Firefox doesn't support it and outweighs Safari, Opera and assorted mobile browsers, and so it's only at about 28% while IndexedDB is near 36% global support. Also, I believe it is generally believed that Microsoft will support IndexedDB in IE10, while the Web SQL Database API will not be going any further.
Update, 2013-02-04: IE10 does support IndexedDB; Web SQL and IndexedDB are both just under 50% support. IndexedDB spec compliance is also very good which has led to IE10, Firefox and Chrome all now supporting it unprefixed.
No. In bigger, bolder letters is the text,
Beware. This specification is no longer in active maintenance and the
Web Applications Working Group does not intend to maintain it further.

What Local Databases are avaliable for Javascript?

I'm developing a project in Server Side Javascript (SJS) using POW webserver. The result of the project will be a local application for users that will interact with a sort of "Database" of Answers and Questions (It's like a Quiz Builder).
Actually we are just starting and we are storing informations into JSON files (POW allows read/write of plain files), but I'm looking for a more efficient way to store and recall information from the DB (something SLQ-like).
Is there any possibility of doing this using Javascript? One of the requirements is that the user doesn't have to install a DB server (Mysql, Sqlite ecc) so it should be a Javascript-pure way, or even XML-HTML5 way (I'm not going to use WebDB or similars).
There are two client-side database features in modern browsers: IndexedDB and Web SQL.
Neither is fully supported across the current versions of the various browsers, but IndexedDB seems to be the one which is going to win -- the Web SQL is apparently no longer being maintained, and may be dropped entirely.
You can find out more about them both, and their respective browser support on the CanIUse website.
[EDIT] As mentioned by #Raynos, there is also LocalStorage, which actually appears to have much better cross-browser support than either of the other two mentioned above. Given the browser support (even IE8 supports it!), this would seem to be the best option for the time being, even though it isn't as fully featured as the other options above.
Here's the CanIUse details for LocalStorage.
Hope that helps.
POW provides simple access to SQLite DB, saved in pow/data folder.
http://davidkellogg.com/wiki/Pow_db

Desktop application in Javascript/CSS/HTML for Google Chrome

I have to make a Google Chrome based application solely for desktop purpose. By Desktop I meant that it would not be loaded from some URL rather would be invoked on the machine only. The data would be stored/fetched from HTML5 SQLite databases or some storage provided by CHrome(Is there any?) The application would be purely based on Javascript/CSS/HTML. I also have to make it secure so that nobody could "steal" the code and data.
Can you refer me some relevant documents?
Thanks
You might want to consider making a Chrome plugin instead. As rcapote already mentioned, you can't really make JS secure in the way you want (even with an obfuscator). However, IF you can lock down your environment sufficiently, a Chrome plunging will be a lot more secure.
To be really safe though, as much as I hate to say it, you should really switch to a compiled format instead. There are even JS compilers (that compile to other languages).

Categories

Resources