Right now, I'm choosing technologies for a simple crossplatform mobile application. Target systems are basically iOS, Windows Phone 7.5 and Windows 8. In the first step it's going to be a local wireless LAN application.
There are existing servers (using .net / WCF) that have all the data I want to display. The app will be polling every few seconds and give a live view on the data. I won't be accessing the data server directly but have to create my own app-server in between.
For the client I chose the HTML5, CSS, JavaScript (JQuery) approach to make it run in any modern browser. So I'll have to communicate via http.
My question is which technologie to use for the server side of my app. I have to receive http requests, get data (at best via WCF) from another server and send it to the client as xml or html. (I am not quite sure whether server or client has to convert xml data into html)
Searching the web I figured out two possible approaches:
Looking at some ASP.net documentation and examples I got the impression that it just works the way I know from PHP etc... (Client sends request, server runs a script/programm, server sends response, programm terminates) I cannot keep objects in memory and run code independent of client requests. Or at least it's not designed to work like that. Is that correct?
That would force me to build my own very simple server that can answer a few specific http requests.
So my questions are:
Thanks in advance...
The most important things when choosing a technology for web development is its ease of use and the guarantee that it will help you create a high-quality and useful web application. In this article, we'll go over the available solutions, making it easier for you to learn the options and choose the best one.
Client-side rendering technologies like React and Angular use the processor on the client device to perform the bulk of the logic. That means processing power is offloaded from the server and transferred down to the client.
A server-side dynamic web page is a web page whose construction is controlled by an application server processing server-side scripts.
You can have a look at the APE (Ajax push Engine), as your application requires polling. Its built upon javascript and acts like an Comet server.
Alternatively you can also use one of the paid services for pushing(so that you shouldn't bother much about the server technologies)
1) Pusher
(From pusher homepage : Pusher is a hosted API for quickly, easily and securely adding scalable realtime functionality to web and mobile apps.)
2) UrbanAirship
As @Fabio mentioned Python Tornado can be alternatively used for polling. Its a COMET server, and a lot of realtime web applications are built upon this. There are many tutorials available on polling with NodeJs. A simple google search lead me to this article.
The data when accessed over mobile device is going to be costly. So, I would prefer to use JSON / XML to send the data over wire. Would go with RESTful approach to retrieve the data with WCF Restful services / ASP.NET Web API in .NET stack. Also, if you would be considering the battery usage you should avoid polling and should use Signalling frameworks. In .NET stack we have SignalR which does this. This would notify the clients when the new data is available and client would initiate a new request to fetch the data.
If you would like to experiment with new technologies, I would suggest using node.js at the server side and socket.io to communicate from the clients for signalling logic. Also, I would prefer to write the client application using phone gap & javascript so, that it could be easily ported to various platforms.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With