SlideShare ist ein Scribd-Unternehmen logo
1 von 25
atBegin
URL Routing
 and REST
Mapping URLs to Models, Views and Controllers
URL vs. URI

• URl is a resource, that asks for action

• URL is a file or a single item that is
  stateless
URL vs. URI

• URl is a resource, that asks for action
  http://www.lassosoft.com/home/
• URL is a file or a single item that is
  stateless
URL vs. URI

• URl is a resource, that asks for action
  http://www.lassosoft.com/home/
• URL is a file or a single item that is
  stateless
  http://www.lassosoft.com/
  LassoSoft_Logo.png
URL vs. URI


• URl is a resource, that asks for action
• URL is a file or a single item that is
  stateless
Handling vs. Rewriting
   vs. Redirecting
• Handling is conceptually parsing a URI to
    see what application components to call to
    provide a resource.
•
•
Handling vs. Rewriting
   vs. Redirecting
• Handling is conceptually parsing a URI to
  see what application components to call to
  provide a resource.
• Rewriting is altering a URL to another one
  before it even hits the application stack.
Handling vs. Rewriting
   vs. Redirecting
• Handling is conceptually parsing a URI to
  see what application components to call to
  provide a resource.
• Rewriting is altering a URL to another one
  before it even hits the application stack.
• Redirecting is capturing a request for a URI
  or URL and sending a different one in lieu.
atBegin


• atBegin.lasso placed in Lasso Startup
atBegin.lasso
Apache


• Apache conf send files to Lasso
• Done using the Apache site config, not
  the .htaccess
Apache Configuration
REST
• Really, what it's about is using the true
    potential of HTTP.
•    In a RESTful application you'll never modify
    data using a GET request.
• resources being manipulated using a
    common set of verbs
• the actual representation retrieved for a
    resource is dependent on the request and
    not the identifier
SOAP RPC

• SOAP RPC over HTTP, on the other hand,
  encourages each application designer to
  define a new and arbitrary vocabulary of
  nouns and verbs
• getUsers(), savePurchaseOrder(...)
YUCK

• There’s a better way, writing RESTful apps.
• Think of each page as a service that
  responds to requests instead of as a web
  page.
http verbs in REST
• Get        • Remember Fielding
               http://roy.gbiv.com/
• Post         Co-founder VP
               Apache project.
• Put
• Delete
Developng RESTful
         URIs

• In truly restful apps there are only seven
  functions.
http verbs in REST
• show (Get)
• create (Post)
• update (Put)
• destroy (Delete)
• index (Get)
• new (Get)
• edit (Get)
RESTful URIs
•   http://www.widgets.co.uk/widgets/edit/2

•   http://www.widgets.co.uk/widgets/edit/a76b8fe687c6d1f34d

•   http://www.widgets.co.uk/customers/create/234

•   http://www.widgets.co.uk/customers/list.xml

•   http://www.widgets.co.uk/clients/destroy/bd76ea87c

•   http://www.widgets.co.uk/articles/destroy/why-you-should-
    user-our-widgets_bd76ea87c
How do we handle
        these?

• Routing File or an application controller
• /app/controllers/application.inc
• map the requests to models, views and
  controllers
Routing File
Routing File
Routing File
Routing File
Application Structure

Weitere ähnliche Inhalte

Was ist angesagt?

SPTECHCON - Rev Your Engines - SharePoint 2013 Performance Enhancements
SPTECHCON - Rev Your Engines - SharePoint 2013 Performance EnhancementsSPTECHCON - Rev Your Engines - SharePoint 2013 Performance Enhancements
SPTECHCON - Rev Your Engines - SharePoint 2013 Performance Enhancements
Eric Shupps
 
SPTECHCON - Get Some REST - Taking Advantage of the SharePoint 2013 REST API
SPTECHCON - Get Some REST - Taking Advantage of the SharePoint 2013 REST APISPTECHCON - Get Some REST - Taking Advantage of the SharePoint 2013 REST API
SPTECHCON - Get Some REST - Taking Advantage of the SharePoint 2013 REST API
Eric Shupps
 
SharePoint 2013 Performance Enhancements
SharePoint 2013 Performance EnhancementsSharePoint 2013 Performance Enhancements
SharePoint 2013 Performance Enhancements
Eric Shupps
 

Was ist angesagt? (20)

Azure search
Azure searchAzure search
Azure search
 
サーバーサイドから見るGraphQL Serverless Meetup #19
サーバーサイドから見るGraphQL Serverless Meetup #19サーバーサイドから見るGraphQL Serverless Meetup #19
サーバーサイドから見るGraphQL Serverless Meetup #19
 
SPTECHCON - Rev Your Engines - SharePoint 2013 Performance Enhancements
SPTECHCON - Rev Your Engines - SharePoint 2013 Performance EnhancementsSPTECHCON - Rev Your Engines - SharePoint 2013 Performance Enhancements
SPTECHCON - Rev Your Engines - SharePoint 2013 Performance Enhancements
 
