CodingSinatra (Ruby web DSL)

 

Press Ctrl+Enter to quickly submit your post
Quick Reply  
 
 
  
 From:  THERE IS NO GOD BUT (RENDLE)  
 To:  ALL
36517.1 
Been having a proper play with this over the last couple of days. It's really incredibly easy to get a web service up and running in a tiny amount of code, and it works very nicely in AppEngine.

For example, a request to get things which required 40-odd lines of Python with the webapp framework, has been rewritten in Ruby/Sinatra as:

ruby code:
get '/things.json' do
  uid = User.authenticate()
  Thing.all(:user_id => uid).map{|t| t.attributes}.to_json
end


Nice.

Happy now?

0/0
 Reply   Quote More 

Reply to All    
 

1

Rate my interest:

Adjust text size : Smaller 10 Larger

Beehive Forum 1.5.2 |  FAQ |  Docs |  Support |  Donate! ©2002 - 2024 Project Beehive Forum

Forum Stats