SlideShare a Scribd company logo
1 of 16
Ruby for Web Development
        Beyond just Rails
Pizza Sponsored By




Additional Thanks to Our Other Sponsors
The Big Gorilla
A Myriad of Options
Mack
                    Camping




 Sinatra
The Heart of Them All
So, What’s What?
require 'camping'

                                Camping.goes :Blog

                                module Blog::Models
                                  class Post < Base; belongs_to :user; end
                                  class Comment < Base; belongs_to :user; end
                                  class User < Base; end
                                end


       Camping                  module Blog::Controllers
                                  class Index
                                    def get
                                      @posts = Post.find :all
•   Microframework (under 4K)         render :index
                                    end
                                  end
•   Single file applications     end


•   MVC-ish                     module Blog::Views
                                  def layout
                                    html do
                                      head { title "My Blog" }
                                      body do
                                        h1 "My Blog"
                                        self << yield
         GOTCHAS                      end
                                    end

•   ActiveRecord needed for       end

    Models                        def index
                                    for post in @posts

•   Markaby needed for Views          h1 post.title
                                    end
                                  end
                                end
Sinatra

•   Web Application DSL
                                       require 'sinatra'

•   Single file applications possible   get '/' do
                                         'Hello world!'
•   Non-MVC/MVC-ish                    end




         GOTCHAS
•   Additional dependencies for
    data persistence (Models)

•   Additional dependencies for
    Views & Templates
require 'ramaze'
•   Modular Web Framework
                                       class MainController < Ramaze::Controller

•   Single file applications possible     def index
                                           "Hello, World!"
                                         end
•   MVC-ish                            end


•   ORM & Templating Agnostic
                                       Ramaze.start




         GOTCHAS
•   Less visible community
Mack

•   Lightweight framework

•   Inspired by Rails, Merb and
    Ramaze

•   Emphasis on speed

•   Multithreaded


        GOTCHAS
•   Limited user community

•   Very limited documentation
•   Everything and the kitchen sink

•   The Ruby Web Standard

•   Emphasis on “Developer
    Happiness”

•   HUGE community


        GOTCHAS
•   Monolithic

•   Opinionated
So, What Is Rack?
•   Standard abstraction for web
    applications
                                   class HelloWorld

•   Super flexible thanks to
                                     def call(env)
                                       [200,
    Middleware                          {"Content-Type" => "text/plain"},
                                        ["Hello world!"]]

•
                                     end
    Stupid simple                  end


•   Makes your app/framework
    web server agnostic
Middlewares


•   Middlewares are Rack applications that you stack together to form a
    larger app
    •   Rails is composed of numerous pieces of Rack Middleware

•   Middlewares respond to call, accept an environment hash and return
    a response array

•   Examples of Rack Middleware
    •   Rack::Static - Handles fetching and returning static assets or caches
    •   Rack::Session::Cookie - Handles your sessions via cookies
    •   Rack::ShowExceptions - Catches any exceptions thrown in your app
        and returns a useful backtrace on the exception.
More Resources


•   32 Rack Links and Resources (Ruby Inside) - http://bit.ly/2NTV4Z
•   21 Rack Middlewares (Ruby Inside) - http://bit.ly/4uyXYW
•   Rails on Rack (Rails Guides) - http://bit.ly/C9zZP
•   Rack Middleware (Railscasts) - http://bit.ly/okQoF
•   Rack Screencasts (Ruby Flow) - http://bit.ly/4AMeuP
Questions?

More Related Content

What's hot

WebAssembly in Houdini CSS, is it possible?
WebAssembly in Houdini CSS, is it possible?WebAssembly in Houdini CSS, is it possible?
WebAssembly in Houdini CSS, is it possible?Alexandr Skachkov
 
WebAssembly vs JavaScript: What is faster?
WebAssembly vs JavaScript: What is faster?WebAssembly vs JavaScript: What is faster?
WebAssembly vs JavaScript: What is faster?Alexandr Skachkov
 
Rapid development with Rails
Rapid development with RailsRapid development with Rails
Rapid development with RailsYi-Ting Cheng
 
PLAT-8 Spring Web Scripts and Spring Surf
PLAT-8 Spring Web Scripts and Spring SurfPLAT-8 Spring Web Scripts and Spring Surf
PLAT-8 Spring Web Scripts and Spring SurfAlfresco Software
 
The Dark Side of Single Page Applications
The Dark Side of Single Page ApplicationsThe Dark Side of Single Page Applications
The Dark Side of Single Page ApplicationsDor Kalev
 
