This document summarizes tips for preparing web services to work well with Android apps and vice versa. It recommends that web services use RESTful APIs with JSON responses for compactness and easy parsing by Android apps. It also provides tips for structuring and caching data efficiently, securely communicating with web services from Android apps, and playing nicely with web services by sending useful debugging information.
My presentation from Michigan Google Developers DevFest 2013.
As mobile apps continue to get more sophisticated, they need data, whether it’s the from the business backend or the current scoreboard for a game server hosted in the cloud. Find out how to connect to and consume web services with your Android application. Get connected to the cloud, working with REST web services and learning how to parse the results.
AtlasCamp 2014: Building a Connect Add-on With Your Own StackAtlassian
Atlassian provides two easy-to-use frameworks for getting a Connect add-on up and running quickly – atlassian-connect-express and ac-play. But what if these frameworks don't quite fit your bill? What does it mean to build a Connect add-on with your own stack? What components do you need to write? And how does it all fit together? Attending this talk will give you enough background information to implement an add-on in the language and technology stack of your choice.
Modern progressive web applications are complex pieces of software running in the browser. Fastly offers unparalleled control over the way the bytes fly from your servers to the user, enabling many of the features of advanced progressive web apps to truly shine. This talk will show how these latest web technologies can best take advantage of smarts in the network to deliver your web app at top speed.
AtlasCamp 2014: 10 Things a Front End Developer Should Know About ConnectAtlassian
If you're a JavaScript developer, you can't miss this session. Atlassian Connect presents some challenges that might be new to JavaScript developers, like third-party cookie policy, window.postMessage, and sending data between multiple iframes, just to name a few. This session will address these challenges and offer practical tips from the trenches of building new add-ons with Atlassian Connect.
REST Easy - Building RESTful Services in Zend FrameworkChris Weldon
The epicenter of data sharing in "Web 2.0" are web services. Whether you like it or not, you are consuming literally hundreds of services a day, whether it be searching in Google, running Facebook on your mobile device, or searching the App Store on your tablet. Yet, despite our hunger for services, few have ever written one. In this session, you'll learn what are RESTful web services and how to get started creating them in Zend Framework.
My presentation from Michigan Google Developers DevFest 2013.
As mobile apps continue to get more sophisticated, they need data, whether it’s the from the business backend or the current scoreboard for a game server hosted in the cloud. Find out how to connect to and consume web services with your Android application. Get connected to the cloud, working with REST web services and learning how to parse the results.
AtlasCamp 2014: Building a Connect Add-on With Your Own StackAtlassian
Atlassian provides two easy-to-use frameworks for getting a Connect add-on up and running quickly – atlassian-connect-express and ac-play. But what if these frameworks don't quite fit your bill? What does it mean to build a Connect add-on with your own stack? What components do you need to write? And how does it all fit together? Attending this talk will give you enough background information to implement an add-on in the language and technology stack of your choice.
Modern progressive web applications are complex pieces of software running in the browser. Fastly offers unparalleled control over the way the bytes fly from your servers to the user, enabling many of the features of advanced progressive web apps to truly shine. This talk will show how these latest web technologies can best take advantage of smarts in the network to deliver your web app at top speed.
AtlasCamp 2014: 10 Things a Front End Developer Should Know About ConnectAtlassian
If you're a JavaScript developer, you can't miss this session. Atlassian Connect presents some challenges that might be new to JavaScript developers, like third-party cookie policy, window.postMessage, and sending data between multiple iframes, just to name a few. This session will address these challenges and offer practical tips from the trenches of building new add-ons with Atlassian Connect.
REST Easy - Building RESTful Services in Zend FrameworkChris Weldon
The epicenter of data sharing in "Web 2.0" are web services. Whether you like it or not, you are consuming literally hundreds of services a day, whether it be searching in Google, running Facebook on your mobile device, or searching the App Store on your tablet. Yet, despite our hunger for services, few have ever written one. In this session, you'll learn what are RESTful web services and how to get started creating them in Zend Framework.
Ajax [Asunchronous HTTP request ] - A Deep Introduction About Ajax Technology - Lets Take a Glance About Ajax ,Where it's use | Whats the purpose of Ajax in Web Application Developement . Bacis of Ajax Technology + Coding Tips ..
Building Atlassian Connect add-ons with client-server frameworks like Express.JS and Play produces powerful add-ons, but requires hosting and database consideration. In contrast, "static" Connect add-ons are easier to write and far simpler to deploy. A static Connect add-on is simply a set of files (including an atlassian-connect.json descriptor) that are web accessible, either through a web server or via deployment to a CDN. Static add-ons have several advantages. First, infinite scalability. Why pay for CPU when you can let the user agent do the work? Second, simple persistence. Why pay for disk when you have local storage and JIRA & Confluence's persistence REST APIs? Third, extreme performance. Let a worldwide CDN serve your files from the nearest edge - it's literally impossible to compete with a static add-on when it comes to performance! Finally, easy caching. Why bother serving requests when your unchanged static files can be cached indefinitely with simple HTTP caching? In this talk I'll highlight the benefits and restrictions of static add-on architecture, and discuss the nuts and bolts of implementing a static add-on. I'll also show off the static add-on skeleton that will get your static add-on development off to a flying start.
AtlasCamp 2014: Writing Connect Add-ons for ConfluenceAtlassian
This AtlasCamp, we're talking a lot about Atlassian Connect and the new Confluence REST API. This session will bring it all together with an overview on building a Connect add-on with Confluence. We will cover best practices when writing complex dynamic macros with respect to security, performance and maintainability.
Presentation on MongoDB and Node.JS. We describe how to do basic CRUD operations (insert, remove, update, find) how to aggregate using node.js. We also discuss a bit of Meteor, MEAN Stack and other ODMs and projects on Javascript and MongoDB
Log File Analysis: The most powerful tool in your SEO toolkitTom Bennet
Slide deck from Tom Bennet's presentation at Brighton SEO, September 2014. Accompanying guide can be found here: http://builtvisible.com/log-file-analysis/
Image Credits:
https://www.flickr.com/photos/nullvalue/4188517246
https://www.flickr.com/photos/small_realm/11189803763/
https://www.flickr.com/photos/florianric/7263382550
http://fotojenix.wordpress.com/2011/07/08/weekly-photo-challenge-old-fashioned/
Web services are common way to communicate between applications regardless of languages or platform your application is developed. Therefore, understanding of Web services is a critical skill. In this session we will go through the basics foundation of what web services are and how you can create, utilize, and secure them.
Topics Include:
1. What is a web service?
2. Understanding of transfer protocols and message formats
3. Understanding different types of Web services
4. Creating basic web services
5. Available tools
6. Security
Presenter: Zeeshan Baig
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!Masoud Kalali
This session focuses on how Java EE 7 provides extensive set of new and enhanced features to support standards like HTML5, WebSockets, and Server Sent Events among others.In this session we will show how these new features are designed and matched to work together for developing lightweight solutions matching end users high expectation from a web application’s responsiveness. The session will cover best practices and design patterns governing application development using JAX-RS 2.0, Async Servlet, and JSON-P (among others) as well as iterating over the pitfalls that should be avoided. During the session we will show code snippets and block diagrams that clarify use of APIs coming from the demo application we will show at the end.
Altitude SF 2017: Fastly GSLB: Scaling your microservice and multi-cloud envi...Fastly
In this workshop, we’ll dive into how Fastly’s global server load balancer (GSLB) can help you scale your application. Whether you are bringing together multiple microservices as a single platform, using geo location to direct customers to your closest origin, or creating a multi-origin cloud failover for high availability, this workshop will show you examples you can use with Fastly to achieve a scalable, global load balancing strategy.
Things I have learned over the years through experience of having to deliver code rapidly, with few defects and maximum functionality. I cover basic coding techniques, automated testing and sometimes I have enough time to review tools and code generation!
Inside election night at The New York Times | Altitude NYCFastly
Over the past two decades, The New York Times has successfully made the transition to a digital-first company while maintaining its reputation as one of the most trusted news sources in the world. CTO Nick Rockwell discusses the latest steps in the Times’ journey: implementing Fastly in preparation for record traffic during the 2016 presidential election. He covers the impact the NYT saw to backend load and to global performance, as well as the long-term implications for their infrastructure. And of course, he also discusses the timeline of election night, and how surprise and unpredictability led to rapid shifts in reader behavior and the NYT’s response.
Ajax [Asunchronous HTTP request ] - A Deep Introduction About Ajax Technology - Lets Take a Glance About Ajax ,Where it's use | Whats the purpose of Ajax in Web Application Developement . Bacis of Ajax Technology + Coding Tips ..
Building Atlassian Connect add-ons with client-server frameworks like Express.JS and Play produces powerful add-ons, but requires hosting and database consideration. In contrast, "static" Connect add-ons are easier to write and far simpler to deploy. A static Connect add-on is simply a set of files (including an atlassian-connect.json descriptor) that are web accessible, either through a web server or via deployment to a CDN. Static add-ons have several advantages. First, infinite scalability. Why pay for CPU when you can let the user agent do the work? Second, simple persistence. Why pay for disk when you have local storage and JIRA & Confluence's persistence REST APIs? Third, extreme performance. Let a worldwide CDN serve your files from the nearest edge - it's literally impossible to compete with a static add-on when it comes to performance! Finally, easy caching. Why bother serving requests when your unchanged static files can be cached indefinitely with simple HTTP caching? In this talk I'll highlight the benefits and restrictions of static add-on architecture, and discuss the nuts and bolts of implementing a static add-on. I'll also show off the static add-on skeleton that will get your static add-on development off to a flying start.
AtlasCamp 2014: Writing Connect Add-ons for ConfluenceAtlassian
This AtlasCamp, we're talking a lot about Atlassian Connect and the new Confluence REST API. This session will bring it all together with an overview on building a Connect add-on with Confluence. We will cover best practices when writing complex dynamic macros with respect to security, performance and maintainability.
Presentation on MongoDB and Node.JS. We describe how to do basic CRUD operations (insert, remove, update, find) how to aggregate using node.js. We also discuss a bit of Meteor, MEAN Stack and other ODMs and projects on Javascript and MongoDB
Log File Analysis: The most powerful tool in your SEO toolkitTom Bennet
Slide deck from Tom Bennet's presentation at Brighton SEO, September 2014. Accompanying guide can be found here: http://builtvisible.com/log-file-analysis/
Image Credits:
https://www.flickr.com/photos/nullvalue/4188517246
https://www.flickr.com/photos/small_realm/11189803763/
https://www.flickr.com/photos/florianric/7263382550
http://fotojenix.wordpress.com/2011/07/08/weekly-photo-challenge-old-fashioned/
Web services are common way to communicate between applications regardless of languages or platform your application is developed. Therefore, understanding of Web services is a critical skill. In this session we will go through the basics foundation of what web services are and how you can create, utilize, and secure them.
Topics Include:
1. What is a web service?
2. Understanding of transfer protocols and message formats
3. Understanding different types of Web services
4. Creating basic web services
5. Available tools
6. Security
Presenter: Zeeshan Baig
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!Masoud Kalali
This session focuses on how Java EE 7 provides extensive set of new and enhanced features to support standards like HTML5, WebSockets, and Server Sent Events among others.In this session we will show how these new features are designed and matched to work together for developing lightweight solutions matching end users high expectation from a web application’s responsiveness. The session will cover best practices and design patterns governing application development using JAX-RS 2.0, Async Servlet, and JSON-P (among others) as well as iterating over the pitfalls that should be avoided. During the session we will show code snippets and block diagrams that clarify use of APIs coming from the demo application we will show at the end.
Altitude SF 2017: Fastly GSLB: Scaling your microservice and multi-cloud envi...Fastly
In this workshop, we’ll dive into how Fastly’s global server load balancer (GSLB) can help you scale your application. Whether you are bringing together multiple microservices as a single platform, using geo location to direct customers to your closest origin, or creating a multi-origin cloud failover for high availability, this workshop will show you examples you can use with Fastly to achieve a scalable, global load balancing strategy.
Things I have learned over the years through experience of having to deliver code rapidly, with few defects and maximum functionality. I cover basic coding techniques, automated testing and sometimes I have enough time to review tools and code generation!
Inside election night at The New York Times | Altitude NYCFastly
Over the past two decades, The New York Times has successfully made the transition to a digital-first company while maintaining its reputation as one of the most trusted news sources in the world. CTO Nick Rockwell discusses the latest steps in the Times’ journey: implementing Fastly in preparation for record traffic during the 2016 presidential election. He covers the impact the NYT saw to backend load and to global performance, as well as the long-term implications for their infrastructure. And of course, he also discusses the timeline of election night, and how surprise and unpredictability led to rapid shifts in reader behavior and the NYT’s response.
بناء تطبيقات ويب 2.0. دروس مستفادة و نصائح موجهة lunarhalo
هذه المحاضرة ألقيت في جامعة الملك سعود لكلية علوم الحاسب للبنات في الرياض في ديسمبر 2009 بالتعاون مع الدكتورة هند الخليفة. شرحت في هذه المحاضرة تجربتي في بناء خدمات الويب و النصائح و الدروس التي استفدتها من التجارب.
1. Overview
1.1 What is a web service?
1.2 What is a web service?(cont.)
2. Working with SOAP services
2.1 What is SOAP?
2.2 What is SOAP? (cont.)
2.3 Why is SOAP Needed?
2.4 SOAP Building Blocks
2.5 SOAP Building Blocks (cont.)
3. Working with XML
3.1 What is XML?
3.2 What is XML Parser?
3.3 The main types of parsers?
3.4 What is SAX parser?
3.5 What is SAX parser? (cont.)
3.6 What is DOM parser?
3.7 What is DOM parser? (cont.)
3.8 What is Pull parser?
3.9 What is Pull parser? (cont.)
4. Using KSoap2 Library
4.1 What is KSoap2?
4.2 Why is KSoap2 Needed?
5. Working with Restful web services
6. Working with JSON
6.1 What is JSON?
6.2 JSON’s basic types
Le module de fabrication a une Interface très conviviale, intuitive. Il est facile à implanter. Il peut même faire la gestion de scénarios de production complexe.
Migration gmao de openerp 6.1 vers odoo 8HORIYASOFT
Projet de fin d’étude consiste à réaliser une migration des données du PGI existant OpenERP v6.1 vers Odoo v8 et le portage du module GMAO (Gestion de la
Maintenance Assistée par Ordinateur) réalisé par NEXTMA
ainsi que le module TMS (Transport Management System)
Atelier2 Odoo: Gestion des Ressources Humaines (installation, employés, contr...Abdelouahed Abdou
La gestion des ressources humaines (GRH), ou gestion du personnel, regroupe l'ensemble des pratiques mises en œuvre pour administrer, mobiliser et développer les ressources humaines dans une organisation.
Les ressources humaines peuvent être les collaborateurs attachés à l’organisation (ouvriers, employés, cadres) mais aussi les collaborateurs des sous-traitants.
Odoo propose un module (extensible) dédié à la GRH. Ce module permet entre autres de gérer les salariés et leurs contrats, la paie, les congés, les feuilles de présence, les notes de frais, les recrutements, ...
La première chose à faire est d’identifier la liste des collaborateurs (employés). Surtout, il ne faut pas confondre entre utilisateurs de l’application et employés (collaborateurs) ; un employé peut être un utilisateur mais un utilisateur ne peut pas être forcement un employé. Ainsi, «Employé» représente toutes les personnes physiques qui ont un contrat de travail avec l'entreprise. Cela comprend tous les types de contrats. Alors qu’un utilisateur (du système) est une personne physique qui a accès aux systèmes de l'entreprise.
Formation Android (Initiation à la programmation sous Android)G²FOSS ENIT
Exposé de la première séance de formation en programmation mobile sous Android, animée par Med Hossam (Elève Ingénieur en GLSI à l'ISI)
[Atelier Mobile]
Paramétrage et développement spécifique des modules odoo(OpenERP) Partie 1Addi Ait-Mlouk
Paramétrage et développement spécifique des modules odoo(OpenERP) Partie 1
•Prise en main complet d’odoo
•Configuration complète
•Caractéristiques techniques complète
•Savoir crée un module personnalisé
•Savoir développer un module spécifique
Lets look at an example of what a performant website can look like. This discuss what concepts should we be considering when looking at website performance. Next we will go over two areas pertaining to website performance: 1) website performance tweaks that you as a web developer can directly make 2) website performance tweaks that you may have to work with your hosting provider or IT department to achieve
Web service API opens new possibilities to extend websites/web applications including mobile applications, third parties services, etc. We will design a web service API from scratch and review best practices and common mistakes.
Delivering High Performance Websites with NGINXNGINX, Inc.
NGINX Plus is an easy-to-install, proven software solution to deliver your sites and applications through state-of-the-art intelligent load balancing and high performance acceleration. Improve your servers’ performance, scalability, and reliability with application delivery from NGINX Plus.
NGINX Plus significantly increases application performance during periods of high load with its caching, HTTP connection processing, and efficient offloading of traffic from slow networks. NGINX Plus offers enterprise application load balancing, sophisticated health checks, and more, to balance workloads and avoid user-visible errors.
Check out this webinar to:
* Learn why web performance matters more than ever, in the face of growing application complexity and traffic volumes
* Get the lowdown on the performance challenges of HTTP, and why the real world is so different to a development environment
* Understand why NGINX and NGINX Plus are such popular solutions for mitigating these problems and restoring peak performance
* Look at some real-world deployment examples of accelerating traffic in complex scenarios
Introduction to amazon web services for developersCiklum Ukraine
Introduction to Amazon Web Services for developers
About presenter
Roman Gomolko with 11 years of experience in development including 4 years of day-to-day work with Amazon Web Services.
Disclaimer
Cloud-hosting is buzz-word for a while and in my talk I would like to give an introduction to Amazon Web Services (AWS).
We will talk about basic building blocks of AWS like EC2, ELB, ASG, S3, CloudFront, RDS, IAM, VPC and other scary or funny abbreviations.
Then we will discuss how to migrate existing applications to AWS. This topic includes:
• how to design infrastructure and services to use when migrating
• how to choose proper instance types
• how to estimate infrastructure cost
• how it will affect performance of application migrated
Then we will make an overview of services provided by AWS and possible apply in your current of future applications:
• SQS
• DynamoDB
• Kinesis
• CloudSearch
• CodeDeploy
• CloudFormation
And if we survive we will talk a little how to design Cloud applications. That’s mainly about general principles.
My talk mostly targeted towards decision makers and decisions pushers of small and medium size companies which are consider “going cloud” or already moving into this direction. Everyone interested in gaining knowledge in these areas are welcomed as well.
We will spend around 2–3 hours together and you will be able to pitch-in any questions until we totally goes away from original plan.
MongoDB Days Silicon Valley: Winning the Dreamforce Hackathon with MongoDBMongoDB
Presented by Greg Deeds, CEO, Technology Exploration Group
Experience level: Introductory
A two person team using MongoDB and Salesforce.com created a geospatial machine learning tool from various datasets, parsing, indexing, and mapreduce in 24 hours. The amazing hack that beat 350 teams from around the world designer Greg Deeds will speak on getting to the winners circle with MongoDB power. It was MongoDB that proved to be the teams secret weapon to level the playing field for the win!
Serverless Big Data Architecture on Google Cloud Platform at Credit OKKriangkrai Chaonithi
This is a talk at at Barcamp Bangkhen 2018,
presented by Kriangkrai Chaonithi.
I shared my experience at Credit OK on building a data pipeline to ingest huge amount of customer data to our big data analytic warehouse using serverless services on Google platform.
As a result, we can make it without setting up any servers to handle our data at a very minimal cost.
4 years ago, mid 2013, we have identified a gap in the cloud echo-system. The landscape of IaaS, PaaS and SaaS provides solutions for VMs, Container and Networking, platforms of different types for backend developers, Backends for mobile developers and ready made software for individuals and enterprises. What is missing in the middle is the platform for web-sites and web-apps.
4 years down the line, with the emergence of Serverless, there are still no players in this gap. We will talk about what makes a platform for web-sites and web-apps. Things frontend optimized javascript, SEO, visual builder, web methods & backend javascript as well as request time container boot.
We have built Wix Code over the last 4 years targeting this exact gap – a serverless platform for website and web applications, and so …
Wix is taking the risk of predicting the future of serverless computing and where it should be 4 years from now.
Ten practical ways to improve front-end performanceAndrew Rota
Conference talk presented at PHP South Coast 2017. Ten concrete ways to improve web performance, split between quick tactical wins and longer-term overarching strategies.
Write less (code) and build more with serverlessDhaval Nagar
Presented the Serverless Use case at the Charotar University of Science and Technology.
CHARUSAT has a very active AWS Student Community.
https://aws.amazon.com/blogs/training-and-certification/aws-academys-big-bet-on-higher-education/
Combining ReST and Context for Killer iPhone Appsjasonc411
This slide deck was presented at iPhone Developer Summit East on June 22, 2009. It covers a new archetype that uses ReSTful Web-Services and Cloud Computing to extend the functionality of Context-Aware mobile applications. Enjoy!
Jason
http://jasonc411.com
On twitter: http://www.twitter.com/jasonc411
Engage 2022: The Superpower of Integrating External APIs for Notes and Domino...Serdar Basegmez
Session De13 from Engage User Group Conference 2022 with Thilo Volprich
"In the jungle, no application walks alone. Sooner or later, applications will need to interact with other internal and external applications.
Luckily, Notes/Domino is a powerful platform to access data from other systems and provides wide range of possibilities to interact with different APIs.
This session focuses on how to architect various integration scenarios to implement secure and robust solutions for your Notes/Domino platform.
Whether you use LotusScript or Java, come to this session to see the best practices with real-world use cases."
(25/May/2022)
On-demand recording: https://nginx.webex.com/nginx/lsr.php?RCID=419169e2cde399547cdbcf947fa1b590
NGINX Plus Release 10 (R10) is one of the biggest releases of NGINX Plus in years. NGINX Plus extends open source NGINX with advanced functionality and award-winning support, providing customers with a complete application delivery solution. NGINX Plus R10 features cutting-edge capabilities in security, reverse proxying, and scriptability. The new features in R10 will help you take your NGINX Plus deployments to the next level.
The native JavaScript-like scripting language, nginScript, has been enhanced. You can now use sophisticated policies to manage, shape, and transform application traffic.
In addition, in this webinar with Owen Garrett, Head of Products at NGINX, you will learn about these great new features:
* ModSecurity WAF – The ModSecurity web application firewall (WAF), the Swiss Army® knife of security, has been ported to NGINX Plus. The ModSecurity WAF is now available as an option in our dynamic modules repository.
* JWT support – You can now offload authentication to NGINX Plus using the open JSON Web Tokens (JWT) standard.
* Dual ECC and RSA certificate support – Improve SSL/TLS performance with ECC certificates while maintaining backwards compatibility with RSA standards.
* Transparent proxy support – With IP transparency, backend servers can now "see" the client's IP address, enabling fast, direct server-client communications.
Choosing a right cloud provider to host your mission-critical application on the cloud is a multi-dimensional challenge faced by most of the companies. This presentation provides you information on the various benefits, challenges, and insights while evaluating a cloud provider and helps you quickly make a decision to choose a right cloud partner for your business to host your application.
2. OVERVIEW
● Web services: play nice with others
● Response formats
● Optimization
● Tips
● Android: using the web data
● Increasing the speed of your app
4. WEB SERVICES
?{
● Offloads the data gathering,
transformation and storage to a
powerful server.
● Can do a lot of things in a very
short time
● It’s connected to a large internet
WHY pipe
7. IS THERE A 2ND CHOICE?
Yes!
Where else can you get data from?
8. IS THERE A 2ND CHOICE?
Yes!
Where else can you get data from?
Web pages
9. IS THERE A 2ND CHOICE?
Yes!
Where else can you get data from?
Web pages
That means parsing HTML client side.
10. YEAH, SO?
{
● It takes a lot of bandwidth to download
BIG
a few some web pages
● Mobile devices are usually connected to
high latency networks: cell towers. Not
even wi-fi is as reliable as fiber optic.
PROBLEMS
● You may have to do this a lot of times
just for all the data needed for a single
screen
11. OK…
You can do all that on a web server in less than the
time* for a request from a 3G Galaxy Nexus to
reach the web server.
*that’s if you don’t have the data stored in a DB and
you have to fetch it from one or more sources.
17. REST
● REQUEST: HTTP or other*;
● RESPONSE: XML or JSON; any type of
document you like;
*HTTP is the norm. But you can also
have XML or JSON requests.
18. XML VS JSON
● XML: human readable and compatible
with most platforms;
● JSON: compact and quick to parse;
19. NO DATA ON YOUR SERVER?
● Scrape it;
● Cache it and/or store it;
● Serve the data later from the local cache;
20. SIMPLE PLAN OF A PARSER
● Start point;
● Data gathering points;
● End point ;
● Regular expressions;
23. STRUCTURING DATA
● Try and return only one type of object per
API call
● For every object type use the same
schema everywhere.
● In some cases you can return less data
per object, but where you have more data
return it in the same format
24. STRUCTURING DATA
● If your objects have many-to-many
relationships with other objects remove
redundancies
I.e : use person_id to identify a person and
at the end of the response return all the
unique persons in the current call
26. BUT IF YOU CAN’T…
● Add an API call that tells you if the data
has been changed (timestamp, hash,
integer, etc)
● At least make sure you compress the
response
28. TIPS
● Build an API call that returns images in the request
shape & size;
● Less bandwidth required, less memory used and
less CPU time spent on rendering (no more
stretching/shrinking, positioning and cropping);
29. TIPS
● Never trust the client;
● Do your security and policy checks server side
also;
● Secure every call with a signature: call
parameters, private key, timestamp or unique
call id per session ➔ hashed;
30. ANDROID SIDE OF THINGS
● Parsing JSON: JSONObject or Jackson
● Objects vs Streaming
31. ANDROID SIDE OF THINGS
● Generate objects from the data only if you need
them right then;
● In some cases (loading screens) you may need
to load a lot of data for later use;
● Throw lots of data straight to a SQLite DB using
TRANSACTIONS
32. WHY TRANSACTIONS?
● Not just a concept borrowed from traditional
*SQL databases
● Uses less I/O. A whole lot less I/O.
● Like 100x faster than saving each data line by
line
34. SAVING
● To SQLite Databases: persistent objects with later
use
● To static objects: volatile objects that will only be
used just this session
● To parcelable objects: even more volatile objects
● To SharedPreferences: persistent key-value data or
singleton objects
35. CACHING
● Always cache to the filesystem the images you
download from the web;
● That’s what the ~/cache dir is for;
● Limit your bitmap memory cache and make sure
you also recycle the bitmaps when you clear them
from the cache;
36. PLAYING NICE WITH THE WEB
SERVICE
Detect unique install id: generate a GUID
SharedPreferences prefs =
context.getDefaultSharedPreferences();
String uniqueGUID = prefs.getString("install_guid",
null);
if (uniqueGUID == null) {
! uniqueGUID = UUID.randomUUID().toString()
! prefs.edit().putString("install_guid",
uniqueGUID).commit();
}
37. PLAYING NICE WITH THE WEB
SERVICE
Detect unique device id: use ANDROID_ID
String deviceId =
Settings.Secure.getString(contentResolver,Settings.Se
cure.ANDROID_ID);
38. PLAYING NICE WITH THE WEB
SERVICE
● Send debugging and app identification data in HTTP
header
● App Name/Version
● Device manufacturer/Model/ID
Helps debugging issues remotely and
Allows web admins to control access to their web service