SlideShare une entreprise Scribd logo
1  sur  23
Building a GeoChat mobile app  and the birth of a web framework Aaron Murray & Eric Schoffstall @WeAreFractal
What are we building? Chattr is a mobile chat app that lets you open up a chatroom based on your geographic location What are our technical requirements? Node.js  Websockets Native Mobile App for iOS, Android Coffescript friendly
What do we need? Native Mobile Bridge Titanium, Phonegap Mobile Web Framework  JQuery Mobile, Titanium, Sencha Touch, Dojo Mobile, Zepto.js Communication Socket.io, Now.js Database MongoDB, CouchDB, Redis ORM  Mongoose Application Framework Express, SocketStream
Native Mobile Bridge Titanium Mobile (http://www.appcelerator.com/products/) Compile JS + HTML + CSS + Titanium APIs to native code Native UI Use your web skills to build
Native Mobile Bridge Titanium Mobile (http://www.appcelerator.com/products/)
Native Mobile Bridge http://www.phonegap.com/ ACTUALLY native web technologies  Wrapped in a webkit renderer Bridged to iOS and android  Have to run vanilla eclipse (not aptana) Android emulator is absurd – debug on your phone
JQuery + Now.js PoChttps://github.com/wearefractal/Chattr-JQuery-PoC
JQuery + Now.js PoChttps://github.com/wearefractal/Chattr-JQuery-PoC varfs= require('fs'); var server = require('http').createServer(function(req, response){   fs.readFile(__dirname+'/chattr.html', function(err, data){     response.writeHead(200, {'Content-Type':'text/html'});      response.write(data);      response.end();   }); }); server.listen(8080); varnowjs= require("now"); var everyone =nowjs.initialize(server); everyone.on("connect", function(){   console.log("Joined: " +this.now.name); }); everyone.on("disconnect", function(){   console.log("Left: " +this.now.name); }); everyone.now.distributeMessage=function(message){   everyone.now.receiveMessage(this.now.name, message); };
JQuery + Now.js PoChttps://github.com/wearefractal/Chattr-JQuery-PoC Pros ,[object Object]
  Looks good Cons ,[object Object]
  Beta = alpha
  Orientation on device rotate etc
 Just not quite there,[object Object]
JQuery-compatible syntax
Decent skin OOTB Cons ,[object Object],[object Object]
  Good lookingCons ,[object Object]
  Licensing ,[object Object]
  Has baked-in grouping(pub-sub)Cons ,[object Object]
  Almost 2k LoC – WTF??We went with http://socket.io/
Database http://www.mongodb.org/ ,[object Object]
 Dynamic Schemas, Auto-sharding, Map-reduce, Geo support
 Best for storing structured data
 Best drop-in replacement for MySQL or similar imo

Contenu connexe

Plus de wearefractal

nodester Architecture overview & roadmap
nodester Architecture overview & roadmapnodester Architecture overview & roadmap
nodester Architecture overview & roadmapwearefractal
 
Jade & Javascript templating
Jade & Javascript templatingJade & Javascript templating
Jade & Javascript templatingwearefractal
 
Fusker - A NodeJS Security Framework
Fusker - A NodeJS Security FrameworkFusker - A NodeJS Security Framework
Fusker - A NodeJS Security Frameworkwearefractal
 

Plus de wearefractal (7)

Bdd spex
Bdd spexBdd spex
Bdd spex
 
Novajs
NovajsNovajs
Novajs
 
nodester Architecture overview & roadmap
nodester Architecture overview & roadmapnodester Architecture overview & roadmap
nodester Architecture overview & roadmap
 
Spine.js
Spine.jsSpine.js
Spine.js
 
Jade & Javascript templating
Jade & Javascript templatingJade & Javascript templating
Jade & Javascript templating
 
ChanJS
ChanJSChanJS
ChanJS
 
Fusker - A NodeJS Security Framework
Fusker - A NodeJS Security FrameworkFusker - A NodeJS Security Framework
Fusker - A NodeJS Security Framework
 

Dernier

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 

Dernier (20)

Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 

Geo chat

  • 1. Building a GeoChat mobile app and the birth of a web framework Aaron Murray & Eric Schoffstall @WeAreFractal
  • 2. What are we building? Chattr is a mobile chat app that lets you open up a chatroom based on your geographic location What are our technical requirements? Node.js Websockets Native Mobile App for iOS, Android Coffescript friendly
  • 3. What do we need? Native Mobile Bridge Titanium, Phonegap Mobile Web Framework JQuery Mobile, Titanium, Sencha Touch, Dojo Mobile, Zepto.js Communication Socket.io, Now.js Database MongoDB, CouchDB, Redis ORM Mongoose Application Framework Express, SocketStream
  • 4. Native Mobile Bridge Titanium Mobile (http://www.appcelerator.com/products/) Compile JS + HTML + CSS + Titanium APIs to native code Native UI Use your web skills to build
  • 5. Native Mobile Bridge Titanium Mobile (http://www.appcelerator.com/products/)
  • 6. Native Mobile Bridge http://www.phonegap.com/ ACTUALLY native web technologies Wrapped in a webkit renderer Bridged to iOS and android Have to run vanilla eclipse (not aptana) Android emulator is absurd – debug on your phone
  • 7. JQuery + Now.js PoChttps://github.com/wearefractal/Chattr-JQuery-PoC
  • 8. JQuery + Now.js PoChttps://github.com/wearefractal/Chattr-JQuery-PoC varfs= require('fs'); var server = require('http').createServer(function(req, response){   fs.readFile(__dirname+'/chattr.html', function(err, data){     response.writeHead(200, {'Content-Type':'text/html'});     response.write(data);     response.end();   }); }); server.listen(8080); varnowjs= require("now"); var everyone =nowjs.initialize(server); everyone.on("connect", function(){   console.log("Joined: " +this.now.name); }); everyone.on("disconnect", function(){   console.log("Left: " +this.now.name); }); everyone.now.distributeMessage=function(message){   everyone.now.receiveMessage(this.now.name, message); };
  • 9.
  • 10.
  • 11. Beta = alpha
  • 12. Orientation on device rotate etc
  • 13.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19. Almost 2k LoC – WTF??We went with http://socket.io/
  • 20.
  • 21. Dynamic Schemas, Auto-sharding, Map-reduce, Geo support
  • 22. Best for storing structured data
  • 23. Best drop-in replacement for MySQL or similar imo
  • 24.
  • 25.
  • 26.
  • 27. 3rd party modules
  • 28. Projects built on it
  • 29.
  • 30. Focus on routing, view rendering, etc do not need
  • 31.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37. o. = jquery-like convienence lib for both client and server
  • 38. single entry-point for incoming data, all data is sanitized before it’s accesed by services
  • 39. only models are passed from client to server, no loose vars
  • 41. obfuscationModelRequest {   module: 'Chat',   model: 'Chatroom',   type: 'find',   query: {   },   mid: 'SessionID'}
  • 42.
  • 43. Orchid web framework
  • 44.