RESTful API - Best Practices
RESTful API - Best PracticesRESTful API - Best Practices
RESTful API - Best Practices
 
RESTful API Design Best Practices Using ASP.NET Web API
RESTful API Design Best Practices Using ASP.NET Web APIRESTful API Design Best Practices Using ASP.NET Web API
RESTful API Design Best Practices Using ASP.NET Web API
 
Getting Started with Rails
Getting Started with RailsGetting Started with Rails
Getting Started with Rails
 
Soa 33 soa shopper
Soa 33 soa shopperSoa 33 soa shopper
Soa 33 soa shopper
 
Site speed Server Optimization
Site speed Server OptimizationSite speed Server Optimization
Site speed Server Optimization
 
Get Some Rest - Taking Advantage of the SharePoint 2013 REST API
Get Some Rest - Taking Advantage of the SharePoint 2013 REST APIGet Some Rest - Taking Advantage of the SharePoint 2013 REST API
Get Some Rest - Taking Advantage of the SharePoint 2013 REST API
 
REST full API Design
REST full API DesignREST full API Design
REST full API Design
 
Rev Your Engines - SharePoint Performance Enhancements
Rev Your Engines - SharePoint Performance EnhancementsRev Your Engines - SharePoint Performance Enhancements
Rev Your Engines - SharePoint Performance Enhancements
 
Introduction to Azure Web Applications for Office and SharePoint Developers
Introduction to Azure Web Applications for Office and SharePoint DevelopersIntroduction to Azure Web Applications for Office and SharePoint Developers
Introduction to Azure Web Applications for Office and SharePoint Developers
 
Who's afraid of front end databases
Who's afraid of front end databasesWho's afraid of front end databases
Who's afraid of front end databases
 
Components of openEHR based EHRs
Components of openEHR based EHRsComponents of openEHR based EHRs
Components of openEHR based EHRs
 
SPTECHCON - Get Some REST - Taking Advantage of the SharePoint 2013 REST API
SPTECHCON - Get Some REST - Taking Advantage of the SharePoint 2013 REST APISPTECHCON - Get Some REST - Taking Advantage of the SharePoint 2013 REST API
SPTECHCON - Get Some REST - Taking Advantage of the SharePoint 2013 REST API
 
Office Development Licensing, Deployment and ALM
Office Development Licensing, Deployment and ALMOffice Development Licensing, Deployment and ALM
Office Development Licensing, Deployment and ALM
 
Azure Search
Azure Search Azure Search
Azure Search
 
In app search 1
In app search 1In app search 1
In app search 1
 
01 startoff angularjs
01 startoff angularjs01 startoff angularjs
01 startoff angularjs
 
SharePoint 2013 Performance Enhancements
SharePoint 2013 Performance EnhancementsSharePoint 2013 Performance Enhancements
SharePoint 2013 Performance Enhancements
 

Andere mochten auch (9)

Presentatie GVNL tijdens Leisure & Sport Totaal, 2009.
Presentatie GVNL tijdens Leisure & Sport Totaal, 2009.Presentatie GVNL tijdens Leisure & Sport Totaal, 2009.
Presentatie GVNL tijdens Leisure & Sport Totaal, 2009.
 
Authentication in Node.js
Authentication in Node.jsAuthentication in Node.js
Authentication in Node.js
 
2009 - Basta!: Url rewriting mit iis, asp.net und routing engine
2009 - Basta!: Url rewriting mit iis, asp.net und routing engine2009 - Basta!: Url rewriting mit iis, asp.net und routing engine
2009 - Basta!: Url rewriting mit iis, asp.net und routing engine
 
The scaling story of Postman
The scaling story of PostmanThe scaling story of Postman
The scaling story of Postman
 
Why vREST?
Why vREST?Why vREST?
Why vREST?
 
RESTful API Design, Second Edition
RESTful API Design, Second EditionRESTful API Design, Second Edition
RESTful API Design, Second Edition
 
Secure Your REST API (The Right Way)
Secure Your REST API (The Right Way)Secure Your REST API (The Right Way)
Secure Your REST API (The Right Way)
 
40+ tips to use Postman more efficiently
40+ tips to use Postman more efficiently40+ tips to use Postman more efficiently
40+ tips to use Postman more efficiently
 
Slideshare ppt
Slideshare pptSlideshare ppt
Slideshare ppt
 

Ähnlich wie At Begin, URL Handling and REST

Ähnlich wie At Begin, URL Handling and REST (20)

RESTful HATEOAS standards using Java based Katharsis
RESTful HATEOAS standards using Java based KatharsisRESTful HATEOAS standards using Java based Katharsis
RESTful HATEOAS standards using Java based Katharsis
 
RESTful HATEOAS standards using Java based Katharsis
RESTful HATEOAS standards using Java based KatharsisRESTful HATEOAS standards using Java based Katharsis
RESTful HATEOAS standards using Java based Katharsis
 
Rest in practice
Rest in practiceRest in practice
Rest in practice
 
RestfulDesignRules
RestfulDesignRulesRestfulDesignRules
RestfulDesignRules
 
