A simple database for an HTA - javascript

I have been tasked with creating a couple of databases for local use in our office, one for logging sickness calls and another for logging staff taxis.
I do not have the ability to install new software on the machines that will be used to develop the app nor on the machines that will use the app, so no xAMP based application, unfortunately. Excel is available, but I'd rather not go down that route as I want to provide a clean UI.
So I'm looking at putting together an HTA based application. The question is: I cannot seem to find a simple, easy to use database-type storage solution for an HTA application. Do I need to write something from scratch, or can anyone recommend something I can use?

You can try an SQLite ActiveX wrapper, like SQLite COM or SqLite2X.

If you can't install anything...
You should be able to connect to a ... dun dun dunnnn ... Access database using ADODB.Connection - VBScript example here, but the API should be portable to JScript, e.g. http://www.kuro5hin.org/story/2005/7/14/13942/7643
Quick and dirty idea - store everything in a JavaScript Object and read/write JSON to/from a file.

You can also use XML, with smthn like this:
http://msdn.microsoft.com/en-us/library/ms762708%28VS.85%29.aspx
but in my opinion, MDB(msaccess database) is the best way:
no external requirements in xp,vista,sevent and 8
it is a real DB (triggers,indexes)

You can use something like Ragic, instead of writing something from scratch. You really don't have to code anything, and your coworkers wouldn't be too perplexed, as it uses a spreadsheet interface like Excel. Also, it's a cloud database on the web, so you won't have to install on the office computers.

Related

Store data accessible to and editable for all users in JavaScript