PLAT-16 Using Enterprise Content in Grails
PLAT-16 Using Enterprise Content in GrailsPLAT-16 Using Enterprise Content in Grails
PLAT-16 Using Enterprise Content in GrailsAlfresco Software
 
Camel oneactivemq posta-final
Camel oneactivemq posta-finalCamel oneactivemq posta-final
Camel oneactivemq posta-finalChristian Posta
 
Project Fedena and Why Ruby on Rails - ArvindArvind G S
Project Fedena and Why Ruby on Rails - ArvindArvind G SProject Fedena and Why Ruby on Rails - ArvindArvind G S
Project Fedena and Why Ruby on Rails - ArvindArvind G SThoughtWorks
 
Essential Camel Components
Essential Camel ComponentsEssential Camel Components
Essential Camel ComponentsChristian Posta
 
RoR (Ruby on Rails)
RoR (Ruby on Rails)RoR (Ruby on Rails)
RoR (Ruby on Rails)scandiweb
 
React.js for Rails Developers
React.js for Rails DevelopersReact.js for Rails Developers
React.js for Rails DevelopersArkency
 
Polyglot Messaging with Apache ActiveMQ
Polyglot Messaging with Apache ActiveMQPolyglot Messaging with Apache ActiveMQ
Polyglot Messaging with Apache ActiveMQChristian Posta
 
Server Check.in case study - Drupal and Node.js
Server Check.in case study - Drupal and Node.jsServer Check.in case study - Drupal and Node.js
Server Check.in case study - Drupal and Node.jsJeff Geerling
 
FITC - Here Be Dragons: Advanced JavaScript Debugging
FITC - Here Be Dragons: Advanced JavaScript DebuggingFITC - Here Be Dragons: Advanced JavaScript Debugging
FITC - Here Be Dragons: Advanced JavaScript DebuggingRami Sayar
 
Intro to Ruby on Rails
Intro to Ruby on RailsIntro to Ruby on Rails
Intro to Ruby on RailsMark Menard
 
Beyond Apache: Faster Web Servers
Beyond Apache: Faster Web ServersBeyond Apache: Faster Web Servers
Beyond Apache: Faster Web Serverswebhostingguy
 
High Availability Perl DBI + MySQL
High Availability Perl DBI + MySQLHigh Availability Perl DBI + MySQL
High Availability Perl DBI + MySQLSteve Purkis
 
Chicago Microservices Integration Talk
Chicago Microservices Integration TalkChicago Microservices Integration Talk
Chicago Microservices Integration TalkChristian Posta
 

What's hot (20)

WebAssembly in Houdini CSS, is it possible?
WebAssembly in Houdini CSS, is it possible?WebAssembly in Houdini CSS, is it possible?
WebAssembly in Houdini CSS, is it possible?
 
WebAssembly vs JavaScript: What is faster?
WebAssembly vs JavaScript: What is faster?WebAssembly vs JavaScript: What is faster?
WebAssembly vs JavaScript: What is faster?
 
Rapid development with Rails
Rapid development with RailsRapid development with Rails
Rapid development with Rails
 
MariaDB - The Future of MySQL?
MariaDB - The Future of MySQL?MariaDB - The Future of MySQL?
MariaDB - The Future of MySQL?
 
PLAT-8 Spring Web Scripts and Spring Surf
PLAT-8 Spring Web Scripts and Spring SurfPLAT-8 Spring Web Scripts and Spring Surf
PLAT-8 Spring Web Scripts and Spring Surf
 
The Dark Side of Single Page Applications
The Dark Side of Single Page ApplicationsThe Dark Side of Single Page Applications
The Dark Side of Single Page Applications
 
PLAT-16 Using Enterprise Content in Grails
PLAT-16 Using Enterprise Content in GrailsPLAT-16 Using Enterprise Content in Grails
PLAT-16 Using Enterprise Content in Grails
 
Camel oneactivemq posta-final
Camel oneactivemq posta-finalCamel oneactivemq posta-final
Camel oneactivemq posta-final
 
Project Fedena and Why Ruby on Rails - ArvindArvind G S
Project Fedena and Why Ruby on Rails - ArvindArvind G SProject Fedena and Why Ruby on Rails - ArvindArvind G S
Project Fedena and Why Ruby on Rails - ArvindArvind G S
 
Essential Camel Components
Essential Camel ComponentsEssential Camel Components
Essential Camel Components
 
