SlideShare a Scribd company logo
Web Application Frameworks
(WAF)
Ako Kaman
@scheperson
What is a WAF?
• A general purpose software framework
• Used to build:
• Dynamic websites
• Web applications
• Web API
• Mostly based on MVC pattern
• Push based (more popular)
• Pull based
Why should I bother using a WAF?
• Community support
• Don’t reinvent the wheel
• Better application structure
• Decrease development time
• Free tools and components (more on this later)
• Hundreds of developers are smarter than your team! (RoR => 3477)
What is included in a typical WAF?
• Asset management (some WAFs)
• Generating sprites
• Pre-compiling assets for production
• Compiling SASS, Less and Coffescript on the fly (development)
• Helpers
• Security
• Local authentication
• Using OAuth
• Controllers
• Test tools
What is included in a typical WAF? (cont.)
• Scaffolding
• Command line tools
• I18n and L10n support
• Templating engine (View layer)
• Routing and URL mapping (no Default.aspx)!
• Database access and abstraction (Model layer)
• Migrations
• Caching data
• Databased agnostic
• Object oriented database access (ORM)
How does MVC work?
Router
Controller Model
Browser
View
Request
Dispatch
Fetch dataPush data
Render Response
Some WAFs out there
• PHP
• Yii
• Laravel
• FuelPHP
• CakePHP
• Zend Framework
• CodeIgniter (dead) => ExpressionEngine
• Symfony => Yahoo Bookmarks, Delicious, DailyMotion
• Python
• Flask
• Pylons
• Django => Pinterest, Disqus, Instagram, Mozilla, Rdio
Some WAFs out there (cont.)
• Java/Scala
• Lift => FourSquare
• Play => LinkedIn, Klout, The Guardian
• Java
• Grails
• Spring
• ASP.NET (C#, VB) :(
• ASP.NET MVC
• Ruby :)
• Sinatra => Apple, BBC, Heroku
• Ruby on Rails =>Twitter, GitHub, Basecamp, Groupon, SoundCloud
Web Application Frameworks (WAF)
How does MVC work?
Router
Controller Model
Browser
View
Request
Dispatch
Fetch dataPush data
Render Response
Making an HTTP request
Router
Controller Model
Browser
View
Request
Dispatch
Fetch dataPush data
Render Response
Making an HTTP request (cont.)
http://example.com/books/1
GET /books/1 HTTP/1.1
Host: example.com
Routing and URL mapping
Router
Controller Model
Browser
View
Request
Dispatch
Fetch dataPush data
Render Response
Routing and URL mapping (cont.)
get “admin/news”
match "admin/news", to: "admin#posts", as: "manage_news", via: :get
Prefix Verb URI Pattern Controller#Action
admin_news GET /admin/news admin#news
Prefix Verb URI Pattern Controller#Action
manage_news GET /admin/news admin#posts
Routing and URL mapping (cont.)
resources “books”
Note the :id parameter
Prefix Verb URI Pattern Controller#Action
books GET /books books#index
POST /books books#create
new_book GET /books/new books#new
edit_book GET /books/:id/edit books#edit
book GET /books/:id books#show
PATCH /books/:id books#update
PUT /books/:id books#update
DELETE /books/:id books#destroy
Migrations, Models and Controllers
Router
Controller Model
Browser
View
Request
Dispatch
Fetch dataPush data
Render Response
Migrations, Models and Controllers (cont.)
class CreateBooks < ActiveRecord::Migration
def change
create_table :books do |t|
t.string :title
t.string :isbn
t.integer :pages
end
end
end
$ rails g migration CreateBooks title isbn pages:integer
What is a migration?
Migrations, Models and Controllers (cont.)
class BooksController < ApplicationController
...
def show
@book = Book.find(params[:id]) # /books/:id
end
...
end
class Book < ActiveRecord::Base
end
Views
Router
Controller Model
Browser
View
Request
Dispatch
Fetch dataPush data
Render Response
Views (cont.)
<p>
<strong>Title:</strong>
<%= @book.title %>
</p>
<p>
<strong>ISBN:</strong>
<%= @book.isbn %>
</p>
<p>
<strong>Pages:</strong>
<%= @book.pages %>
</p>
<%= link_to 'Edit', edit_book_path(@book) %> |
<%= link_to 'Back', books_path %>
Views (cont.)
<p>
<strong>Title:</strong>
<%= @book.title %>
</p>
<p>
<strong>ISBN:</strong>
<%= @book.isbn %>
</p>
<p>
<strong>Pages:</strong>
<%= @book.pages %>
</p>
<%= link_to 'Edit', edit_book_path(@book) %> |
<%= link_to 'Back', books_path %>
Prefix Verb URI Pattern Controller#Action
books GET /books books#index
edit_book GET /books/:id/edit books#edit
The end result
Questions?

More Related Content

