can a native app access the web? - native

OK, after trolling the web I'm a little confused.
If I build a native app from html5 with something like Apache Cordova, can this app keep its offline database up to date with data from the web server?

Yes We can do this using html5 server sent events. I did not try this but i guess it may helpful to u.get data from server to client
For caching

Off course it can. You'll "just" have to synchronize it when your application is connected to the internet.

Related

How can I install a Voice chat application Server and Client for Windows

I would like to setup a Voip Server and Client for Windows but when I searched on Google, there was too many results and too many softwares.
I want to setup a Voip sytem for my Intranet, that's why I can't use Skype. Because all the user of my computer are in different rooms I would like to be able to call the users easily by a voice chat application.
What are the best free softwares ?
Thank your for your help.
EDIT 1: I think I didn't give enough details: Thank you mrescape for your help but I don't want to create a program, I just want to download one.
EDIT 2 : I finally discovered WebRTC and decided to use this technology, it will be much easier to setup in my environment...
About VoIP server you can use http://www.asteriskwin32.com. And about client you can use X-lite or Portgo, Linephone ...

IBM Worklight Offline Support

we have an app which uses JSONStore to support offline, if device is offline and user submit data it stores it offline, now when device is online and when user login to the app it sync with server and submit all data to server.
the question is, Is it possible when device comes online then my offline data sync with server without user open my app ?
Does worklight support that? Or I have to do something else?
please advice
Like Idan said, Worklight does not support this, but depending on the OS, it could support it.
For instance, on Android, you could use BroadcastReceivers to detect changes in network connectivity, and execute an action when it happens, regardless of whether your app is closed or not.
Here is the API for the receiver: http://developer.android.com/reference/android/content/BroadcastReceiver.html and here is a SO answer explaining how to use it to detect WiFi connectivity: https://stackoverflow.com/a/22626736/2245921 So you can modify this BroadcastReceiver to run the sync code that you would normally do if your app was already open.
If you are using any other platform (iOS, Windows) there might be an equivalent that you can use.
Also, keep in mind that if you are doing a hybrid application, you can create your own Cordova plugin to execute native code from Javascript. Here is the documentation on how to do so: http://cordova.apache.org/docs/en/3.5.0/guide_hybrid_plugins_index.md.html#Plugin%20Development%20Guide

Download Data from SQL Database for use in iPhone App

Can someone point me to a tutorial or some resource that will show me how I can download or use a sql database from a web server and use that content in an app. I want to control content in an app dynamically, such that each time the app is launched, it loads content from the database and uses that to populate the app.
There are many ways to answer this question, but basically you should create a REST service (http://www.ibm.com/developerworks/java/tutorials/j-rest/) in the language of your choice.
This will connect to the SQL Server database.
Then you create a REST client in your program (consuming restful web service in iOS 5), and you can then interact with the database.
RestKit is an excellent library for build the iOS-side of a rest-driven system. Very actively supported, too. Has a nice tie-in for core data, too.

Out Of Browser Silverlight app with local offline database and WCF-RIA

I have the following scenario:
We develop a silverlight 4 app for our customers, that will be used as an out-of-browser app. The app is working offline, i.e. app and database are on the users local machine. The app is using WCF-RIA-services to connect to the local database. The database will be an SQL Server Express, SQL Server CE or MySQL. We are using MVVMLight and MEF.
An external webserver is only used for updating the app from time to time or adding new modules to the app. To achieve this we do something similar as shown in Jeremy Likness blog (http://www.wintellect.com/CS/blogs/jlikness/archive/2010/05/25/silverlight-out-of-browser-dynamic-modules-in-offline-mode.aspx )
The reasons why we are doing such a scenario are complex. But to keep a long story short it is mainly for compatibility reasons for a later online version and we don't want to use WPF. So we need to get this working with Silverlight and WCF-RIA services.
Ok, that's the scenario and here's the question:
Do we need a local webserver in this scenario? The app is programmatically installed as out-of-browser, the database is local and connected via WCF-RIA.
If yes, which webserver would be sufficient? It should be installed and configured via an initial setup that is executed by the customer. The customer should not have to do anything with configuring the webserver.
Any other ideas or comments on this scenario? Any other possible solutions for this?
Thanks for your help
Dirk
silverlight wasn't meant to be used this way I think. So it would be like when you are developing app in visual studio and use Cassini to see result - everything runs locally - but you still need a web server. Maybe more info here - http://www.infoq.com/news/2010/06/WPF-vs-Silverlight
I´m not able to provide with a full answer to your problem, as we are currently facing the same problem. (WPF not being cross-platform, Very specific hardware on some clients)
But I may share some of our thoughts on our type of Thick-Silverlight-Client:
To keep deployment etc. simple we use a self-hosting process (installed as background process)
We may not use RIA as the background process has to run using Mono VM (but for MS-only solution see Can WCF RIA Services be self hosted? )
Architectural thoughts on standalone "Clients":
Depending on your requirements implementing a server for each client communicating with the "main"-server by messages (NServiceBus) may be overkill. But if you want to use a client database if offline and silverlight for ui you should consider using an event-driven-architecture.
There is a slideshow on combining "Event-Driven-Architecture" & "CQRS" with Silverlight. But i would not use it as a blueprint more like an inspiration.
http://www.slideshare.net/dennisdoomen/cqrs-and-event-sourcing-an-alternative-architecture-for-ddd

How to create iphone app to react as web server?

I'm working on an app, in which server (windows based) will connect to the ipad application. Then data will be transfer from the server to the ipad app. I saw different apps like PDF Expert, Wifi HD, allows server apps to connect to the iphone app through IP address. I decided to use this approach. But I don't know how to implement this. How to make the iphone/ipad app to work as a web server like the above apps do and then transfer data to them from the server side.
BTW I'll run this app on LAN. The app is not for apple's app store. So we can use private API's in it freely (If there is any for this purpose)
Anyone can help me in this regard?
Thanks
First of all, your use of terms client and server seem incorrect (if I understood you correctly). The iPad application is not a server. It is a client. If you have a Windows application as the server, then all you would need to do is have the Windows application open a socket to listen for client connections. The iPad app would connect to the server on the port that the Windows server is listening. That's just the basics of how the client/server architecture works. There's more work that needs to be done for handling disconnects, multiple clients (if you are going to allow that), and other issues.
Try CocoaHTTPServer.
I agree with zooropa, I think you want iPad to be the client, you could setup a HTTP server in windows (with a WAMP, or NIS, or whatever server you like), then in the iPad app, I would create a class to download files with NSURLConnection, check http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/URLLoadingSystem/Tasks/UsingNSURLConnection.html for more information on how to implement a client and handle the requests.
Then when you want to download something, you use something like:
[HTTPClient downloadFile:#"http://lanserver/files/myFile.pdf" To:#"~/MyDocuments/"];
and the class would handle the request and store the file.