1

I want to create an internally used web app that can be run with just a copy of the web app and the DB (anything from a text file to MS Access/Excel would work fine). Is this possible? I don't want users to have to setup a SQL server to get the app to work. Having the files necessary to run the web app stored on a shared network drive would be ideal, for example. The problem is that JS can't write to a DB. Is there anything that can use to do this?

Like mentioned, I can assume that Access/Excel are installed, if there's anything that might help there.

Jason
  • 87
  • 1
  • 6
  • 2
    We need a lot more information to give you a helpful response. Start by describing what this application would do. Also include if the clients need to share data between each other. Finally.... why? – Brad Jun 27 '11 at 01:11

4 Answers4

3

It's most certainly possible. W3 has put up the specs for a client side database that can be accessed by JavaScript. The modern browsers have good support for it, and since this is for an internal application, you would have some level of control I believe.

Checkout this slide that shows a live demo of Indexed Database. The full spec can be found here. See this link for browsers that currently support IndexedDB. Here's another set of slides showcasing how to use IndexedDB.

However, with this approach, each user's browser has its own DB locally. If you want a centralized DB, then you will need a server.

Anurag
  • 140,337
  • 36
  • 221
  • 257
1

You can perform database transactions with JavaScript. This is generally discouraged, because it has terrible security implications. However, in a completely local environment, you are probably not causing any additional security risks. (Because, your database is already on the user's machine.) You can see an example of how to use ADO in JavaScript at How to connect to SQL Server database from JavaScript in the browser? .

Community
  • 1
  • 1
smartcaveman
  • 41,281
  • 29
  • 127
  • 212
  • That thing is ActiveX based, it doesn't qualify as a web application. – Tobu Jun 28 '11 at 19:01
  • 1
    @Tobu, "A **web application** is an application that is accessed over a network such as the Internet or an intranet. The term may also mean a computer software application that is hosted in a browser-controlled environment (e.g. a Java applet) or coded in a browser-supported language (such as JavaScript, combined with a browser-rendered markup language like HTML) and reliant on a common web browser to render the application executable" ([Wikipedia](http://en.wikipedia.org/wiki/Web_application)). A JavaScript/ActiveX solution executing in a browser-controlled environment does qualify. – smartcaveman Jun 29 '11 at 03:13
0

Possible, yes, Like Making cars that can float in the sea but could not work on dry roads.
Use winforms or something similar. Use the right tool.
If you insists, Firefox plugins can behave in the way you mentioned, and there is a way to bundle a web application with it's server (check the beginner tutorials for RoR to have an example for something similar with webrick).

Itay Moav -Malimovka
  • 52,579
  • 61
  • 190
  • 278
-2

If I understand your requirements, you might look into ColdFusion.
For example, you can run a DB query pretty simply, check here, in Adobe

Itay Moav -Malimovka
  • 52,579
  • 61
  • 190
  • 278
Snowy Coder Girl
  • 5,408
  • 10
  • 41
  • 72
  • For example, you can run a DB query pretty simply: http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7fae.html – Snowy Coder Girl Jun 27 '11 at 01:14
  • -1, I really don't think learning ColdFusion is a good recommendation for something that can be accomplished with more easily available tools. – smartcaveman Jun 27 '11 at 01:42
  • Personally, I don't think that merits a down vote. Is it an absolutely out there suggestion in your opinion? Won't it work? – Snowy Coder Girl Jun 27 '11 at 02:57
  • Yes, it can work. I downvoted the answer because it makes the problem more complex instead of more simple. Your advice effectively changes the requirements from learning how to access a client-side data store from a web application, to learning ColdFusion fundamentals, learning how to interact with ColdFusion from a web application and learning how to access a client-side data store from a ColdFusion program. Consider that I can't swim and I want to cross the river. I can (1) take the bridge, or (2) learn to swim, then swim across the river. Both will work. One makes more sense. – smartcaveman Jun 27 '11 at 03:32
  • True. But that means you'll never swim. And if you fall in the water, you'll die. I don't consider learning new things to be a bad thing. – Snowy Coder Girl Jun 27 '11 at 04:11