RoR (Ruby on Rails)
RoR (Ruby on Rails)RoR (Ruby on Rails)
RoR (Ruby on Rails)
 
React.js for Rails Developers
React.js for Rails DevelopersReact.js for Rails Developers
React.js for Rails Developers
 
Polyglot Messaging with Apache ActiveMQ
Polyglot Messaging with Apache ActiveMQPolyglot Messaging with Apache ActiveMQ
Polyglot Messaging with Apache ActiveMQ
 
Server Check.in case study - Drupal and Node.js
Server Check.in case study - Drupal and Node.jsServer Check.in case study - Drupal and Node.js
Server Check.in case study - Drupal and Node.js
 
FITC - Here Be Dragons: Advanced JavaScript Debugging
FITC - Here Be Dragons: Advanced JavaScript DebuggingFITC - Here Be Dragons: Advanced JavaScript Debugging
FITC - Here Be Dragons: Advanced JavaScript Debugging
 
Intro to Ruby on Rails
Intro to Ruby on RailsIntro to Ruby on Rails
Intro to Ruby on Rails
 
Beyond Apache: Faster Web Servers
Beyond Apache: Faster Web ServersBeyond Apache: Faster Web Servers
Beyond Apache: Faster Web Servers
 
High Availability Perl DBI + MySQL
High Availability Perl DBI + MySQLHigh Availability Perl DBI + MySQL
High Availability Perl DBI + MySQL
 
JDBC
JDBCJDBC
JDBC
 
Chicago Microservices Integration Talk
Chicago Microservices Integration TalkChicago Microservices Integration Talk
Chicago Microservices Integration Talk
 

Viewers also liked (20)

The strategy power connection
The strategy power connectionThe strategy power connection
The strategy power connection
 
Anger 1 1
Anger 1  1Anger 1  1
Anger 1 1
 
Mathematics Of Life
Mathematics Of LifeMathematics Of Life
Mathematics Of Life
 
Some ethical axes
Some ethical axesSome ethical axes
Some ethical axes
 
Mobile Phones User Tips
Mobile Phones User TipsMobile Phones User Tips
Mobile Phones User Tips
 
5 UOW PhD Scholarship after coming Australia 25.11.12
5 UOW PhD Scholarship after coming Australia 25.11.125 UOW PhD Scholarship after coming Australia 25.11.12
5 UOW PhD Scholarship after coming Australia 25.11.12
 
Digital Natives
Digital NativesDigital Natives
Digital Natives
 
Group7
Group7Group7
Group7
 
Learn Ruby 2011 - Session 1
Learn Ruby 2011 - Session 1Learn Ruby 2011 - Session 1
Learn Ruby 2011 - Session 1
 
Vivix Consumer
Vivix ConsumerVivix Consumer
Vivix Consumer
 
518, MP1, Introduction to Internet Marketing, saxe
518, MP1, Introduction to Internet Marketing, saxe518, MP1, Introduction to Internet Marketing, saxe
518, MP1, Introduction to Internet Marketing, saxe
 
PART I.4 - Physical Mathematics
PART I.4 - Physical MathematicsPART I.4 - Physical Mathematics
PART I.4 - Physical Mathematics
 
Shinesquad Services Cards Summer 2012
Shinesquad Services Cards Summer 2012Shinesquad Services Cards Summer 2012
Shinesquad Services Cards Summer 2012
 
4wives
4wives4wives
4wives
 
La descripción
La descripciónLa descripción
La descripción
 
Relationship Building
Relationship BuildingRelationship Building
Relationship Building
 
My Presantation
My PresantationMy Presantation
My Presantation
 
Mutual funds
Mutual fundsMutual funds
Mutual funds
 
Sa Pp
Sa PpSa Pp
Sa Pp
 
PART II.2 - Modern Physics
PART II.2 - Modern PhysicsPART II.2 - Modern Physics
PART II.2 - Modern Physics
 

Similar to Ruby For Web Development

Designing True Cross-Platform Apps
Designing True Cross-Platform AppsDesigning True Cross-Platform Apps
Designing True Cross-Platform AppsFITC
 
Kafka Summit SF 2017 - Kafka and the Polyglot Programmer
Kafka Summit SF 2017 - Kafka and the Polyglot ProgrammerKafka Summit SF 2017 - Kafka and the Polyglot Programmer
Kafka Summit SF 2017 - Kafka and the Polyglot Programmerconfluent
 
Rami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with DockerRami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with DockerWeb à Québec
 
