Sephiroth
Sephiroth

Reputation: 189

Databases with Jquery Mobile

I have a couple of questions about using databases with Jquery Mobile.

When you are building a Jquery Mobile application, do you use regular PHP/MYSQL for login and contact forms?

What would happen if the user did not have a connection to the internet?

Is there a way to "cache" a database?

Sorry if these questions seem silly, I am new to Jquery Mobile.

Thanks friends.

Edit: The contact form will only have 3 or 4 inputs. The form is simply a small feedback form.

Upvotes: 0

Views: 2605

Answers (3)

David East
David East

Reputation: 32604

It really depends on the type of data you are storing. Is there going to be a need to a decent amount of queries and stored procedures? Do you need triggers and rules to validate your data in your database?

The main question to ask is:

Do you need to build off of a schema? Or are you mainly going to be working with JSON objects?

If you plan on spending a lot of time in the database managing a schema and other rules then go with a MySQL or a SQL Server Express option. Both database engines are free and will allow you to manage your data easily.

However, if your data is based off JSON objects and does not really adhere to a relational model, I would go with a document oriented database like CouchDB.

http://couchdb.apache.org/

CouchDB was really made for websites that do not want to use a specific schema, but need some sort of storage system. You can store JSON documents in your database and query and retrieve data with simple HTTP.

Rather than being schema oriented like SQL databases, CouchDB is document oriented. A CouchDB database is a flat collection of documents.

Since you mentioned you were using PHP, below is a tutorial on getting starting with PHP and CouchDB.

http://wiki.apache.org/couchdb/Getting_started_with_PHP

Upvotes: 1

Phill Pafford
Phill Pafford

Reputation: 85318

You could use any Backend technology you wanted, PHP and MySQL are great for this. I prefer PostgreSQL over MySQL but that's another debate.

As for client-side database you could use HTML5 Local Storage ( more on this here ), but for any server-side authentication / interaction you will need a internet connection.

For no internet connection IMHO I would show an error to the end user saying something like, "Services are not available" or "Please check your internet connection".

For Offline Application use you could look into these ( I have not tried any of these )

How to check for internet connection ( What others have tried )

Upvotes: 3

user1107107
user1107107

Reputation: 44

i have one good suggestion. if you want create jquery mobile then use phone gap.

its totally based on jquery and html.

its easy to develope and easy to connect with database.

Upvotes: -1

Related Questions