SlideShare une entreprise Scribd logo
1  sur  86
Télécharger pour lire hors ligne
hi
Expanding
Our Vision With

MERB
Advanced

MERB
Advanced

MERB
Adventurous

MERB
INTRODUCTION
Matt Todd
mtodd
 http://github.com/mtodd/


     Halcyon
  Highgroove
    Studios
Developer & OSS Architect
  http://highgroove.com
SWEET
NECTAR
OF THE
GODS
EXPECTATIONS
I AM NOT
AN EXPERT
WARNING
 code for:
PROBLEMS
& examples
lack of
imagination
The
Foreground
“forefront, prominent
or important position”
meh
not as interesting
as the background
:o
The
Background
DBs
Caches
Background Processes
Web Services
Embedded Components
Distributed Grid/Mesh Apps
AJAX
Rack
DBs x
Caches x
Background Processes √
Web Services √
Embedded Components √
Distributed Grid/Mesh Apps √
AJAX x
Rack √
Background
 Processes
rake tasks
namespace(:nodes) do

desc quot;Purge inactive nodes.quot;
task :purge => [:merb_env] do
 Node.inactive.purge
end

desc quot;Scan for nodesquot;
task :scan => [:merb_env] do
 Node.detach_and_scan(Node.first)
end

end
render_then_call
run_later
render_then_call do
 Node.inactive.purge
end

### OR

run_later do
 Node.scan(Node.first)
end
render
we’ll talk later
Web
Services
“software system designed
  to support interoperable
    machine-to-machine
interaction over a network”
a service
over the web
just for apps
JSON is
REALLY
Awesome
JSON is
FUCKING
Awesome
{“foo”:“bar”}
RESTful
GET      /objects.json     index
PUT      /objects.json     create
GET      /objects/1.json   show
DELETE   /objects/1.json   delete
POST     /objects/1.json   update
Merb’s Way
provides
render
display
provides
class Posts < Application
1.    provides :json
      def show
       @post = Post.get(params[:id])
       display @post
      end
     end
NO BITCH!


  GIMME XML!
GET /posts/1.xml
406 Not Acceptable
display
class Posts < Application
1.    provides :json
      def show
       @post = Post.get(params[:id])
2.     display @post
      end
     end
respond_to do |format|
 format.html { render }
 format.json { @post.to_json }
end
                                 Rails
                                  vs
case content_type                Merb
when :html
 render
when :json
 display @post
end
even better:
renders XML, JSON, and HTML
  provides :json, :xml
  @post = Post.get(params[:id])
  display @post

 AUTOMATICALLY
                             fuck yeah!
Embedded
Components
<script type=“text/javascript”
src=“/comments.js”></script>
document.write(
 ‘<div id=“comments”></div>’
);