PPTX
10 tips to make your ASP.NET Apps Faster
PPTX
Getting Started with ASP.NET 5
PPTX
Building rest services using aspnetwebapi
PPTX
Azure Serverless Conf
PPTX
Building Modern Web Applications with ASP.NET5
PPTX
Building a Node.js API backend with LoopBack in 5 Minutes
PDF
Rapid API Development with LoopBack/StrongLoop
PDF
PLAT-8 Spring Web Scripts and Spring Surf
10 tips to make your ASP.NET Apps Faster
Getting Started with ASP.NET 5
Building rest services using aspnetwebapi
Azure Serverless Conf
Building Modern Web Applications with ASP.NET5
Building a Node.js API backend with LoopBack in 5 Minutes
Rapid API Development with LoopBack/StrongLoop
PLAT-8 Spring Web Scripts and Spring Surf

What's hot (20)

PPSX
Web technologies practical guide
PDF
Ryan Brown - Open Community
KEY
SOA on Rails
PPTX
Serverless with Azure Functions
PPTX
Azure functions
PPTX
ASP.NET MVC - Latest & Greatest So Far
PDF
Isomorphic WordPress Applications with NodeifyWP
PDF
Getting Started with WordPress JSON REST API
PDF
ITT Flisol 2013
PPTX
SoCal Code Camp 2011 - ASP.NET 4.5
PDF
A Beginner's Guide to Ember
PPTX
Elastic & Azure & Episever, Case Evira
PPTX
Episerver and search engines
PDF
LoopBack: a productivity booster for MEAN
PPTX
SenchaCon 2016: Oracle Forms Modernisation - Owen Pagan
PPTX
Firebase - cloud based real time database
PPTX
Single page application and Framework
PPTX
REST and ASP.NET Web API (Tunisia)
PPTX
Modern Applications With Asp.net Core 5 and Vue JS 3
PPTX
Maximizing WordPress
Web technologies practical guide
Ryan Brown - Open Community
SOA on Rails
Serverless with Azure Functions
Azure functions
ASP.NET MVC - Latest & Greatest So Far
Isomorphic WordPress Applications with NodeifyWP
Getting Started with WordPress JSON REST API
ITT Flisol 2013
SoCal Code Camp 2011 - ASP.NET 4.5
A Beginner's Guide to Ember
Elastic & Azure & Episever, Case Evira
Episerver and search engines
LoopBack: a productivity booster for MEAN
SenchaCon 2016: Oracle Forms Modernisation - Owen Pagan
Firebase - cloud based real time database
Single page application and Framework
REST and ASP.NET Web API (Tunisia)
Modern Applications With Asp.net Core 5 and Vue JS 3
Maximizing WordPress
Ad

Similar to Web Application Frameworks (WAF) (20)

PPTX
Azure Functions Real World Examples
PPTX
Build Modern Web Apps Using ASP.NET Web API and AngularJS
PDF
Web APIs
PDF
Building APIs in an easy way using API Platform
PDF
Restful风格ž„web服务架构
PDF
PLAT-7 Spring Web Scripts and Spring Surf
PDF
PLAT-7 Spring Web Scripts and Spring Surf
PPTX
Owin from spec to application
PDF
Introduction to Flask Micro Framework
PPTX
WebNetConf 2012 - Single Page Apps
PPTX
Create Salesforce online IDE in 30 minutes
PDF
Introduction to Ember.js and how we used it at FlowPro.io
PDF
Code for Startup MVP (Ruby on Rails) Session 1
PPTX
Web Development Today
PPTX
Using MVC with Kentico 8
KEY
Rhodes
PDF
Single page applications with backbone js
PDF
Tutorial, Part 2: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
PDF
web2py:Web development like a boss
PPTX
ASP.NET - Ivan Marković
Azure Functions Real World Examples
Build Modern Web Apps Using ASP.NET Web API and AngularJS
Web APIs
Building APIs in an easy way using API Platform
Restful风格ž„web服务架构
PLAT-7 Spring Web Scripts and Spring Surf
PLAT-7 Spring Web Scripts and Spring Surf
Owin from spec to application
Introduction to Flask Micro Framework
WebNetConf 2012 - Single Page Apps
Create Salesforce online IDE in 30 minutes
Introduction to Ember.js and how we used it at FlowPro.io
Code for Startup MVP (Ruby on Rails) Session 1
Web Development Today
Using MVC with Kentico 8
Rhodes
Single page applications with backbone js
Tutorial, Part 2: SharePoint 101: Jump-Starting the Developer by Rob Windsor ...
web2py:Web development like a boss
ASP.NET - Ivan Marković
Ad

Recently uploaded (20)

PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Mushroom cultivation and it's methods.pdf
PDF
Machine learning based COVID-19 study performance prediction
PPTX
A Presentation on Artificial Intelligence
PDF
Spectral efficient network and resource selection model in 5G networks
PPT
Teaching material agriculture food technology
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PPTX
1. Introduction to Computer Programming.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
Mushroom cultivation and it's methods.pdf
Machine learning based COVID-19 study performance prediction
A Presentation on Artificial Intelligence
Spectral efficient network and resource selection model in 5G networks
Teaching material agriculture food technology
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
SOPHOS-XG Firewall Administrator PPT.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Unlocking AI with Model Context Protocol (MCP)
Advanced methodologies resolving dimensionality complications for autism neur...
Network Security Unit 5.pdf for BCA BBA.
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
Group 1 Presentation -Planning and Decision Making .pptx
NewMind AI Weekly Chronicles - August'25-Week II
Accuracy of neural networks in brain wave diagnosis of schizophrenia
1. Introduction to Computer Programming.pptx

