Applicazioni mobile, traffico dati e web service

lunedì, 8 settembre 2008 09.00 by Marco Bellinaso

Nella mia recensione dell'iPhone dicevo che finalmente è davvero possibile avere Internet in tasca, grazie alle ottime capacità di Safari Mobile e grazie alla facilità di interazione offerta dalla UI e dallo schermo multitouch del device. Questo vuol forse dire che le informazioni che ci servono (per lavoro, per svago ecc.) possono essere sempre ricercate e consultate tramite i siti web esistenti, piuttosto che tramite applicazioni native ad-hoc? La risposta è: certamente no.

Il motivo è semplice: una pagina web pesa tranquillamente 500 KB (o anche molto di più, se siamo un po' sfortunati) tra html + css + immagini, ma le informazioni testuali che effettivamente ci servono saranno probabilmente pochi KB; se il problema fosse solo il maggiore tempo di attesa prima che i contenuti vengano scaricati basterebbe essere più pazienti, ma c'è ovviamente dell'altro. Il vero problema è che - in Italia ma in parecchi altri Paesi - non c'è una connessione flat per il traffico dati sui device mobili, ma si paga a traffico effettuato, eventualmente con dei pacchetti prepagati a tariffa "conveniente" (relativamente alle tariffe normali, altrimenti di conveniente ci sarebbe ben poco...). Ad esempio il Vodafone Pack prevede un traffico di 150 500 MB settimanali al costo fisso di 3€. Un traffico di questa entità è sufficiente per controllare la posta tramite i client integrati, e per visitare sporadicamente qualche sito web piuttosto leggere. Se però bisogna frequentemente consultare un paio di pagine da 500 KB di un certo sito, per ricavare poche informazioni relative ma disperse in più pagine, è chiaro che a 1 MB al colpo si stà presto a consumare una fetta troppo grossa del traffico disponibile.

Ecco dunque il senso di una applicazione nativa: questa si dovrebbe scaricare - tramite un web service o qualcosa di simile - solo i dati "grezzi" necessari, e poi formattarli, manipolarli e visualizzarli localmente. Ho provato a scrivere un web service classico (in ASP.NET...tecnologie MS forever dove possibile ;) che restituisse solo i dati: 45 KB di testo. 1/22 del traffico richiesto dalla navigazione via web per ottenere gli stessi dati...non male come risparmio no? Certo c'è da mettersi lì ed investire tempo a sviluppare una applicazione nativa custom, il che può non essere semplice, ma probabilmente l'applicazione potrà essere molto apprezzata da chi ha spesso bisogno di quelle info ma non vuole consumarsi tutto il suo traffico settimanale. Chissà, magari per un risparmio del genere sui costi di connessioni potrebbe essere pure disposto a pagare qualcosa per ringraziarvi del lavoro...

45K è un valore accettabile, ma pensandoci un po' si può fare di meglio. In quei 45K ci sono anche tutti i tag XML della risposta, dato che si tratta di un web service. XML/SOAP sono lo standard per un web service multipiattaforma, interoperabile e facilmente interpretabile...ma tutto ciò ci serve nel caso di una applicazione mobile che usa assolutamente in esclusiva quel servizio? No, non serve. In un caso del genere va benissimo un HttpHandler che si prende i parametri in querystring, e restituisce del plain text dove tutte i dati di risposta sono accodati in un ordine conosciuto e sono separati da un carattere particolare specifico. Come si faceva una volta ai tempi di ASP insomma. Il servizio di test che ho sviluppato con questo approccio produce delle risposte medie di 15K. 1/3 del traffico richiesto dal WS, e 1/66 del traffico richiesto dalla navigazione di 2 pagine web. Un risparmio che difficilmente non si può apprezzare. Come al solito quindi ogni soluzione o tecnologia va contestualizzata alla specifica situazione e necessità.

Correntemente valutato 4.0 da 5 utenti

  • Currently 4/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Segnala:  
Tags:   ,
Categorie:   Business | Mac OS X | Sviluppo software
Azioni:   E-mail | Permalink | Commenti (17) | RSS CommentiRSS comment feed

Post correlati

Commenti

settembre 11. 2008 08.25

jimb0

beh, il tutto dipende da quanto freakkettone sara' l'utente finale... sicuramente uno come te apprezzera' tale servizio, ma credi che chiunque lo apprezzi?
esempio: una funzione che gia' permette di risparmiare tempo e byte e' quella semplicissima di IE per scaricare le pagine senza immagini... beh, ho visto gente che, guardando sul mio palmare i siti di repubblica e del corriere senza immagini, non capivano bene com'era strutturata la pagina, sembrava che senza immagini fossero persi, e ancora c'era tutta la formattazione li'...

jimb0

settembre 11. 2008 09.30

Marco Bellinaso

beh immagino che sia perchè usi lo stesso strumento di prima, però vedi qualcosa di diverso (con dei buchi bianchi, X ecc.), quindi ti trovi spiazzato. Se però usi un nuovo strumento, che ti fa vedere le cose organizzate bene e ti guida ad una consultazione strutturata, il discorso cambia. Con la pagina aperta su IE senza immagini, hai il problema dello "spaesamento" + il problema di continuare a cercare la singola info (es: info meteo) che ti interessa all'interno dell'intera pagina. Una applicazione dedicata invece di mostra esattamente quello che vuoi con una UI fatta su misura per quella necessità.

Marco Bellinaso

gennaio 3. 2010 15.27

quick payday loans

Of course, what a great site and advisory posts, Can I add backlink - import your rss feed? Regards, Reader.

quick payday loans

gennaio 16. 2010 07.30

cataract eye drop

Q: What do you call a blonde in a tree with a brief case?

A: Branch Manager.


Regards
Jep

cataract eye drop

gennaio 16. 2010 08.27

sonoma hotels

Little Bobby was spending the weekend with his grandmother after a particularly trying week in kindergarten. His grandmother decided to take him to the park on Saturday morning. It had been snowing all night and everything was beautiful.

His grandmother remarked..."doesn't it look like an artist painted this scenery? Did you know God painted this just for you?"

Bobby said, "Yes, God did it and he did it left handed."

This confused his grandmother a bit, and she asked him, "What makes you say God did this with his left hand?"

Well," said Bobby, "we learned at Sunday School last week that Jesus sits on God's right hand!"



Regards
Medina




sonoma hotels

gennaio 21. 2010 11.16

Free Acai Berry trials

I pulled into a crowded parking lot and rolled down the car windows to make sure my Labrador retriever had fresh air. She was stretched out on the back seat, and I wanted to impress upon her that she must remain there. I walked to the curb backward, pointing my finger at the car and saying
emphatically, "Now you stay. Do you hear me? Stay!"

The driver of a nearby car gave me a startled look. "I don't know about you, lady," he said incredulously. "But I usually
just put my car in park."


Regards
Icons



Free Acai Berry trials

gennaio 29. 2010 07.13

Barbera del monferrato

Admiring the time and effort you put into your blog and detailed information you offer.

Barbera del monferrato

febbraio 16. 2010 14.58

Colon cleansers

Hi. I read a few of your other posts and i wanted to say thank you for the informative posts.

Colon cleansers

febbraio 20. 2010 14.13

CharlotteKj19

Various spheres of life take a lot of time and money, thus why have we to expend life time for research essay writing? That's smart to utilize some famous <a href="quality-papers.com/.../comparison_essay">comparison essay writing</a> service to purchase the term paper titles at, I guess.

CharlotteKj19

febbraio 22. 2010 11.59

Acne scar treatment

Hey - nice blog, just looking around some blogs, seems a pretty nice platform you are using. I'm currently using Wordpress for a few of my sites but looking to change one of them over to a platform similar to yours as a trial run. Anything in particular you would recommend about it?

Acne scar treatment

febbraio 26. 2010 01.20

payday loans

Found your site on del.icio.us today and really liked it.. i bookmarked it and will be back to check it out some more later ..

payday loans

febbraio 27. 2010 19.43

cash advance

Resources like the one you mentioned here will be very useful to me! I will post a link to this page on my blog. I am sure my visitors will find that very useful.

cash advance

marzo 4. 2010 09.25

plastic surgery honolulu

Very gripping issue faculty marker your site to arrest if you pen writer near in the subsequent.




Regards
Lugo






plastic surgery honolulu

marzo 6. 2010 16.23

instant loans

I just hope to have understood this the way it was meant

instant loans

marzo 8. 2010 01.37

teeth whitening

I love what you guys are always up too. Such clever work and reporting! Keep up the great works guys I've added you guys to my blogroll. Big thanks for the useful info i found on Applicazioni mobile, traffico dati e web service.

teeth whitening

marzo 9. 2010 10.52

replica watches

thanks for the share

replica watches

marzo 10. 2010 11.23

bad credit loans

Hey - nice blog, just looking around some blogs, seems a pretty nice platform you are using. I'm currently using Wordpress for a few of my sites but looking to change one of them over to a platform similar to yours as a trial run. Anything in particular you would recommend about it? Big thanks for the useful info i found on Applicazioni mobile, traffico dati e web service.

bad credit loans

Aggiungi commento


(Visualizza la tua icona Gravatar)  

  Country flag

[b][/b] - [i][/i] - [u][/u]- [quote][/quote]



Anteprima

marzo 11. 2010 16.16