Online / offline sync with AIR - actionscript-3

I am working in flex 4.6 air application, in which i am fetching data from server through HTTP services. We are using the Mysql database and php for making services. I want to implement the online/offline functionality in this application any one has any idea about that how it is possible through HTTP services or there is any other coding stuff for achieving it.
Thanks

Related

Mysql Programm to mobile

I made a Web Program which runs perfect on my localhost.
Now I want to bring it in the App Store and Google Playstore.
I hope someone of you can give me a tip which Plattform I should use as a Server.
T thought about azure or firebase.
But by firebase i have to Change my whole code because of tht nosql and it is not really possbile to make dynmaic pages.
on azure I only can bring it on the Marketplace.
does anyone know other pltfforms?
Ionic / Cordova / Phongap / Appcelerator are all names to look up for building a hybrid app and distributing to app stores.
Amazon EC2 or RDS can host a database for you which the app can connect to, I'm sure there are many others.

connecting an ios app to send information to a mysql database

Im doing my final project which is a taxi booking service. i intend to make an ios app for the customer so that they can book a taxi. the request will then be sent to the mysql database (held at the taxi base). i want to no how can i send the information from the app to the datatbase; and the datatbase to send a confirmation message back to the app confirming the taxi has been booked!>>>>>
i have read a lot about web servers but am very confused. can i use an web server e.g. windows home server 2008? any help would be appreciated.
I am not familiar with Windows home server 2008, but I'm pretty much sure that you can use it for your project.
If you want to keep things simple,
Just install XAMPP server which comes with all the components you need to work on this project including PHP and MySQL. It is one of the easiest servers to work with and most of all, its free and open source. http://www.apachefriends.org/en/xampp-windows.html
Then write the business logics inside your Web App using whatever the programming language you want to (for this one PHP would be enough, or choose Java if you want to have a more complex scalable solution). Writing data to a MySQL database using PHP is very easy and you can find ton of tutorials and sample source codes in the internet.
Now your web app is all set, the next step is to expose these services using REST where an iPhone can communicate with your services. Use JSON for interacting with your Web server from iPhone. Again, there are tones of tutorials on how to write a JSON RESTful service using PHP.
Finally in your iPhone app, you can access the service exposed from the server for saving data as well as to retrieve anything from it through JSON. For making this, use a good Objective-C framework such as AFNetworking. It comes with the JSON parser as well. Ref. http://afnetworking.com
Good luck with your project !
RESTful web services are going to be your best friend here.
Create a server side program in django or python or whstever. Connect it to a database (mysql).
You can host it on Amazon Web Services. I think they have windows 2008 instances. I would personally use the amazon linux ami.
Use afnetworking to invoke a get or a post on the server app and you are off to the races.
take a look at this open source taxi project
its work with RESTful web services but its better to forget about Microsoft Windows its better to use Linux hosting for your web service.

Connect iPhone app to remote database server

New to iPhone dev here. Just wondering what's the best way to connect an iPhone app frontend (based on Cocoa touch ) to a php/MySql based backend?
The iPhone application will frequently access and change data stored on our server.
Read about mysql framework and MCPKit framework but these are for cocoa not for cocoa touch.
so can I access mysql based backend without any web service on server side.?
Many thanks
You can create a REST Api for your PHP/mySQL. Something like this
https://github.com/gilbitron/Arrest-MySQL
Then on the iOS side of things, you can use something like AFNetworking, to make requests to your server.
https://github.com/AFNetworking/AFNetworking

Integrating a Swing App With Tomcat

I recently created a web application with GWT. Then re-used most of the code to create a Swing version of the application that accesses a local database in offline mode. I am now implementing the 'online' mode of the application and want to access the same data as my GWT application.
Any ideas? Considered connecting directly to the MySQL server via SSL, but that's not working and doesn't seem as scalable. Should I use REST?
Any suggestions would be helpful.
To solve this problem in the past, we've used Jersey to create REST Web services which returns protocol buffers. The Swing app would then interact with the protocol buffers. The GWT app would ask for content type 'json' and receive protostuff objects in return. It worked quite well. That way, both apps can communicate with the server in the exact way.
Edit:
To allow your swing app to communicate with GWT-RPC, look at this blog article.

A rails web app, quickbooks, and mysql

I've gotta use the inventory from quickbooks in my rails web app...it would be nice if I could get quickbooks to use mysql, as that way I could just use mysql between the app and quickbooks, which would make things easy.
Does anyone know how to get quickbooks to use mysql? Or will I be forced to have my app communicate directly with quickbooks, which I wanna avoid :P
There are a few ways of integrating with QuickBooks, but if it's a web application, your best bet is to use the QuickBooks Web Connector, or to use a commercial package for SQL access.
The Web Connector is the only Intuit-supported solution to integrating with QuickBooks from a web application. Basically, you build a SOAP server / Web Service which speaks a specific set of methods. The Web Connector then is installed on the machine running QuickBooks, and polls your web service asking "Hey, got anything for me to do?" Your web service can then respond with qbXML requests (examples of qbXML here: QuickBooks qbXML Examples) which tell the Web Connector "Add this customer: ..." or "Send me invoices which match: ..." or etc. etc. etc. The Web Connector then relays those requests to QuickBooks, QuickBooks processes them, and the response is relayed back to your web service. Your web service might then process the response somehow, and then send the next request over to the Web Connector. This can continue in a loop for as long as you like, continuing to send requests to QuickBooks and receiving the responses.
You might also look into AccessBooks and QODBC. Both are commercial wrappers around the QuickBooks qbXML SDK which allow direct SQL access to QuickBooks.
Here is some additional information on my QuickBooks Integration Wiki about how to integrate applications with QuickBooks.
You might also want to search around on Google. I know there were some QuickBooks Rails packages/gems out there somewhere, but last I looked it did not support the QuickBooks Web Connector. Instead, the Rails application had to be installed on the same machine as QuickBooks, and it communicated via COM.
Pretty sure you will have to interface with Quickbooks directly. The other problem is going to be that because Quickbooks is a client-side application you will need to have an app on the client that pushes the data to the server. It's definitely doable.
Alternatively, you could just use the export functions of Quickbooks to periodically export the inventory as CSV.
http://behindlogic.com provides a Rubygem (for sale) that will deal with all of the pains of QBXML for you, and an HTTP Connector for QuickBooks that allows you to send/receive messages with QuickBooks through HTTP, which opens the door for connecting from another computer. The gem has an adapter built to use the Connector as well, so you can very quickly get up and running with QuickBooks on Windows and your Rails app on Linux or on your development Mac.
EDIT: Unfortunately, the maintainer of Behind Logic and the gem mentioned above has passed away. I hate bringing this up, however it took me a while to figure out why the GitHub repo was inactive and the site had gone down.
We have been using the Web connector for a while now, and let me tell you its been pretty smooth so far. Though the Intuit Quickbooks SDK doesn't let you do wt exactly QB UI would let you. Problems occur especially when you want to enter group items to QB using the SDK. Use a webservice and let it build requests and process responses and push the required data to your database which can simply be anything from a SQL server to MySql/Oracle etc etc. Using this approach good amount of error handling can also be done.