Ruby-Fu! http://www.flickr.com/photos/jackbrodus/258077303
Why Ruby On Rails?
http://www.flickr.com/photos/pagedooley/2511369048
Cloud-Friendly Open Source Ruby on Rails Fee, Turner and Mac. http://www.flickr.com/photos/wwarby/2989238425/
(Cheezburger)
(Rails Hipster) (Cheezburger)
Not Ruby 101…
just a quick history…
why’s (poignant) guide to ruby
“matz” (not-“matz”) http://mauthesis.com/me_and_matz1.jpg
The “dhh” http://www.flickr.com/photos/jackbrodus/258077303
convention over configuration
mad unit testing scaffolding db migrations tons of libraries
Rails Apps Now! http://www.flickr.com/photos/thedalogs/3302704209
Research Project Parcel Information App Search for Parcel Parcel Detail with Map Use ArcGIS Online
http://agsruby.heroku.com
Baking the Cake http://www.flickr.com/photos/veganfeast/3845912356
Tooling http://www.flickr.com/photos/denisecarbonell/3923601326
http://www.flickr.com/photos/ckelly/2693315769
TextMate on Mac http://www.flickr.com/photos/m_uhlig/3556705107
RadRails on Windows
Fiddler
SoapUI
Ingredients http://www.flickr.com/photos/vmiramontes/4073518788
ArcServer.rb
ArcServer.rb
gem install httparty gem install handsoap gem install shoulda gem install mocha gem install httpclient gem install json gem install test-unit gem install nokogiri
Implemented Not Implemented SOAP & REST API’s
REST SOAP ExportMap Get Default Map Name Get Legend Info
Cucumber http://www.flickr.com/photos/derekgavey/4245269567
Gherkin
Gherkinz
Enuf! Show meh teh codez nao! http://www.flickr.com/photos/kwl/4116389731
App Post to Search (Ajax request) REST API Query Resutls.rjs
Controllers Views Home Home Request Routing Response Results Parcel Detail lib
require 'arcserver' require 'json class HomeController < ApplicationController #Show the index page def index end #Show the about page def about end def search @searchType = params[:search_type] @searchCriteria = params[:search_criteria].upcase #calls to arcserver.rb to collect data and return to view end end
require 'arcserver' require 'json' class ParcelController < ApplicationController def index @taxid = params[:id] #calls to arcserver.rb to collect data and return to view end end
REST (kitteh) API http://www.flickr.com/photos/pagedooley/4310765089
REST Query def query(layerId, opts = {}) query ={ :f => opts[:f] || :json, :where => opts[:where], :returnGeometry => opts[:returnGeometry], :outFields => opts[:outFields]} HTTParty.get("#{url}/#{layerId}/query", :query => query) end
def search @searchType = params[:search_type] @searchCriteria = params[:search_criteria].upcase service = ArcServer::MapServer.new('http://sampleserver1.arcgisonline @jsonString = service.query(1, {:where=>"#{@searchType} like '%#{@searchCriteria}%'", :outFields=>'TLID, OWNER1,OWNER2,OWNER3,SITEADDR' }) @json = JSON.parse(@jsonString) @results = @json['features'] if @results.nil? || @results.length == 0 flash[:notice] = 'No results found for search ' + @searchCriteria + ' Please try another search.' end respond_to do |format| format.js #  Search.js.rjs  _results.html.erb end Usage end
http://www.flickr.com/photos/soundfromwayout/143822346
Accessing the SOAP API http://www.flickr.com/photos/fdecomite/2867929299
Ruby Hates SOAP. It’s a Fact. http://www.flickr.com/photos/ennuidesign/3023015424
soap4r WSDL savon handsoap ~ XML http://www.flickr.com/photos/fdecomite/2867929299
Documentation Assumes Proxy
SoapUI!
Strip it down…
XML Ruby
Argggh! How Can I debug this!!
Unit Tests C:hacking> ruby map_server_soap_test.rb
Edit Request Compare w/ Good Run test Req Copy View request error to SoapUI
Data
Nested Hashes
Nested Hashes
Deployment
#add changes git add . #commit git commit -m "the message" #push to heroku git push heroku master #crack beer.
src: http://github.com/dbouwman/agsruby demo app: http://agsruby.heroku.com contact: dave@davebouwman.com
Conclusions:
I’s a n00b at teh rubees!!!!
Rails + REST API = ‘OK’
Rails + SOAP API = ‘uggh’ http://www.flickr.com/photos/fdecomite/2867929299
Ruby & Rails vs. .NET?
Waaaaaaaaaay better than webforms
Slightly less work than MVC
Never underestimate the power of a good proxy!
Questions? http://www.flickr.com/photos/seannaber/4044012656
Using ArcGIS Server with Ruby on Rails
Using ArcGIS Server with Ruby on Rails
Using ArcGIS Server with Ruby on Rails
Using ArcGIS Server with Ruby on Rails
Using ArcGIS Server with Ruby on Rails
Using ArcGIS Server with Ruby on Rails
Using ArcGIS Server with Ruby on Rails
Using ArcGIS Server with Ruby on Rails
Using ArcGIS Server with Ruby on Rails
Using ArcGIS Server with Ruby on Rails
Using ArcGIS Server with Ruby on Rails
Using ArcGIS Server with Ruby on Rails
Using ArcGIS Server with Ruby on Rails
Using ArcGIS Server with Ruby on Rails
Using ArcGIS Server with Ruby on Rails
Using ArcGIS Server with Ruby on Rails

Using ArcGIS Server with Ruby on Rails