Is this possible to do:
Create a (web) database where you can add data from a website either by writing to a file or another method.
Allow another user on the website to access this by reading from a file or another method.
If it is, I would like some information or code.
I Do not want to create an independent database because:
a) I just started learning html5 and javascript
b) I do not know how, or have the resources to (I think, I'm just a user on a shared system without sudo access)
OR
Would I have to use something like firebase: (https://www.firebase.com/docs/web/quickstart.html)?
If you have a Database , why would you need to write to a "file"?
What you really want is to create an application with a database. So search for tutorials, because there are hundreds available from google, in all web oriented languages you can imagine.
Or maybe you are looking for something like this?
IndexedDB API
IndexedDB is a transactional database system, like an SQL-based RDBMS. However, unlike SQL-based RDBMSes, which use fixed-column tables, IndexedDB is a JavaScript-based object-oriented database.

Is Node.js suitable for my project given how I'm using it?

I'm about to start writing an application and I want to include newer technologies to improve my knowledge and gain a skill set.
I'm using mysql to store user data (no choice), Angular.js to display/template content on the dom, and I wanted to use node.js to return results from the database in json format to be used by Angular.js.
My assumption was I could use node.js (along with the node-mysql module and maybe express)to accomplish my database queries that feed into my Angular.js templates.
Additionally, the application will live on a different server than the database itself and may reside in a mobile framework.
Am I way off base when it come to how to use node.js? Am I just using the wrong tool? Am I on the right track?
Any help, explanation, and points in the right direction would be great. Most of the info I've seen are copy/paste from the node.js site/wiki and don't really answer my question.
This is largely an opinion-based question and likely to be closed, but you're not way off base. What you want to do is absolutely (and commonly) done using Node.js.
As a complete aside, you might like to check out Platform-as-a-Service providers such as Heroku.com and Nodejitsu.com; both offer great and easy Node.js hosting and addons (such as NoSQL and RDBMS data stores) which have free tiers.
For that matter, MongoLab and MongoHQ both offer free tiers independent of Heroku, which you could use from your MySQL-only hosting provider if you like.

Is it possible to retrieve data from parse.com using objective-c and show it in website?

I have an iOS app in which I use parse.com as backend service. Now, I hired someone to do a website interface using HTML and CSS. I want to share the same data between iOS app and website, I know parse.com offers me a few ways to do this, including creating a javaScriptapplication. The problem is, my programmer doesn't have any experience in JavaScript, nor do I.
My question is: Is it possible to use what I have (objective-c, xcode) as far as retrieving data from parse.com and showing on website? Even if I need to code something new, is it possible to use objective-c together with HTML and CSS?
Thanks.
Parse has several APIs, one of which is REST. Your web developer should use the REST API to get data from Parse
https://www.parse.com/docs/rest
If there is will there is way, but you'll be making something really specific to your use and will be non standard and will be immediately hard to maintain, I recommend that you hire another developer and do things properly using the technologies given to you by parse !. if the cost will be high now I can promise you it'll be much higher if you went the path you're going to now.
So my answer is:
Yes, everything is possible and no, don't do it ! :)
Edit: Added an example to a possible way to do it to actually answer OP's question.
Example case:
1-Create a simple Mac Application in Xcode that fetches data exactly like you do it on iOS, and store the needed data into a database of your choice on your server
2-You now have access to the data you needed from parse, but on a local mirror. you will need some tool to fetch that data though, I recommend a simple PHP script.
Note that this will require an OSX server to always be running to fetch that data, you'll also need of find a way to fetch data on demand when a user needs it Vs. polling at specified intervals, this will hardly scale and will be costly as I said.

Dilemma... Which Program & Language to develop my Android and iOS App

I'm developing an app for both the android and ios platform. I'd like to take a route that allows me to only have to code once for both platforms. There are 2 options I've come across:
Develop in Flash builder 4.5 with flex (actionscript, or I've heard javascript also?)
Develop using Phonegap (javascript)
The app is very simple - it will use the google api and the phone's geolocation function, then also display more information about the business listings from google map's api. Downloaders of the app will also have to register to become free members. All of this information will have to be put into a mysql database on my server.
So my question is, which is the best route to take with what I am hoping to accomplish? If using Flash builder, is it best to learn actionscript or javascript? What's the best way to connect with the mysql server if I'm writing in javascript, ajax?
If you are serious about it and want to create other apps as well in the future, you should learn the native frameworks/languages for each of the platforms. If not, and you just want to make one quick app I would choose Phonegap rather than Flex/Flash.
Firstly, get familiar with HTML and Javascript to understand what they are even capable of. There's no point in trying to complete a project with tools that you don't understand. As for the options you named, I'd definitely go with the Phonegap method as it is much simpler.
However, you also need a backend for your solution if you're trying to use a MySQL or other database to store any data. For this you'd need some server-side language like PHP, JSP (or you could use NodeJS, if you want Javscript on the server too) etc, that retrieves information from the database according to the requests received from your app.
In conclusion, I'd suggest you to read more about PHP/MySQL, Javascript and making webpages, since this is what you are actually trying to do if you use Phonegap, even though you might look it as an app. Do some tutorials, get to know the languages before you try to take on something that surpasses your skill level just yet.
For a nice small db-interface I'd rather suggest using ruby (with sinatra as mvc-framework and activerecord on top of mysql, or just use rails) than using php!
http://guides.rubyonrails.org
http://www.sinatrarb.com/

Where to store design documents for CouchDB?

I'm new to CouchDB and I wonder how experienced CouchDB handles the large amount of design documents.
My questions:
Where do you store design documents: In CouchDB with Futon's "save" or on harddrive then uploading it through the HTTP API?
If you are uploading them, how do you do it? You create custom queries or are you using any framework?
I'm using node.js, are there good libraries/frameworks that I could use to ease the CouchDB development?
Please share your experiences!
1) Since the whole of CouchDB works through a REST API, all Futon is doing really is working through the REST interface. Basically, you will always load it through the HTTP API. It's a matter of choice of which tool you will do it with, in which the tool abstracts the process for you. At the end of the day, all a design document is, is another type of document.
2) Personally, since I am coding for it in python, I use the couchdbkit framework, which has auto document loading on it. I am sure there is something similar for node.js. I am unable to answer though.
3) Maybe node-couchdb, although it seems to be no longer maintained. There is alot of material on the internet, just google it!
CouchApp is the best tool for managing/uploading your design docs. Its main purpose is for pure Couch apps but you dont have to use that aspect, it makes design doc managing a breeze (couchapp push).
CouchDB is JSON over HTTP, both things Node does more or less natively. I've found the npm module Nano to work fairly well.
As far as CouchApp goes, there's a couchapp for node.

Categories

Resources