Ruby on Rails : 簡介與入門
Ruby on Rails : 簡介與入門Ruby on Rails : 簡介與入門
Ruby on Rails : 簡介與入門Wen-Tien Chang
 
Drupal: an Overview
Drupal: an OverviewDrupal: an Overview
Drupal: an OverviewMatt Weaver
 
Introduction to ASP.NET 5
Introduction to ASP.NET 5Introduction to ASP.NET 5
Introduction to ASP.NET 5mbaric
 
Getting Started with MariaDB with Docker
Getting Started with MariaDB with DockerGetting Started with MariaDB with Docker
Getting Started with MariaDB with DockerMariaDB plc
 
Jasig rubyon rails
Jasig rubyon railsJasig rubyon rails
Jasig rubyon rails_zaMmer_
 
Jasig rubyon rails
Jasig rubyon railsJasig rubyon rails
Jasig rubyon rails_zaMmer_
 
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...E. Camden Fisher
 
Surviving a Plane Crash, a NU.nl case-study
Surviving a Plane Crash, a NU.nl case-studySurviving a Plane Crash, a NU.nl case-study
Surviving a Plane Crash, a NU.nl case-studypeter_ibuildings
 
Scaling Rails With Torquebox Presented at JUDCon:2011 Boston
Scaling Rails With Torquebox Presented at JUDCon:2011 BostonScaling Rails With Torquebox Presented at JUDCon:2011 Boston
Scaling Rails With Torquebox Presented at JUDCon:2011 Bostonbenbrowning
 
MariaDB on Docker
MariaDB on DockerMariaDB on Docker
MariaDB on DockerMariaDB plc
 
Getting started with MariaDB with Docker
Getting started with MariaDB with DockerGetting started with MariaDB with Docker
Getting started with MariaDB with DockerMariaDB plc
 
An introduction to Node.js
An introduction to Node.jsAn introduction to Node.js
An introduction to Node.jsKasey McCurdy
 
A Tale of 2 Systems
A Tale of 2 SystemsA Tale of 2 Systems
A Tale of 2 SystemsDavid Newman
 
TS 4839 - Enterprise Integration Patterns in Practice
TS 4839 - Enterprise Integration Patterns in PracticeTS 4839 - Enterprise Integration Patterns in Practice
TS 4839 - Enterprise Integration Patterns in Practiceaegloff
 

Similar to Ruby For Web Development (20)

Designing True Cross-Platform Apps
Designing True Cross-Platform AppsDesigning True Cross-Platform Apps
Designing True Cross-Platform Apps
 
Kafka Summit SF 2017 - Kafka and the Polyglot Programmer
Kafka Summit SF 2017 - Kafka and the Polyglot ProgrammerKafka Summit SF 2017 - Kafka and the Polyglot Programmer
Kafka Summit SF 2017 - Kafka and the Polyglot Programmer
 
Rami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with DockerRami Sayar - Node microservices with Docker
Rami Sayar - Node microservices with Docker
 
Ruby on Rails : 簡介與入門
Ruby on Rails : 簡介與入門Ruby on Rails : 簡介與入門
Ruby on Rails : 簡介與入門
 
Drupal: an Overview
Drupal: an OverviewDrupal: an Overview
Drupal: an Overview
 
Introduction to ASP.NET 5
Introduction to ASP.NET 5Introduction to ASP.NET 5
Introduction to ASP.NET 5
 
20120306 dublin js
20120306 dublin js20120306 dublin js
20120306 dublin js
 
Getting Started with MariaDB with Docker
Getting Started with MariaDB with DockerGetting Started with MariaDB with Docker
Getting Started with MariaDB with Docker
 
20120802 timisoara
20120802 timisoara20120802 timisoara
20120802 timisoara
 
Jasig rubyon rails
Jasig rubyon railsJasig rubyon rails
Jasig rubyon rails
 
Jasig rubyon rails
Jasig rubyon railsJasig rubyon rails
Jasig rubyon rails
 
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
CT Software Developers Meetup: Using Docker and Vagrant Within A GitHub Pull ...
 
Surviving a Plane Crash, a NU.nl case-study
Surviving a Plane Crash, a NU.nl case-studySurviving a Plane Crash, a NU.nl case-study
Surviving a Plane Crash, a NU.nl case-study
 
Scaling Rails With Torquebox Presented at JUDCon:2011 Boston
Scaling Rails With Torquebox Presented at JUDCon:2011 BostonScaling Rails With Torquebox Presented at JUDCon:2011 Boston
Scaling Rails With Torquebox Presented at JUDCon:2011 Boston
 
