I am developing my final year project that is mobile based attendance management and tracking system, but I am confused to make GPRS connectivity between j2me mobile application and mysql database.
Check out j2mesamples if it would help in your case.
As far as I know, it's not possible to connect to a mySql database directly. What you'd do instead, is to use a server-side scripting language, like e.g. PHP, to handle communications between your MIDlet and mySql.
You'll then have your MIDlet call PHP scripts like e.g.:
http://www.yoursite.com/insert.php?field1=some_value&field2=some_other_value
The PHP script will then get the values and insert into the database.
I've used this approach a few times for inserting and retrieving highscores for my games.
You need to use drivers in between and make sure you have MySQL Workbench to work on the other side.
Related
I am creating a nodejs app and as per clients suggestion trying to implement it in AmpersandJs. I have installed framework and created application by following documentation &js installation.
The app is running with some sample data
I found that the sample data is coming from ampersand-app module from an index.js file.
But I want to do database connectivity with it -- How should I achieve this? I have Googled but not found any good link for it.
Did &js is good choice to develop application or it is for an specific type of projects?
But I want to do database connectivity with it -- How should I achieve this?
Ampersand.js is running in the browser. If you want to access data stored in a database you have two options:
Request data from a database running on a server somewhere accessible over the network. In this case you want to use the url property of models/collections
Use an in-browser database (maybe you want to have look at pouchdb as API)
Did &js is good choice to develop applications?
Definitely yes!
I would like to know, how to get data from MySQL database to my application without using any REST API or PHP code. I was looking over the internet for the solution for this problem. But they say, you can use php code as REST API and then, can communicate with database. For this purpose, i will need a host and domain. I don't want to use that. Is there any other way to communicate with mysql database. Can i use mysql module of node js in titanium application.
There is no way to have direct connection between your mobile client and MySQL database. To retrieve data from MySQL you need to build application which will receive request from your app, retrieve data from MySQL, process and return it as a response.
If you don't want to build mobile and server application at the same time you can try using Appcelerator Cloud service, which plays really nicely with Titanium SDK and allows you to persist users data.
There are two answers to this problem, depending on your situation:
If Your Data Is Specific to One Device...
If you want to store data locally on one device, and that one device is the only one that will ever use it, then you want to use a SQLite database. This is very commonly used in mobile apps, and is very well documented. If you already have a MySQL database with the schema you want to use, then you could really easily convert it to a SQLite db file.
If Your Data Is Centralized...
If you need to store data remotely, in one central place, that the mobile app can access, then you need to use a remote database.
MySQL is one such option. You say that hosting PHP (which is itself run through something like Apache or IIS) is not something you want to do. But if you can host MySQL somewhere, or run it on a machine that your mobile app can access, then you can also easily host PHP and Apache.
If you don't want to spend money on a domain, then use one of the free dynamic DNS providers, which map a domain name (such as foo.hopto.org) to an IP address. If you don't want to pay for a server, then use your home computer, and keep it on whenever the mobile app needs to access it. There's easy, well documented ways around any of the issues you're having.
Alternatively, as #daniula pointed out, use Appcelerator Cloud Services. Then you can interact with simple objects, and they'll be stored for you in a central server. You can control who can access what data, and more. (Full disclosure -- I work for Appcelerator.)
I am a network administrator, former software engineer also.
I want to build my own program to keep track the IP, equipment and etc. Since our company has only only less than
100 equipments (including PCs, Printers), the data to process is small, can anyone suggest which language and platform suit my needs best ?
Hmm.. if it were me, I would do a mix of PHP and MySQL for the data backend (CRUD Operations) with HTML, CSS, and JavaScript for the front end UI. This would require Apache, MySQL, and PHP to be installed. These are available to any platform (Windows, OSX, Linux, etc.)
If its local for your use, just create an Access Database.
If web based, this is a fast and simple way ... xml based CRUD
I'm trying to build a website myself but I also want to build a native mobile application that will access the same DB in the future.
What I'm thinking now is using Node.js to build Web Services wrapper for the DB and every DB operation will be executed via web service API. And for the website framework, I'm going to use Rails.
Please let me know whether this is a good architecture or not. I'm not sure whether encapsulate data with Web Services is a good idea. Will there be any performance issue? And if it's feasible, which DB should I use? And can rails communicate with DB via web services?
Thanks a lot!
Update
Why do people down vote this question??
I think you have more technology than needed in your architecture right now.
Personally I would create a REST api on top of the DB (using either node or Rails - both are super easy to do this with and both can use pretty well any db)
Then you can write any number of "apps" for the front end process, whether they are web apps, ios apps, android apps, etc... They will all get their data from your REST api on the backend.
You might even consider writing the front end as a single page app using Angular, Knockout or Backbone, something like that. If you do that with node, your entire stack will essentially be written in javascript. It can get confusing for a newb, but it's super powerful.
I have to connect to a RDBMS (locally and remotely) via iOS. I have seen the solution ( http://odbcrouter.com/ipad), but for that we have to buy a server side program to run but its very expensive and not a mangeable solution as we have to buy it for more than 1000 stores and making updates etc for each store will be very difficult.
I have just checkout the following iOS app ( http://www.impathic.com/impathic/index.html), it is doing the same thing without any server side code, which make me think that, there will be a way to do this without any server side code... So I was wondering if these RDBMS expose themselves the way I am expecting.
Thanks.
That impathic program is very interesting, but they're likely using a 3rd party library.
The RDBMS wire protocols aren't common, and typically only ODBC and JDBC drivers have implementations of them (and the actual native drivers of course).
If your database is Postgres or MySQL (or some other OSS DB) you may well be able to simply port the native drivers source code to iOS and build it for ARM. I've not done it, but it might work. I don't know if any of the other DBs have ARM native drivers for iOS or note.
Otherwise, you would likely be better off with a middleware solution, depending on what kind of work you plan on doing. Webservices are pretty straight forward for basic cases.