$(function(){
 <% @comments.each do |c|
  c = $(“<p><%=c.body%></p>”);
  c.attr(‘id’,“comment-<%=c.id%>”);
  c.appendTo(‘#comments’);
 <% end %>
});
github.com/
mtodd/aceldama
glorified JS
  & AJAX
Distributed
Grid/Mesh
   Apps
Centralized
        S

S                S
        M


    S        S
Distributed
        N

N               N


    N       N
{
S

M
    slave
    master
N   node
Foreground


                       `

                            /sites


N
[{id:1,                      [{id:1,
url:“http://github.com/”,    rating:1,
created_at:...},...]         created_at:...},...]
/sites.json                  /sites/n/reports.json

                                          Background
github.com/
mtodd/conley
Rack
AWESOME
Framework’s
 Framework
Request     Merb

          Middleware

            Rack

                       Response
           Mongrel
mongrel
thin
ebb
webrick
etc
class YourApp
 def call(env)
  [
    200,
    {‘Content-Type’=>‘text/plain’},
    “OK”
  ]
 end
end
Middleware
mini apps
modifies env
avoid passing
through
class RackMiddlewareExample
 def initialize(app)
  @app = app
 end
 def call(env)
  # voodoo
  @app.call(env)
 end
end
gist.github.com/
  16369
Fin.
HAHA

Contenu connexe

Tendances

Keeping it Small: Getting to know the Slim Micro Framework
Keeping it Small: Getting to know the Slim Micro FrameworkKeeping it Small: Getting to know the Slim Micro Framework
Keeping it Small: Getting to know the Slim Micro Framework
Jeremy Kendall
 
Psgi Plack Sfpm
Psgi Plack SfpmPsgi Plack Sfpm
Psgi Plack Sfpm
som_nangia
 

Tendances (20)

Rails::Engine
Rails::EngineRails::Engine
Rails::Engine
 
Introduction To Lamp
Introduction To LampIntroduction To Lamp
Introduction To Lamp
 
Cocoa on-rails-3rd
Cocoa on-rails-3rdCocoa on-rails-3rd
Cocoa on-rails-3rd
 
Workshop 6: Designer tools
Workshop 6: Designer toolsWorkshop 6: Designer tools
Workshop 6: Designer tools
 
RESTful web services
RESTful web servicesRESTful web services
RESTful web services
 
Keeping it Small: Getting to know the Slim Micro Framework
Keeping it Small: Getting to know the Slim Micro FrameworkKeeping it Small: Getting to know the Slim Micro Framework
Keeping it Small: Getting to know the Slim Micro Framework
 
Creating REST Applications with the Slim Micro-Framework by Vikram Vaswani
Creating REST Applications with the Slim Micro-Framework by Vikram VaswaniCreating REST Applications with the Slim Micro-Framework by Vikram Vaswani
Creating REST Applications with the Slim Micro-Framework by Vikram Vaswani
 
Webinar: AngularJS and the WordPress REST API
Webinar: AngularJS and the WordPress REST APIWebinar: AngularJS and the WordPress REST API
Webinar: AngularJS and the WordPress REST API
 
Symfony bundle fo asynchronous job processing
Symfony bundle fo asynchronous job processingSymfony bundle fo asynchronous job processing
Symfony bundle fo asynchronous job processing
 
Inside Bokete: Web Application with Mojolicious and others
Inside Bokete:  Web Application with Mojolicious and othersInside Bokete:  Web Application with Mojolicious and others
Inside Bokete: Web Application with Mojolicious and others
 
Using the new WordPress REST API
Using the new WordPress REST APIUsing the new WordPress REST API
Using the new WordPress REST API
 
Developing apps using Perl
Developing apps using PerlDeveloping apps using Perl
Developing apps using Perl
 
Silex, the microframework
Silex, the microframeworkSilex, the microframework
Silex, the microframework
 
Workshop 4: NodeJS. Express Framework & MongoDB.
Workshop 4: NodeJS. Express Framework & MongoDB.Workshop 4: NodeJS. Express Framework & MongoDB.
Workshop 4: NodeJS. Express Framework & MongoDB.
 
Merb
MerbMerb
Merb
 
Strangers In The Night: Ruby, Rack y Sinatra - Herramientas potentes para con...
Strangers In The Night: Ruby, Rack y Sinatra - Herramientas potentes para con...Strangers In The Night: Ruby, Rack y Sinatra - Herramientas potentes para con...
Strangers In The Night: Ruby, Rack y Sinatra - Herramientas potentes para con...
 
Psgi Plack Sfpm
Psgi Plack SfpmPsgi Plack Sfpm
Psgi Plack Sfpm
 
Extending the WordPress REST API - Josh Pollock
Extending the WordPress REST API - Josh PollockExtending the WordPress REST API - Josh Pollock
Extending the WordPress REST API - Josh Pollock
 
AngularJS with Slim PHP Micro Framework
AngularJS with Slim PHP Micro FrameworkAngularJS with Slim PHP Micro Framework
AngularJS with Slim PHP Micro Framework
 
Jicc teaching rails
Jicc teaching railsJicc teaching rails
Jicc teaching rails
 

Similaire à Adventurous Merb

SproutCore and the Future of Web Apps
SproutCore and the Future of Web AppsSproutCore and the Future of Web Apps
SproutCore and the Future of Web Apps
Mike Subelsky
 
Integrating Flex And Rails With Ruby Amf
Integrating Flex And Rails With Ruby AmfIntegrating Flex And Rails With Ruby Amf
Integrating Flex And Rails With Ruby Amf
railsconf
 
Rails 3 overview
Rails 3 overviewRails 3 overview
Rails 3 overview
Yehuda Katz
 
OSDC 2009 Rails Turtorial
OSDC 2009 Rails TurtorialOSDC 2009 Rails Turtorial
OSDC 2009 Rails Turtorial
Yi-Ting Cheng
 
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQueryRemedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Tatsuhiko Miyagawa
 
Rails 3: Dashing to the Finish
Rails 3: Dashing to the FinishRails 3: Dashing to the Finish
Rails 3: Dashing to the Finish
Yehuda Katz
 

Similaire à Adventurous Merb (20)

SproutCore and the Future of Web Apps
SproutCore and the Future of Web AppsSproutCore and the Future of Web Apps
SproutCore and the Future of Web Apps
 
Rack Middleware
Rack MiddlewareRack Middleware
Rack Middleware
 
And the Greatest of These Is ... Rack Support
And the Greatest of These Is ... Rack SupportAnd the Greatest of These Is ... Rack Support
And the Greatest of These Is ... Rack Support
 
Integrating Flex And Rails With Ruby Amf
Integrating Flex And Rails With Ruby AmfIntegrating Flex And Rails With Ruby Amf
Integrating Flex And Rails With Ruby Amf
 
Flex With Rubyamf
Flex With RubyamfFlex With Rubyamf
Flex With Rubyamf
 
All I Need to Know I Learned by Writing My Own Web Framework
All I Need to Know I Learned by Writing My Own Web FrameworkAll I Need to Know I Learned by Writing My Own Web Framework
All I Need to Know I Learned by Writing My Own Web Framework
 
Jsp
JspJsp
Jsp
 
Rails GUI Development with Ext JS
Rails GUI Development with Ext JSRails GUI Development with Ext JS
Rails GUI Development with Ext JS
 
SproutCore and the Future of Web Apps
SproutCore and the Future of Web AppsSproutCore and the Future of Web Apps
SproutCore and the Future of Web Apps
 
Demystifying Maven
Demystifying MavenDemystifying Maven
Demystifying Maven
 
Using and scaling Rack and Rack-based middleware
Using and scaling Rack and Rack-based middlewareUsing and scaling Rack and Rack-based middleware
Using and scaling Rack and Rack-based middleware
 
ActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group PresentationActiveWeb: Chicago Java User Group Presentation
ActiveWeb: Chicago Java User Group Presentation
 
Javazone 2010-lift-framework-public
Javazone 2010-lift-framework-publicJavazone 2010-lift-framework-public
Javazone 2010-lift-framework-public
 
Ramaze - The Underrated Ruby Web Framework
Ramaze - The Underrated Ruby Web FrameworkRamaze - The Underrated Ruby Web Framework
Ramaze - The Underrated Ruby Web Framework
 
Rails 3 overview
Rails 3 overviewRails 3 overview
Rails 3 overview
 
OSDC 2009 Rails Turtorial
OSDC 2009 Rails TurtorialOSDC 2009 Rails Turtorial
OSDC 2009 Rails Turtorial
 
Building native Android applications with Mirah and Pindah
Building native Android applications with Mirah and PindahBuilding native Android applications with Mirah and Pindah
Building native Android applications with Mirah and Pindah
 
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQueryRemedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
Remedie: Building a desktop app with HTTP::Engine, SQLite and jQuery
 
Rails 3: Dashing to the Finish
Rails 3: Dashing to the FinishRails 3: Dashing to the Finish
Rails 3: Dashing to the Finish
 
Design Summit - Rails 4 Migration - Aaron Patterson
Design Summit - Rails 4 Migration - Aaron PattersonDesign Summit - Rails 4 Migration - Aaron Patterson
Design Summit - Rails 4 Migration - Aaron Patterson
 

Plus de Matt Todd (6)

Building A Framework On Rack
Building A Framework On RackBuilding A Framework On Rack
Building A Framework On Rack
 
Writing Ruby Extensions
Writing Ruby ExtensionsWriting Ruby Extensions
Writing Ruby Extensions
 
XMPP & AMQP in Ruby
XMPP & AMQP in RubyXMPP & AMQP in Ruby
XMPP & AMQP in Ruby
 
Intro to Merb
Intro to MerbIntro to Merb
Intro to Merb
 
Halcyon Atlanta RUG Presentation
Halcyon Atlanta RUG PresentationHalcyon Atlanta RUG Presentation
Halcyon Atlanta RUG Presentation
 
Halcyon Atl RUG Presentation
Halcyon Atl RUG PresentationHalcyon Atl RUG Presentation
Halcyon Atl RUG Presentation
 

Dernier

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Dernier (20)

Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 

Adventurous Merb