MariaDB on Docker
MariaDB on DockerMariaDB on Docker
MariaDB on Docker
 
Getting started with MariaDB with Docker
Getting started with MariaDB with DockerGetting started with MariaDB with Docker
Getting started with MariaDB with Docker
 
Rack
RackRack
Rack
 
An introduction to Node.js
An introduction to Node.jsAn introduction to Node.js
An introduction to Node.js
 
A Tale of 2 Systems
A Tale of 2 SystemsA Tale of 2 Systems
A Tale of 2 Systems
 
TS 4839 - Enterprise Integration Patterns in Practice
TS 4839 - Enterprise Integration Patterns in PracticeTS 4839 - Enterprise Integration Patterns in Practice
TS 4839 - Enterprise Integration Patterns in Practice
 

More from James Thompson

Interfaces Not Required — RubyHACK 2018
Interfaces Not Required — RubyHACK 2018Interfaces Not Required — RubyHACK 2018
Interfaces Not Required — RubyHACK 2018James Thompson
 
Bounded Contexts for Legacy Code
Bounded Contexts for Legacy CodeBounded Contexts for Legacy Code
Bounded Contexts for Legacy CodeJames Thompson
 
Beyond Accidental Arcitecture
Beyond Accidental ArcitectureBeyond Accidental Arcitecture
Beyond Accidental ArcitectureJames Thompson
 
Effective Pair Programming
Effective Pair ProgrammingEffective Pair Programming
Effective Pair ProgrammingJames Thompson
 
Wrapping an api with a ruby gem
Wrapping an api with a ruby gemWrapping an api with a ruby gem
Wrapping an api with a ruby gemJames Thompson
 
Microservices for the Monolith
Microservices for the MonolithMicroservices for the Monolith
Microservices for the MonolithJames Thompson
 
Learn Ruby 2011 - Session 5 - Looking for a Rescue
Learn Ruby 2011 - Session 5 - Looking for a RescueLearn Ruby 2011 - Session 5 - Looking for a Rescue
Learn Ruby 2011 - Session 5 - Looking for a RescueJames Thompson
 
Learn Ruby 2011 - Session 4 - Objects, Oh My!
Learn Ruby 2011 - Session 4 - Objects, Oh My!Learn Ruby 2011 - Session 4 - Objects, Oh My!
Learn Ruby 2011 - Session 4 - Objects, Oh My!James Thompson
 
Learn Ruby 2011 - Session 3
Learn Ruby 2011 - Session 3Learn Ruby 2011 - Session 3
Learn Ruby 2011 - Session 3James Thompson
 
Learn Ruby 2011 - Session 2
Learn Ruby 2011 - Session 2Learn Ruby 2011 - Session 2
Learn Ruby 2011 - Session 2James Thompson
 
Rails: Scaling Edition - Getting on Rails 3
Rails: Scaling Edition - Getting on Rails 3Rails: Scaling Edition - Getting on Rails 3
Rails: Scaling Edition - Getting on Rails 3James Thompson
 
Ruby Testing: Cucumber and RSpec
Ruby Testing: Cucumber and RSpecRuby Testing: Cucumber and RSpec
Ruby Testing: Cucumber and RSpecJames Thompson
 

More from James Thompson (14)

Interfaces Not Required — RubyHACK 2018
Interfaces Not Required — RubyHACK 2018Interfaces Not Required — RubyHACK 2018
Interfaces Not Required — RubyHACK 2018
 
Bounded Contexts for Legacy Code
Bounded Contexts for Legacy CodeBounded Contexts for Legacy Code
Bounded Contexts for Legacy Code
 
Beyond Accidental Arcitecture
Beyond Accidental ArcitectureBeyond Accidental Arcitecture
Beyond Accidental Arcitecture
 
Effective Pair Programming
Effective Pair ProgrammingEffective Pair Programming
Effective Pair Programming
 
Wrapping an api with a ruby gem
Wrapping an api with a ruby gemWrapping an api with a ruby gem
Wrapping an api with a ruby gem
 
Microservices for the Monolith
Microservices for the MonolithMicroservices for the Monolith
Microservices for the Monolith
 
Mocking & Stubbing
Mocking & StubbingMocking & Stubbing
Mocking & Stubbing
 
