SlideShare a Scribd company logo
1 of 53
Download to read offline
A tech writer,
a map, and
an app
Sarah Maddox
Image: Dragon Feet refixed by Lazur URH on OpenClipArt.org @sarahmaddox #stc17
@sarahmaddox #stc17
What
and why
Maps
Data
Web app
Open
source
Mobile
app
Lessons
@sarahmaddox #stc17
What
and why
Maps
Data
Web app
Open
source
Mobile
app
Lessons
@sarahmaddox #stc17Tech Comm on a Map
@sarahmaddox #stc17Demo: http://sarahmaddox.github.io/techcomm-map/
@sarahmaddox #stc17
Extending the model
Web app and native mobile app
Tech comm and other SIGs
● Footie
● Quilting
● Any other ideas?
https://goo.gl/twfOKO
@sarahmaddox #stc17
Why develop an app?
Understand my audience
Learn the tech
Gain the edge
Create a useful map for the tech comm community
Have fun
Image: Green Dragon by GDJ on OpenClipArt.org
@sarahmaddox #stc17
What
and why
Maps
Data
Web app
Open
source
Mobile
app
Lessons
@sarahmaddox #stc17
Maps are beautiful
The Arctic Ocean Floor (A Map a Day)
River Maps (Geoawesomeness)
Iceland (Mike Lowery, via They Draw and Travel)
@sarahmaddox #stc17Images and data
@sarahmaddox #stc17Data and images
@sarahmaddox #stc17Data and images
@sarahmaddox #stc17Data and images
@sarahmaddox #stc17
Maps
Data
Web app
Open
source
Mobile
app
Lessons
What
and why
@sarahmaddox #stc17
Data source
Collaboration with the tech comm community
Scalability
Development of user interface
Data integrity
Familiarity Google Sheets
Image: Green Dragon by GDJ on OpenClipArt.org
@sarahmaddox #stc17
Apps Script
Lives in the spreadsheet
Insert spreadsheet ID
Insert sheet name
Call from your web page
Details:
var SPREADSHEET_ID = 'MY-SPREADSHEET-ID';
var SHEET_NAME = 'Data';
function doGet(request) {
var callback = request.parameters.jsonp;
var range =
SpreadsheetApp.openById(SPREADSHEET_ID)
.getSheetByName(SHEET_NAME).getDataRange();
var json = callback + '('
+ Utilities.jsonStringify(range.getValues())
+ ')';
return ContentService.createTextOutput(json)
.setMimeType(ContentService.MimeType.JAVASCRIPT);
}https://goo.gl/Riu4yo
@sarahmaddox #stc17
Crowd sourcing the data
Permissions in the spreadsheet (May 2014)
Data moderation
Online form (May 2015)
Android app (February 2016)
100+ contributions since June 2015
Thanks to all contributors!
Image: Green Dragon by GDJ on OpenClipArt.org
@sarahmaddox #stc17https://goo.gl/muBD9q
Input forms - web and Android
https://goo.gl/twfOKO
@sarahmaddox #stc17
Maps
Data
Web app
Open
source
Mobile
app
Lessons
What
and why
@sarahmaddox #stc17
Nuts and bolts
Platform: Web browser
Code: HTML, JavaScript, jQuery, CSS
Map: Google Maps JavaScript API
Search box: Place Autocomplete widget from Google Places API
Code repository: GitHub
Website hosting: GitHub Pages
Data hosting: Google Sheets, Apps Script
@sarahmaddox #stc17
Code is beautiful too
Web page: index.html
JavaScript: techcomm-map.js
CSS: techcomm-map-styles.css
Apps Script: Code.gs
https://github.com/sarahmaddox/techcomm-map
@sarahmaddox #stc17
Code is beautiful too
Web page: index.html
JavaScript: techcomm-map.js
CSS: techcomm-map-styles.css
Apps Script: Code.gs
https://github.com/sarahmaddox/techcomm-map
Image: Green Dragon by GDJ on OpenClipArt.org
@sarahmaddox #stc17
Web page - HTML
Page title
CSS
jQuery library
<!DOCTYPE html>
<html>
<head>
<title>Tech Comm on a Map</title>
<link href="resources/techcomm-map-styles.css"
rel="stylesheet"
type="text/css" />
<script src="https://.../jquery.min.js"></script>
</head>
<body>...</body>
</html>
https://jquery.com/
@sarahmaddox #stc17
Web page - HTML
Create a div for the map
Load my JavaScript
Load the API
Call initializeMap
<body>
<!-- SNIPPED: Input fields for branding, search box
and event types. -->
<!-- Map -->
<div id="map-canvas"></div>
<!-- JavaScript that sets up the map and UI controls -->
<script src="resources/techcomm-map.js"
charset="utf-8"></script>
<!-- Google Maps JavaScript API -->
<script src="https://maps.googleapis.com/maps/api/js
?key=MY-API-KEY
&libraries=places
&callback=initializeMap"
async defer></script>
</body>
@sarahmaddox #stc17
Web page - HTML
Create a div for the map
Load my JavaScript
Load the API
Call initializeMap
<body>
<!-- SNIPPED: Input fields for branding, search box
and event types. -->
<!-- Map -->
<div id="map-canvas"></div>
<!-- JavaScript that sets up the map and UI controls -->
<script src="resources/techcomm-map.js"
charset="utf-8"></script>
<!-- Google Maps JavaScript API -->
<script src="https://maps.googleapis.com/maps/api/js
?key=MY-API-KEY
&libraries=places
&callback=initializeMap"
async defer></script>
</body>
Image: Baby Dragon Concept
by talekids on OpenClipArt.org
@sarahmaddox #stc17
Application Programming Interface (API)
Communication between apps
Data and services
API types
API types: https://goo.gl/tTqyne
API tech writing: https://goo.gl/0dOUuP
<?xml version="1.0"
encoding="utf-8" ?>
<GreyCloudAppResponse>
<status>OK</status>
<result>
<type>greeting</type>
<text>hello back</text>
</result>
</GreyCloudAppResponse>
@sarahmaddox #stc17
Interaction - JavaScript
Set up the map
Use the Map class
provided by the API
var map;
var infoWindow;
function initializeMap() {
// Set up the map.
map = new google.maps.Map(
document.getElementById("map-canvas"), {
center: {lat: -34.397, lng: 150.644},
zoom: 2,
mapTypeControlOptions: {
position: google.maps.ControlPosition.TOP_RIGHT
}
});
// A lot more happens here.
}
@sarahmaddox #stc17
Interaction - JavaScript
Get event data from
spreadsheet
jQuery for brevity
$.ajax({
url: DATA_SERVICE_URL,
dataType: 'jsonp',
success: function(data) {
// Get the spreadsheet rows one by one.
for (var i = 1; i < data.length; i++) {
map.data.add({
properties: {
type: data[i][0],
name: data[i][1],
description: data[i][2]
// SNIPPED rest of data
}
});
}
}
});
https://jquery.com/
https://goo.gl/Riu4yo
@sarahmaddox #stc17
Interaction - JavaScript
Define an info window for
later use
// Define an info window to show event data.
infoWindow = new google.maps.InfoWindow({
pixelOffset: new google.maps.Size(0, -10),
disableAutoPan: true
})
@sarahmaddox #stc17
Interaction - JavaScript
When the user clicks an
event marker,
add event data to the info
window
// Create a popup window containing the tech comm info.
function createInfoWindow(feature) {
infoWindow.setPosition(feature.getGeometry().get());
infoWindow.setContent('No information found');
var content = $('<div id="infowindow"
class="infowindow">');
// Append the bits of event data to the content,
// starting with the event name.
content.append($('<h2>').text(feature.getProperty('name')));
// SNIPPED all the other bits of data.
// Add the content to the info window.
infoWindow.setContent(content.html());
}
@sarahmaddox #stc17
Maps
Data
Web app
Open
source
Mobile
app
Lessons
What
and why
@sarahmaddox #stc17
Development process and information sources
Outline the HTML page
Add a map
Plug in the other bits
Publish first version
Convert to new data layer
Convert to jQuery
Keep on improving
Google Maps JavaScript API docs
jQuery guide
MDN JavaScript programming guide
Stack Overflow (a lot!!!) via web search
Help from developers - open source
@sarahmaddox #stc17
GitHub
Code repository:
● Git, and web-based UI
● Version control
● Open sourcing
Website hosting on GitHub Pages:
● HTML page served from GitHub repo
● Static site hosting
https://github.com/
https://pages.github.com/
@sarahmaddox #stc17
Open sourcing a project
What “open source” means
● Open to updates by public
● Code, docs, ...
● Carefully managed
● Pull requests
Why you’d want to do it
● Harness skill of community
● Help other people give back to community
@sarahmaddox #stc17
Open sourcing a project
How:
● Pick a repo
● Add a licence (choosealicense.com)
● Configure permissions
● Let people know
● Monitor the pull requests
● Check the changes and merge if you want them
● Release
Tech Comm on a Map
6 pull requests from 3
contributors so far
@sarahmaddox #stc17
Check the issue tracker
● Add issues
● Assign an issue to yourself
Make a change
● If simple, edit on GitHub UI
● Else fork the code and hack away at it
Create a pull request
Contributing to Tech Comm on a Map
It’s open source!
https://goo.gl/uFjEXP
Git for Writers
Mysti Berry, tomorrow
@sarahmaddox #stc17
Maps
Data
Web app
Open
source
Mobile
app
Lessons
What
and why
@sarahmaddox #stc17Native app versus web app
Platform technology
All platform features
App store
Web technology
Browser on device
Fewer mobile platform features
@sarahmaddox #stc17
APIs, SDKs, and such, for the Android app
https://github.com/sarahmaddox/techcomm-map-android
Platform: Android SDK, Java
Map: Google Maps Android API
Search box: Google Places API for Android
Location: Google Location Services
Data hosting: Google Sheets, Apps Script
Database: Realm.io
UI element: Android Sliding Up Panel
Validation: Android Saripaar
Code repository: GitHub
@sarahmaddox #stc17
A Java class in Android
Java language
Android SDK
Class
Variable
Callbacks
public class MapsActivity extends AppCompatActivity
implements OnMapReadyCallback,
ConnectionCallbacks,
OnConnectionFailedListener {
protected Location mCurrentLocation;
@Override
public void onConnected(Bundle connectionHint) {
// ...
}
@Override
public void onMapReady(GoogleMap map) {
// ...
}
}
@sarahmaddox #stc17
Connection callback
Implement callback from
Play services SDK
Ask permission to get
location
Get current location from
Fused Location Provider
Prepare the map UI
Ask for a map
@Override
public void onConnected(Bundle connectionHint) {
// SNIPPED: Request location permissions.
if (locationPermissionGranted) {
mCurrentLocation = LocationServices
.FusedLocationApi
.getLastLocation(mGoogleApiClient);
}
SupportMapFragment mapFragment =
(SupportMapFragment) getSupportFragmentManager()
.findFragmentById(R.id.map);
mapFragment.getMapAsync(this);
}
@sarahmaddox #stc17
Map callback
Implement callback from
Google Maps Android API
Move centre of map to
current location
@Override
public void onMapReady(GoogleMap map) {
this.map = map;
if (mCurrentLocation != null) {
map.moveCamera(CameraUpdateFactory
.newLatLngZoom(
new LatLng(mCurrentLocation.getLatitude(),
mCurrentLocation.getLongitude()), 10));
}
else {
map.moveCamera(CameraUpdateFactory
.newLatLngZoom(new LatLng(-34, 150), 10));
}
}
@sarahmaddox #stc17
Information sources
Google Maps Android API docs
Android docs
Stack Overflow (a lot!!!) via web search
Java programming guides
● Head First Java
● https://docs.oracle.com/javase/tutorial/
Help from developers - hackathon
https://goo.gl/twfOKO
@sarahmaddox #stc17
Hackathon
People
Idea
Learn as you go
Thanks to the hackathoneers!
@sarahmaddox #stc17
Hackathon
People
Idea
Learn as you go
Thanks to the hackathoneers!
Image: Green Dragon by GDJ on OpenClipArt.org
@sarahmaddox #stc17
Hackathon tips
Be sure of yourself
Have a clear purpose, and a spec
Provide a plan
Run a brainstorming session
Be ready to change
Provide direction
My original plan
Phase 1
Match capabilities of web app
Phase 2
Add a data entry capability
Phase 3
Safeguard against bad data
@sarahmaddox #stc17
Release the app
Finalise code
Get artwork for icon and screenshots
Publish code on GitHub
Launch app on Google Play
https://developer.android.com/distribute/tools/launch-checklist.html
@sarahmaddox #stc17
Maps
Data
Web app
Open
source
Mobile
app
Lessons
What
and why
@sarahmaddox #stc17
IANAE but Technical confidence
Understanding of audience
Mutual respect of colleagues
Community
@sarahmaddox #stc17
Audience
Various skill levels
Various platforms
Just want to GTD
Code samples rule
JavaScript tutorial
Android tutorial
@sarahmaddox #stc17
Colleagues
Love ideas
Think creatively
Welcome various skill levels
Want to learn
@sarahmaddox #stc17
Tech comm community
Contributors to the data
Connecting with peers
Lots happening in our world!
@sarahmaddox #stc17
Sarah Maddox
Tech writer on the Google Maps APIs
Blog: ffeathers.wordpress.com
Twitter: @sarahmaddox
Tech Comm on a Map
Web app: http://sarahmaddox.github.io/techcomm-map/
Android app: https://goo.gl/twfOKO

More Related Content

What's hot

Do you want a SDK with that API? (Nordic APIS April 2014)
Do you want a SDK with that API? (Nordic APIS April 2014)Do you want a SDK with that API? (Nordic APIS April 2014)
Do you want a SDK with that API? (Nordic APIS April 2014)
Nordic APIs
 
Enter the app era with ruby on rails (rubyday)
Enter the app era with ruby on rails (rubyday)Enter the app era with ruby on rails (rubyday)
Enter the app era with ruby on rails (rubyday)
Matteo Collina
 
OpenSocial Intro
OpenSocial IntroOpenSocial Intro
OpenSocial Intro
Pamela Fox
 
Intro to jQuery - LUGOR - Part 1
Intro to jQuery - LUGOR - Part 1Intro to jQuery - LUGOR - Part 1
Intro to jQuery - LUGOR - Part 1
Ralph Whitbeck
 

What's hot (20)

Google Wave 20/20: Product, Protocol, Platform
Google Wave 20/20: Product, Protocol, PlatformGoogle Wave 20/20: Product, Protocol, Platform
Google Wave 20/20: Product, Protocol, Platform
 
Do you want a SDK with that API? (Nordic APIS April 2014)
Do you want a SDK with that API? (Nordic APIS April 2014)Do you want a SDK with that API? (Nordic APIS April 2014)
Do you want a SDK with that API? (Nordic APIS April 2014)
 
Enter the app era with ruby on rails (rubyday)
Enter the app era with ruby on rails (rubyday)Enter the app era with ruby on rails (rubyday)
Enter the app era with ruby on rails (rubyday)
 
Mashups & APIs
Mashups & APIsMashups & APIs
Mashups & APIs
 
Ionic by Example
Ionic by ExampleIonic by Example
Ionic by Example
 
Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017Front End Development for Back End Developers - vJUG24 2017
Front End Development for Back End Developers - vJUG24 2017
 
GraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learnedGraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learned
 
jQuery For Developers Stack Overflow Dev Days Toronto
jQuery For Developers Stack Overflow Dev Days TorontojQuery For Developers Stack Overflow Dev Days Toronto
jQuery For Developers Stack Overflow Dev Days Toronto
 
The Developer Experience
The Developer Experience The Developer Experience
The Developer Experience
 
GraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learnedGraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learned
 
ForwardJS 2017 - Fullstack end-to-end Test Automation with node.js
ForwardJS 2017 -  Fullstack end-to-end Test Automation with node.jsForwardJS 2017 -  Fullstack end-to-end Test Automation with node.js
ForwardJS 2017 - Fullstack end-to-end Test Automation with node.js
 
Intro to html5 Boilerplate
Intro to html5 BoilerplateIntro to html5 Boilerplate
Intro to html5 Boilerplate
 
The Modern Java Web Developer Bootcamp - Devoxx 2013
The Modern Java Web Developer Bootcamp - Devoxx 2013The Modern Java Web Developer Bootcamp - Devoxx 2013
The Modern Java Web Developer Bootcamp - Devoxx 2013
 
Android JetPack: easy navigation with the new Navigation Controller
Android JetPack: easy navigation with the new Navigation ControllerAndroid JetPack: easy navigation with the new Navigation Controller
Android JetPack: easy navigation with the new Navigation Controller
 
SproutCore is Awesome - HTML5 Summer DevFest
SproutCore is Awesome - HTML5 Summer DevFestSproutCore is Awesome - HTML5 Summer DevFest
SproutCore is Awesome - HTML5 Summer DevFest
 
OpenSocial Intro
OpenSocial IntroOpenSocial Intro
OpenSocial Intro
 
Intro to jQuery
Intro to jQueryIntro to jQuery
Intro to jQuery
 
Vaadin & Web Components
Vaadin & Web ComponentsVaadin & Web Components
Vaadin & Web Components
 
Publishing strategies for API documentation
Publishing strategies for API documentationPublishing strategies for API documentation
Publishing strategies for API documentation
 
Intro to jQuery - LUGOR - Part 1
Intro to jQuery - LUGOR - Part 1Intro to jQuery - LUGOR - Part 1
Intro to jQuery - LUGOR - Part 1
 

Similar to A tech writer, a map, and an app

Android Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NC
Android Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NCAndroid Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NC
Android Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NC
Jim Tochterman
 
Manageable Data Pipelines With Airflow (and kubernetes) - GDG DevFest
Manageable Data Pipelines With Airflow (and kubernetes) - GDG DevFestManageable Data Pipelines With Airflow (and kubernetes) - GDG DevFest
Manageable Data Pipelines With Airflow (and kubernetes) - GDG DevFest
Jarek Potiuk
 

Similar to A tech writer, a map, and an app (20)

Android Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NC
Android Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NCAndroid Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NC
Android Development w/ ArcGIS Server - Esri Dev Meetup - Charlotte, NC
 
Graph Computing with Apache TinkerPop
Graph Computing with Apache TinkerPopGraph Computing with Apache TinkerPop
Graph Computing with Apache TinkerPop
 
@Ionic native/google-maps
@Ionic native/google-maps@Ionic native/google-maps
@Ionic native/google-maps
 
Hack it like its hot!
Hack it like its hot!Hack it like its hot!
Hack it like its hot!
 
How to bake an app in Dart and Polymer
How to bake an app in Dart and PolymerHow to bake an app in Dart and Polymer
How to bake an app in Dart and Polymer
 
3 Approaches to Mobile - An A to Z Primer.
3 Approaches to Mobile - An A to Z Primer.3 Approaches to Mobile - An A to Z Primer.
3 Approaches to Mobile - An A to Z Primer.
 
HTML5 and CartoDB
HTML5 and CartoDBHTML5 and CartoDB
HTML5 and CartoDB
 
Introduction to html5
Introduction to html5Introduction to html5
Introduction to html5
 
State of the Art Web Mapping with Open Source
State of the Art Web Mapping with Open SourceState of the Art Web Mapping with Open Source
State of the Art Web Mapping with Open Source
 
Xamarin + GraphQL
Xamarin + GraphQLXamarin + GraphQL
Xamarin + GraphQL
 
Analyzing the Performance of Mobile Web
Analyzing the Performance of Mobile WebAnalyzing the Performance of Mobile Web
Analyzing the Performance of Mobile Web
 
Intro To Google Maps
Intro To Google MapsIntro To Google Maps
Intro To Google Maps
 
From Idea to App (or “How we roll at Small Town Heroes”)
From Idea to App (or “How we roll at Small Town Heroes”)From Idea to App (or “How we roll at Small Town Heroes”)
From Idea to App (or “How we roll at Small Town Heroes”)
 
AngularJS in large applications - AE NV
AngularJS in large applications - AE NVAngularJS in large applications - AE NV
AngularJS in large applications - AE NV
 
Manageable Data Pipelines With Airflow (and kubernetes) - GDG DevFest
Manageable Data Pipelines With Airflow (and kubernetes) - GDG DevFestManageable Data Pipelines With Airflow (and kubernetes) - GDG DevFest
Manageable Data Pipelines With Airflow (and kubernetes) - GDG DevFest
 
Java Applet and Graphics
Java Applet and GraphicsJava Applet and Graphics
Java Applet and Graphics
 
Java Applet and Graphics
Java Applet and GraphicsJava Applet and Graphics
Java Applet and Graphics
 
React native: building shared components for Android and iOS
React native: building shared components for Android and iOSReact native: building shared components for Android and iOS
React native: building shared components for Android and iOS
 
ESRI Dev Meetup: Building Distributed JavaScript Map Widgets
ESRI Dev Meetup: Building Distributed JavaScript Map WidgetsESRI Dev Meetup: Building Distributed JavaScript Map Widgets
ESRI Dev Meetup: Building Distributed JavaScript Map Widgets
 
What Web Developers Need to Know to Develop Windows 8 Apps
What Web Developers Need to Know to Develop Windows 8 AppsWhat Web Developers Need to Know to Develop Windows 8 Apps
What Web Developers Need to Know to Develop Windows 8 Apps
 

More from Sarah Maddox

Tekom tcworld 2012 - Engaging readers via social media
Tekom tcworld 2012 - Engaging readers via social mediaTekom tcworld 2012 - Engaging readers via social media
Tekom tcworld 2012 - Engaging readers via social media
Sarah Maddox
 

More from Sarah Maddox (16)

Sprinting for success - the story of an open source doc sprint
Sprinting for success - the story of an open source doc sprintSprinting for success - the story of an open source doc sprint
Sprinting for success - the story of an open source doc sprint
 
One word or two
One word or twoOne word or two
One word or two
 
The future *is* technical communication
The future *is* technical communicationThe future *is* technical communication
The future *is* technical communication
 
Working with an Engineering Team
Working with an Engineering TeamWorking with an Engineering Team
Working with an Engineering Team
 
Bit Rot in the Docs
Bit Rot in the DocsBit Rot in the Docs
Bit Rot in the Docs
 
API Technical Writing
API Technical WritingAPI Technical Writing
API Technical Writing
 
Api types
Api typesApi types
Api types
 
Doc sprints: The ultimate in collaborative document development
Doc sprints: The ultimate in collaborative document developmentDoc sprints: The ultimate in collaborative document development
Doc sprints: The ultimate in collaborative document development
 
Atlassian User Group, AUG Wiesbaden, 25 October 2012
Atlassian User Group, AUG Wiesbaden, 25 October 2012Atlassian User Group, AUG Wiesbaden, 25 October 2012
Atlassian User Group, AUG Wiesbaden, 25 October 2012
 
Tekom tcworld 2012 - Engaging readers via social media
Tekom tcworld 2012 - Engaging readers via social mediaTekom tcworld 2012 - Engaging readers via social media
Tekom tcworld 2012 - Engaging readers via social media
 
Building a developer documentation wiki
Building a developer documentation wikiBuilding a developer documentation wiki
Building a developer documentation wiki
 
Writing a book on a wiki: Does that even work?
Writing a book on a wiki: Does that even work?Writing a book on a wiki: Does that even work?
Writing a book on a wiki: Does that even work?
 
Collaboration: A hands-on demo using Confluence wiki
Collaboration: A hands-on demo using Confluence wikiCollaboration: A hands-on demo using Confluence wiki
Collaboration: A hands-on demo using Confluence wiki
 
Confluence as platform for technical documentation
Confluence as platform for technical documentationConfluence as platform for technical documentation
Confluence as platform for technical documentation
 
Summit2012 proposal-sarah maddox
Summit2012 proposal-sarah maddoxSummit2012 proposal-sarah maddox
Summit2012 proposal-sarah maddox
 
A little bird told me... about a good page in your user guide
A little bird told me... about a good page in your user guideA little bird told me... about a good page in your user guide
A little bird told me... about a good page in your user guide
 

Recently uploaded

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Recently uploaded (20)

TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software Engineering
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
API Governance and Monetization - The evolution of API governance
API Governance and Monetization -  The evolution of API governanceAPI Governance and Monetization -  The evolution of API governance
API Governance and Monetization - The evolution of API governance
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation Computing
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 

A tech writer, a map, and an app

  • 1. A tech writer, a map, and an app Sarah Maddox Image: Dragon Feet refixed by Lazur URH on OpenClipArt.org @sarahmaddox #stc17
  • 2. @sarahmaddox #stc17 What and why Maps Data Web app Open source Mobile app Lessons
  • 3. @sarahmaddox #stc17 What and why Maps Data Web app Open source Mobile app Lessons
  • 6. @sarahmaddox #stc17 Extending the model Web app and native mobile app Tech comm and other SIGs ● Footie ● Quilting ● Any other ideas? https://goo.gl/twfOKO
  • 7. @sarahmaddox #stc17 Why develop an app? Understand my audience Learn the tech Gain the edge Create a useful map for the tech comm community Have fun Image: Green Dragon by GDJ on OpenClipArt.org
  • 8. @sarahmaddox #stc17 What and why Maps Data Web app Open source Mobile app Lessons
  • 9. @sarahmaddox #stc17 Maps are beautiful The Arctic Ocean Floor (A Map a Day) River Maps (Geoawesomeness) Iceland (Mike Lowery, via They Draw and Travel)
  • 15. @sarahmaddox #stc17 Data source Collaboration with the tech comm community Scalability Development of user interface Data integrity Familiarity Google Sheets Image: Green Dragon by GDJ on OpenClipArt.org
  • 16. @sarahmaddox #stc17 Apps Script Lives in the spreadsheet Insert spreadsheet ID Insert sheet name Call from your web page Details: var SPREADSHEET_ID = 'MY-SPREADSHEET-ID'; var SHEET_NAME = 'Data'; function doGet(request) { var callback = request.parameters.jsonp; var range = SpreadsheetApp.openById(SPREADSHEET_ID) .getSheetByName(SHEET_NAME).getDataRange(); var json = callback + '(' + Utilities.jsonStringify(range.getValues()) + ')'; return ContentService.createTextOutput(json) .setMimeType(ContentService.MimeType.JAVASCRIPT); }https://goo.gl/Riu4yo
  • 17. @sarahmaddox #stc17 Crowd sourcing the data Permissions in the spreadsheet (May 2014) Data moderation Online form (May 2015) Android app (February 2016) 100+ contributions since June 2015 Thanks to all contributors! Image: Green Dragon by GDJ on OpenClipArt.org
  • 18. @sarahmaddox #stc17https://goo.gl/muBD9q Input forms - web and Android https://goo.gl/twfOKO
  • 20. @sarahmaddox #stc17 Nuts and bolts Platform: Web browser Code: HTML, JavaScript, jQuery, CSS Map: Google Maps JavaScript API Search box: Place Autocomplete widget from Google Places API Code repository: GitHub Website hosting: GitHub Pages Data hosting: Google Sheets, Apps Script
  • 21. @sarahmaddox #stc17 Code is beautiful too Web page: index.html JavaScript: techcomm-map.js CSS: techcomm-map-styles.css Apps Script: Code.gs https://github.com/sarahmaddox/techcomm-map
  • 22. @sarahmaddox #stc17 Code is beautiful too Web page: index.html JavaScript: techcomm-map.js CSS: techcomm-map-styles.css Apps Script: Code.gs https://github.com/sarahmaddox/techcomm-map Image: Green Dragon by GDJ on OpenClipArt.org
  • 23. @sarahmaddox #stc17 Web page - HTML Page title CSS jQuery library <!DOCTYPE html> <html> <head> <title>Tech Comm on a Map</title> <link href="resources/techcomm-map-styles.css" rel="stylesheet" type="text/css" /> <script src="https://.../jquery.min.js"></script> </head> <body>...</body> </html> https://jquery.com/
  • 24. @sarahmaddox #stc17 Web page - HTML Create a div for the map Load my JavaScript Load the API Call initializeMap <body> <!-- SNIPPED: Input fields for branding, search box and event types. --> <!-- Map --> <div id="map-canvas"></div> <!-- JavaScript that sets up the map and UI controls --> <script src="resources/techcomm-map.js" charset="utf-8"></script> <!-- Google Maps JavaScript API --> <script src="https://maps.googleapis.com/maps/api/js ?key=MY-API-KEY &libraries=places &callback=initializeMap" async defer></script> </body>
  • 25. @sarahmaddox #stc17 Web page - HTML Create a div for the map Load my JavaScript Load the API Call initializeMap <body> <!-- SNIPPED: Input fields for branding, search box and event types. --> <!-- Map --> <div id="map-canvas"></div> <!-- JavaScript that sets up the map and UI controls --> <script src="resources/techcomm-map.js" charset="utf-8"></script> <!-- Google Maps JavaScript API --> <script src="https://maps.googleapis.com/maps/api/js ?key=MY-API-KEY &libraries=places &callback=initializeMap" async defer></script> </body> Image: Baby Dragon Concept by talekids on OpenClipArt.org
  • 26. @sarahmaddox #stc17 Application Programming Interface (API) Communication between apps Data and services API types API types: https://goo.gl/tTqyne API tech writing: https://goo.gl/0dOUuP <?xml version="1.0" encoding="utf-8" ?> <GreyCloudAppResponse> <status>OK</status> <result> <type>greeting</type> <text>hello back</text> </result> </GreyCloudAppResponse>
  • 27. @sarahmaddox #stc17 Interaction - JavaScript Set up the map Use the Map class provided by the API var map; var infoWindow; function initializeMap() { // Set up the map. map = new google.maps.Map( document.getElementById("map-canvas"), { center: {lat: -34.397, lng: 150.644}, zoom: 2, mapTypeControlOptions: { position: google.maps.ControlPosition.TOP_RIGHT } }); // A lot more happens here. }
  • 28. @sarahmaddox #stc17 Interaction - JavaScript Get event data from spreadsheet jQuery for brevity $.ajax({ url: DATA_SERVICE_URL, dataType: 'jsonp', success: function(data) { // Get the spreadsheet rows one by one. for (var i = 1; i < data.length; i++) { map.data.add({ properties: { type: data[i][0], name: data[i][1], description: data[i][2] // SNIPPED rest of data } }); } } }); https://jquery.com/ https://goo.gl/Riu4yo
  • 29. @sarahmaddox #stc17 Interaction - JavaScript Define an info window for later use // Define an info window to show event data. infoWindow = new google.maps.InfoWindow({ pixelOffset: new google.maps.Size(0, -10), disableAutoPan: true })
  • 30. @sarahmaddox #stc17 Interaction - JavaScript When the user clicks an event marker, add event data to the info window // Create a popup window containing the tech comm info. function createInfoWindow(feature) { infoWindow.setPosition(feature.getGeometry().get()); infoWindow.setContent('No information found'); var content = $('<div id="infowindow" class="infowindow">'); // Append the bits of event data to the content, // starting with the event name. content.append($('<h2>').text(feature.getProperty('name'))); // SNIPPED all the other bits of data. // Add the content to the info window. infoWindow.setContent(content.html()); }
  • 32. @sarahmaddox #stc17 Development process and information sources Outline the HTML page Add a map Plug in the other bits Publish first version Convert to new data layer Convert to jQuery Keep on improving Google Maps JavaScript API docs jQuery guide MDN JavaScript programming guide Stack Overflow (a lot!!!) via web search Help from developers - open source
  • 33. @sarahmaddox #stc17 GitHub Code repository: ● Git, and web-based UI ● Version control ● Open sourcing Website hosting on GitHub Pages: ● HTML page served from GitHub repo ● Static site hosting https://github.com/ https://pages.github.com/
  • 34. @sarahmaddox #stc17 Open sourcing a project What “open source” means ● Open to updates by public ● Code, docs, ... ● Carefully managed ● Pull requests Why you’d want to do it ● Harness skill of community ● Help other people give back to community
  • 35. @sarahmaddox #stc17 Open sourcing a project How: ● Pick a repo ● Add a licence (choosealicense.com) ● Configure permissions ● Let people know ● Monitor the pull requests ● Check the changes and merge if you want them ● Release Tech Comm on a Map 6 pull requests from 3 contributors so far
  • 36. @sarahmaddox #stc17 Check the issue tracker ● Add issues ● Assign an issue to yourself Make a change ● If simple, edit on GitHub UI ● Else fork the code and hack away at it Create a pull request Contributing to Tech Comm on a Map It’s open source! https://goo.gl/uFjEXP Git for Writers Mysti Berry, tomorrow
  • 38. @sarahmaddox #stc17Native app versus web app Platform technology All platform features App store Web technology Browser on device Fewer mobile platform features
  • 39. @sarahmaddox #stc17 APIs, SDKs, and such, for the Android app https://github.com/sarahmaddox/techcomm-map-android Platform: Android SDK, Java Map: Google Maps Android API Search box: Google Places API for Android Location: Google Location Services Data hosting: Google Sheets, Apps Script Database: Realm.io UI element: Android Sliding Up Panel Validation: Android Saripaar Code repository: GitHub
  • 40. @sarahmaddox #stc17 A Java class in Android Java language Android SDK Class Variable Callbacks public class MapsActivity extends AppCompatActivity implements OnMapReadyCallback, ConnectionCallbacks, OnConnectionFailedListener { protected Location mCurrentLocation; @Override public void onConnected(Bundle connectionHint) { // ... } @Override public void onMapReady(GoogleMap map) { // ... } }
  • 41. @sarahmaddox #stc17 Connection callback Implement callback from Play services SDK Ask permission to get location Get current location from Fused Location Provider Prepare the map UI Ask for a map @Override public void onConnected(Bundle connectionHint) { // SNIPPED: Request location permissions. if (locationPermissionGranted) { mCurrentLocation = LocationServices .FusedLocationApi .getLastLocation(mGoogleApiClient); } SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager() .findFragmentById(R.id.map); mapFragment.getMapAsync(this); }
  • 42. @sarahmaddox #stc17 Map callback Implement callback from Google Maps Android API Move centre of map to current location @Override public void onMapReady(GoogleMap map) { this.map = map; if (mCurrentLocation != null) { map.moveCamera(CameraUpdateFactory .newLatLngZoom( new LatLng(mCurrentLocation.getLatitude(), mCurrentLocation.getLongitude()), 10)); } else { map.moveCamera(CameraUpdateFactory .newLatLngZoom(new LatLng(-34, 150), 10)); } }
  • 43. @sarahmaddox #stc17 Information sources Google Maps Android API docs Android docs Stack Overflow (a lot!!!) via web search Java programming guides ● Head First Java ● https://docs.oracle.com/javase/tutorial/ Help from developers - hackathon https://goo.gl/twfOKO
  • 44. @sarahmaddox #stc17 Hackathon People Idea Learn as you go Thanks to the hackathoneers!
  • 45. @sarahmaddox #stc17 Hackathon People Idea Learn as you go Thanks to the hackathoneers! Image: Green Dragon by GDJ on OpenClipArt.org
  • 46. @sarahmaddox #stc17 Hackathon tips Be sure of yourself Have a clear purpose, and a spec Provide a plan Run a brainstorming session Be ready to change Provide direction My original plan Phase 1 Match capabilities of web app Phase 2 Add a data entry capability Phase 3 Safeguard against bad data
  • 47. @sarahmaddox #stc17 Release the app Finalise code Get artwork for icon and screenshots Publish code on GitHub Launch app on Google Play https://developer.android.com/distribute/tools/launch-checklist.html
  • 49. @sarahmaddox #stc17 IANAE but Technical confidence Understanding of audience Mutual respect of colleagues Community
  • 50. @sarahmaddox #stc17 Audience Various skill levels Various platforms Just want to GTD Code samples rule JavaScript tutorial Android tutorial
  • 51. @sarahmaddox #stc17 Colleagues Love ideas Think creatively Welcome various skill levels Want to learn
  • 52. @sarahmaddox #stc17 Tech comm community Contributors to the data Connecting with peers Lots happening in our world!
  • 53. @sarahmaddox #stc17 Sarah Maddox Tech writer on the Google Maps APIs Blog: ffeathers.wordpress.com Twitter: @sarahmaddox Tech Comm on a Map Web app: http://sarahmaddox.github.io/techcomm-map/ Android app: https://goo.gl/twfOKO