REST API and CRUD
REST API and CRUDREST API and CRUD
REST API and CRUD
 
RESTful Services
RESTful ServicesRESTful Services
RESTful Services
 
Advanced Web Development in PHP - Understanding REST API
Advanced Web Development in PHP - Understanding REST APIAdvanced Web Development in PHP - Understanding REST API
Advanced Web Development in PHP - Understanding REST API
 
REST and RESTful Services
REST and RESTful ServicesREST and RESTful Services
REST and RESTful Services
 
Lessons learned on the Azure API Stewardship Journey.pptx
Lessons learned on the Azure API Stewardship Journey.pptxLessons learned on the Azure API Stewardship Journey.pptx
Lessons learned on the Azure API Stewardship Journey.pptx
 
[2015/2016] The REST architectural style
[2015/2016] The REST architectural style[2015/2016] The REST architectural style
[2015/2016] The REST architectural style
 
Introduction to Restful Web Services
Introduction to Restful Web ServicesIntroduction to Restful Web Services
Introduction to Restful Web Services
 
Pragmatic REST APIs
Pragmatic REST APIsPragmatic REST APIs
Pragmatic REST APIs
 
Overview of REST - Raihan Ullah
Overview of REST - Raihan UllahOverview of REST - Raihan Ullah
Overview of REST - Raihan Ullah
 
RESTful Web Service using Swagger
RESTful Web Service using SwaggerRESTful Web Service using Swagger
RESTful Web Service using Swagger
 
Introduction to Google APIs
Introduction to Google APIsIntroduction to Google APIs
Introduction to Google APIs
 
Web Clients for Ruby and What they should be in the future
Web Clients for Ruby and What they should be in the futureWeb Clients for Ruby and What they should be in the future
Web Clients for Ruby and What they should be in the future
 
RESTful APIs
RESTful APIsRESTful APIs
RESTful APIs
 
ReST
ReSTReST
ReST
 
What is REST?
What is REST?What is REST?
What is REST?
 
Cqrs api
Cqrs apiCqrs api
Cqrs api
 

Kürzlich hochgeladen

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

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?
 
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
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
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
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
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)
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
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
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 

At Begin, URL Handling and REST

  • 1. atBegin URL Routing and REST Mapping URLs to Models, Views and Controllers
  • 2. URL vs. URI • URl is a resource, that asks for action • URL is a file or a single item that is stateless
  • 3. URL vs. URI • URl is a resource, that asks for action http://www.lassosoft.com/home/ • URL is a file or a single item that is stateless
  • 4. URL vs. URI • URl is a resource, that asks for action http://www.lassosoft.com/home/ • URL is a file or a single item that is stateless http://www.lassosoft.com/ LassoSoft_Logo.png
  • 5. URL vs. URI • URl is a resource, that asks for action • URL is a file or a single item that is stateless
  • 6. Handling vs. Rewriting vs. Redirecting • Handling is conceptually parsing a URI to see what application components to call to provide a resource. • •
  • 7. Handling vs. Rewriting vs. Redirecting • Handling is conceptually parsing a URI to see what application components to call to provide a resource. • Rewriting is altering a URL to another one before it even hits the application stack.
  • 8. Handling vs. Rewriting vs. Redirecting • Handling is conceptually parsing a URI to see what application components to call to provide a resource. • Rewriting is altering a URL to another one before it even hits the application stack. • Redirecting is capturing a request for a URI or URL and sending a different one in lieu.
  • 11. Apache • Apache conf send files to Lasso • Done using the Apache site config, not the .htaccess
  • 13. REST • Really, what it's about is using the true potential of HTTP. • In a RESTful application you'll never modify data using a GET request. • resources being manipulated using a common set of verbs • the actual representation retrieved for a resource is dependent on the request and not the identifier
  • 14. SOAP RPC • SOAP RPC over HTTP, on the other hand, encourages each application designer to define a new and arbitrary vocabulary of nouns and verbs • getUsers(), savePurchaseOrder(...)
  • 15. YUCK • There’s a better way, writing RESTful apps. • Think of each page as a service that responds to requests instead of as a web page.
  • 16. http verbs in REST • Get • Remember Fielding http://roy.gbiv.com/ • Post Co-founder VP Apache project. • Put • Delete
  • 17. Developng RESTful URIs • In truly restful apps there are only seven functions.
  • 18. http verbs in REST • show (Get) • create (Post) • update (Put) • destroy (Delete) • index (Get) • new (Get) • edit (Get)
  • 19. RESTful URIs • http://www.widgets.co.uk/widgets/edit/2 • http://www.widgets.co.uk/widgets/edit/a76b8fe687c6d1f34d • http://www.widgets.co.uk/customers/create/234 • http://www.widgets.co.uk/customers/list.xml • http://www.widgets.co.uk/clients/destroy/bd76ea87c • http://www.widgets.co.uk/articles/destroy/why-you-should- user-our-widgets_bd76ea87c
  • 20. How do we handle these? • Routing File or an application controller • /app/controllers/application.inc • map the requests to models, views and controllers