Web Application Frameworks (WAF)

  • 2. What is a WAF? • A general purpose software framework • Used to build: • Dynamic websites • Web applications • Web API • Mostly based on MVC pattern • Push based (more popular) • Pull based
  • 3. Why should I bother using a WAF? • Community support • Don’t reinvent the wheel • Better application structure • Decrease development time • Free tools and components (more on this later) • Hundreds of developers are smarter than your team! (RoR => 3477)
  • 4. What is included in a typical WAF? • Asset management (some WAFs) • Generating sprites • Pre-compiling assets for production • Compiling SASS, Less and Coffescript on the fly (development) • Helpers • Security • Local authentication • Using OAuth • Controllers • Test tools
  • 5. What is included in a typical WAF? (cont.) • Scaffolding • Command line tools • I18n and L10n support • Templating engine (View layer) • Routing and URL mapping (no Default.aspx)! • Database access and abstraction (Model layer) • Migrations • Caching data • Databased agnostic • Object oriented database access (ORM)
  • 6. How does MVC work? Router Controller Model Browser View Request Dispatch Fetch dataPush data Render Response
  • 7. Some WAFs out there • PHP • Yii • Laravel • FuelPHP • CakePHP • Zend Framework • CodeIgniter (dead) => ExpressionEngine • Symfony => Yahoo Bookmarks, Delicious, DailyMotion • Python • Flask • Pylons • Django => Pinterest, Disqus, Instagram, Mozilla, Rdio
  • 8. Some WAFs out there (cont.) • Java/Scala • Lift => FourSquare • Play => LinkedIn, Klout, The Guardian • Java • Grails • Spring • ASP.NET (C#, VB) :( • ASP.NET MVC • Ruby :) • Sinatra => Apple, BBC, Heroku • Ruby on Rails =>Twitter, GitHub, Basecamp, Groupon, SoundCloud
  • 10. How does MVC work? Router Controller Model Browser View Request Dispatch Fetch dataPush data Render Response
  • 11. Making an HTTP request Router Controller Model Browser View Request Dispatch Fetch dataPush data Render Response
  • 12. Making an HTTP request (cont.) http://example.com/books/1 GET /books/1 HTTP/1.1 Host: example.com
  • 13. Routing and URL mapping Router Controller Model Browser View Request Dispatch Fetch dataPush data Render Response
  • 14. Routing and URL mapping (cont.) get “admin/news” match "admin/news", to: "admin#posts", as: "manage_news", via: :get Prefix Verb URI Pattern Controller#Action admin_news GET /admin/news admin#news Prefix Verb URI Pattern Controller#Action manage_news GET /admin/news admin#posts
  • 15. Routing and URL mapping (cont.) resources “books” Note the :id parameter Prefix Verb URI Pattern Controller#Action books GET /books books#index POST /books books#create new_book GET /books/new books#new edit_book GET /books/:id/edit books#edit book GET /books/:id books#show PATCH /books/:id books#update PUT /books/:id books#update DELETE /books/:id books#destroy
  • 16. Migrations, Models and Controllers Router Controller Model Browser View Request Dispatch Fetch dataPush data Render Response
  • 17. Migrations, Models and Controllers (cont.) class CreateBooks < ActiveRecord::Migration def change create_table :books do |t| t.string :title t.string :isbn t.integer :pages end end end $ rails g migration CreateBooks title isbn pages:integer What is a migration?
  • 18. Migrations, Models and Controllers (cont.) class BooksController < ApplicationController ... def show @book = Book.find(params[:id]) # /books/:id end ... end class Book < ActiveRecord::Base end
  • 20. Views (cont.) <p> <strong>Title:</strong> <%= @book.title %> </p> <p> <strong>ISBN:</strong> <%= @book.isbn %> </p> <p> <strong>Pages:</strong> <%= @book.pages %> </p> <%= link_to 'Edit', edit_book_path(@book) %> | <%= link_to 'Back', books_path %>
  • 21. Views (cont.) <p> <strong>Title:</strong> <%= @book.title %> </p> <p> <strong>ISBN:</strong> <%= @book.isbn %> </p> <p> <strong>Pages:</strong> <%= @book.pages %> </p> <%= link_to 'Edit', edit_book_path(@book) %> | <%= link_to 'Back', books_path %> Prefix Verb URI Pattern Controller#Action books GET /books books#index edit_book GET /books/:id/edit books#edit

Editor's Notes

  • #2: -Ask what is the difference between a web application and a normal web site?- The difference between Push/Pull