Learn Ruby 2011 - Session 5 - Looking for a Rescue
Learn Ruby 2011 - Session 5 - Looking for a RescueLearn Ruby 2011 - Session 5 - Looking for a Rescue
Learn Ruby 2011 - Session 5 - Looking for a Rescue
 
Learn Ruby 2011 - Session 4 - Objects, Oh My!
Learn Ruby 2011 - Session 4 - Objects, Oh My!Learn Ruby 2011 - Session 4 - Objects, Oh My!
Learn Ruby 2011 - Session 4 - Objects, Oh My!
 
Learn Ruby 2011 - Session 3
Learn Ruby 2011 - Session 3Learn Ruby 2011 - Session 3
Learn Ruby 2011 - Session 3
 
Learn Ruby 2011 - Session 2
Learn Ruby 2011 - Session 2Learn Ruby 2011 - Session 2
Learn Ruby 2011 - Session 2
 
Rails: Scaling Edition - Getting on Rails 3
Rails: Scaling Edition - Getting on Rails 3Rails: Scaling Edition - Getting on Rails 3
Rails: Scaling Edition - Getting on Rails 3
 
Ruby Testing: Cucumber and RSpec
Ruby Testing: Cucumber and RSpecRuby Testing: Cucumber and RSpec
Ruby Testing: Cucumber and RSpec
 
Introducing Ruby
Introducing RubyIntroducing Ruby
Introducing Ruby
 

Recently uploaded

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
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.pptxHampshireHUG
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
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 Scriptwesley chun
 
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 RobisonAnna Loughnan Colquhoun
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
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 DevelopmentsTrustArc
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
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 2024Rafal Los
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
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 textsMaria Levchenko
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
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 CVKhem
 

Recently uploaded (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
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
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
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
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
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
 

Ruby For Web Development

  • 1. Ruby for Web Development Beyond just Rails
  • 2. Pizza Sponsored By Additional Thanks to Our Other Sponsors
  • 4. A Myriad of Options Mack Camping Sinatra
  • 5. The Heart of Them All
  • 7. require 'camping' Camping.goes :Blog module Blog::Models class Post < Base; belongs_to :user; end class Comment < Base; belongs_to :user; end class User < Base; end end Camping module Blog::Controllers class Index def get @posts = Post.find :all • Microframework (under 4K) render :index end end • Single file applications end • MVC-ish module Blog::Views def layout html do head { title "My Blog" } body do h1 "My Blog" self << yield GOTCHAS end end • ActiveRecord needed for end Models def index for post in @posts • Markaby needed for Views h1 post.title end end end
  • 8. Sinatra • Web Application DSL require 'sinatra' • Single file applications possible get '/' do 'Hello world!' • Non-MVC/MVC-ish end GOTCHAS • Additional dependencies for data persistence (Models) • Additional dependencies for Views & Templates
  • 9. require 'ramaze' • Modular Web Framework class MainController < Ramaze::Controller • Single file applications possible def index "Hello, World!" end • MVC-ish end • ORM & Templating Agnostic Ramaze.start GOTCHAS • Less visible community
  • 10. Mack • Lightweight framework • Inspired by Rails, Merb and Ramaze • Emphasis on speed • Multithreaded GOTCHAS • Limited user community • Very limited documentation
  • 11. Everything and the kitchen sink • The Ruby Web Standard • Emphasis on “Developer Happiness” • HUGE community GOTCHAS • Monolithic • Opinionated
  • 12. So, What Is Rack?
  • 13. Standard abstraction for web applications class HelloWorld • Super flexible thanks to def call(env) [200, Middleware {"Content-Type" => "text/plain"}, ["Hello world!"]] • end Stupid simple end • Makes your app/framework web server agnostic
  • 14. Middlewares • Middlewares are Rack applications that you stack together to form a larger app • Rails is composed of numerous pieces of Rack Middleware • Middlewares respond to call, accept an environment hash and return a response array • Examples of Rack Middleware • Rack::Static - Handles fetching and returning static assets or caches • Rack::Session::Cookie - Handles your sessions via cookies • Rack::ShowExceptions - Catches any exceptions thrown in your app and returns a useful backtrace on the exception.
  • 15. More Resources • 32 Rack Links and Resources (Ruby Inside) - http://bit.ly/2NTV4Z • 21 Rack Middlewares (Ruby Inside) - http://bit.ly/4uyXYW • Rails on Rack (Rails Guides) - http://bit.ly/C9zZP • Rack Middleware (Railscasts) - http://bit.ly/okQoF • Rack Screencasts (Ruby Flow) - http://bit.ly/4AMeuP