SlideShare a Scribd company logo
1 of 18
Play! as you REST Using Play! Framework to build RESTful Services Silicon Valley Code Camp October 8th, 2011
Agenda RESTful Interface Traditional J2EE Development Rise of developer-friendly and fun frameworks Play! Framework Overview Working Session – Implement and Deploy a RESTful service using Play! Framework (Java).
What is REST It supports HTTP as the Transport Protocol The HTTP verbs map to the action being performed on a resource The resource is the noun on which an action is being performed. The noun is generally qualified by an identifier. The noun is a business entity, a part of the model. REST is not a standard, but an architecture. Hence everyone tends to explain it differently but drives to the same meaning.
Examples of RESTful URLs GET	/v1/person/1234 POST /v1/person/1234/status {“status”: “Hello, developers!”} DELETE /elasticsearch/people/status/_mapping PUT /v2.0/photos/e5c2f436-f149-11e GET /v1.0/social/rest/people/nickname.mpanditign/@friends GET https://accounts.google.com/o/oauth2/token
Traditional J2EE Web Development Code a servlet (or something that becomes a servlet down the line) using Jersey or Spring, etc. Stick the name and path in a web.xml Package a war file via a build process like ant, maven, ivy, etc. Copy the war file in the container’s webapp folder Bounce the server Pray that it works, if not, go to step 1.
Rise of Developer-friendly Frameworks Faster turnaround and prototyping No need for build -> deploy -> fix -> build cycle Integrated Testing Support via Specs Convention over Configuration Lightweight, focused towards making rapid development and deployment a priority.  Developers can focus on the fun stuff, instead of writing configurations and build scripts
Play! Framework Inspired by Djangoand Rails A complete web-framework offering: A Server (netty) IDE integration with Eclipse, TextMate, IntelliJ Templating Language (Groovy, Scala [2.0]) RESTful by being on a share-nothing, stateless architecture Modules for all major dependencies and seamless integration Hot Reload - you need the IDE and the Browser. No build scripts. Convention Over Configuration None of the J2EE bloat
Play! Overview
Play! Components The Controller Which gets requests, and has the logic to process them and generate a response by interacting with the Model The routes file Where URLs are mapped to Controller Methods The View Templates, etc. to render the response from the controller The Model The “beans” or data-aware domain objects.
Demo Time! Download Play! 1.2.3  Build a simple Play! Java Application Go over the folder structure eclipsify it, pull in Eclipse Demonstrate the hot-reload Add a new method in the controller Run tests via the built-in TestRunner Mess up a test Add a new test for the new method
More Goodies hidden in Play! Quick persistence without a database? db=mem Memcached support MySQL and PostgreSQL support Test Data stored as Fixtures in a YAML Modes – dev, production dev shows detailed errors with source code Mail hosts Scheduled Jobs via annotations (demo later?) Built in Logger, so you wont work with awesome log4j configs.
Bundled Libraries Play comes bundled with ehcache hibernate ORM apache commons Google Gson ezmorph MySQL and Postgres drivers memcached driver xstream for XML Antlr …and more!
Let’s build an API A system to store and query users Create a (very) simple model  Use MongoDB to persist the model in the db
Service Endpoints GET all users		/users GET a user by ID  /users/{id} DELETE a user by ID /users/{id} POST (create) a new user /users PUT (update) a user /users/{id}
Things I am not covering Custom deserialization of Mongo ObjectId() with Gson Merges on Updates Caching using built-in Cache façade
What to look forward to Play! 2.0 Scala as the templating language Support for sbt as the build system (vs. Python) Stateless JPA called Ebean instead of Hibernate Native support for both Java and Scala
We’re hiring!corp.ign.com/careers, and @ignjobs Scala Java PHP/Zend Rails ElasticSearch MongoDB MySQL HTML5 Jquery Mobile Sencha Touch Phonegap Wordpress ActionScript/Flash Redis/Memcached CI/CD
About Manish Pandit  Sr. Engineering Manager 	IGN Entertainment http://linkedin.com/in/mpandit @lobster1234

More Related Content

What's hot

HTTP demystified for web developers
HTTP demystified for web developersHTTP demystified for web developers
HTTP demystified for web developersPeter Hilton
 
Lecture android best practices
Lecture   android best practicesLecture   android best practices
Lecture android best practiceseleksdev
 
Intro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio CodeIntro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio CodeColdFusionConference
 
Play! Framework for JavaEE Developers
Play! Framework for JavaEE DevelopersPlay! Framework for JavaEE Developers
Play! Framework for JavaEE DevelopersTeng Shiu Huang
 
Groovy - Grails as a modern scripting language for Web applications
Groovy - Grails as a modern scripting language for Web applicationsGroovy - Grails as a modern scripting language for Web applications
Groovy - Grails as a modern scripting language for Web applicationsIndicThreads
 
Extreme Testing with Selenium - @hugs at Jenkins User Conference 2011
Extreme Testing with Selenium - @hugs at Jenkins User Conference 2011Extreme Testing with Selenium - @hugs at Jenkins User Conference 2011
Extreme Testing with Selenium - @hugs at Jenkins User Conference 2011hugs
 
An Introduction to Play 2 Framework
An Introduction to Play 2 FrameworkAn Introduction to Play 2 Framework
An Introduction to Play 2 FrameworkPT.JUG
 
Matteo Vaccari - Going Frameworkless in the Backend - Codemotion Milan 2018
Matteo Vaccari - Going Frameworkless in the Backend - Codemotion Milan 2018Matteo Vaccari - Going Frameworkless in the Backend - Codemotion Milan 2018
Matteo Vaccari - Going Frameworkless in the Backend - Codemotion Milan 2018Codemotion
 
Makefiles Intro
Makefiles IntroMakefiles Intro
Makefiles IntroYnon Perek
 
CollabSphere 2018 - Java in Domino After XPages
CollabSphere 2018 - Java in Domino After XPagesCollabSphere 2018 - Java in Domino After XPages
CollabSphere 2018 - Java in Domino After XPagesJesse Gallagher
 
Automated testing with Cypress
Automated testing with CypressAutomated testing with Cypress
Automated testing with CypressYong Shean Chong
 
Smarter ways to do selenium automation @ work, Selenium, automation
Smarter ways to do selenium automation @ work, Selenium, automationSmarter ways to do selenium automation @ work, Selenium, automation
Smarter ways to do selenium automation @ work, Selenium, automationRIA RUI Society
 
Process-oriented reactive service architecture
Process-oriented reactive service architectureProcess-oriented reactive service architecture
Process-oriented reactive service architecturePeter Hilton
 
Jesper Richter-Reichhelm - Continuous Evolution at Wooga - code.talks 2015
Jesper Richter-Reichhelm - Continuous Evolution at Wooga - code.talks 2015Jesper Richter-Reichhelm - Continuous Evolution at Wooga - code.talks 2015
Jesper Richter-Reichhelm - Continuous Evolution at Wooga - code.talks 2015AboutYouGmbH
 

What's hot (20)

Selenium online training
Selenium online trainingSelenium online training
Selenium online training
 
HTTP demystified for web developers
HTTP demystified for web developersHTTP demystified for web developers
HTTP demystified for web developers
 
Lecture android best practices
Lecture   android best practicesLecture   android best practices
Lecture android best practices
 
Jenkins auto configureforbranch-php
Jenkins auto configureforbranch-phpJenkins auto configureforbranch-php
Jenkins auto configureforbranch-php
 
Intro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio CodeIntro to JavaScript Tooling in Visual Studio Code
Intro to JavaScript Tooling in Visual Studio Code
 
Kickstart Jpa
Kickstart JpaKickstart Jpa
Kickstart Jpa
 
Play! Framework for JavaEE Developers
Play! Framework for JavaEE DevelopersPlay! Framework for JavaEE Developers
Play! Framework for JavaEE Developers
 
Selenium using C# by Yogesh Kumar
Selenium using C# by  Yogesh KumarSelenium using C# by  Yogesh Kumar
Selenium using C# by Yogesh Kumar
 
Groovy - Grails as a modern scripting language for Web applications
Groovy - Grails as a modern scripting language for Web applicationsGroovy - Grails as a modern scripting language for Web applications
Groovy - Grails as a modern scripting language for Web applications
 
Future of Xtext
Future of XtextFuture of Xtext
Future of Xtext
 
Selenium
SeleniumSelenium
Selenium
 
Extreme Testing with Selenium - @hugs at Jenkins User Conference 2011
Extreme Testing with Selenium - @hugs at Jenkins User Conference 2011Extreme Testing with Selenium - @hugs at Jenkins User Conference 2011
Extreme Testing with Selenium - @hugs at Jenkins User Conference 2011
 
An Introduction to Play 2 Framework
An Introduction to Play 2 FrameworkAn Introduction to Play 2 Framework
An Introduction to Play 2 Framework
 
Matteo Vaccari - Going Frameworkless in the Backend - Codemotion Milan 2018
Matteo Vaccari - Going Frameworkless in the Backend - Codemotion Milan 2018Matteo Vaccari - Going Frameworkless in the Backend - Codemotion Milan 2018
Matteo Vaccari - Going Frameworkless in the Backend - Codemotion Milan 2018
 
Makefiles Intro
Makefiles IntroMakefiles Intro
Makefiles Intro
 
CollabSphere 2018 - Java in Domino After XPages
CollabSphere 2018 - Java in Domino After XPagesCollabSphere 2018 - Java in Domino After XPages
CollabSphere 2018 - Java in Domino After XPages
 
Automated testing with Cypress
Automated testing with CypressAutomated testing with Cypress
Automated testing with Cypress
 
Smarter ways to do selenium automation @ work, Selenium, automation
Smarter ways to do selenium automation @ work, Selenium, automationSmarter ways to do selenium automation @ work, Selenium, automation
Smarter ways to do selenium automation @ work, Selenium, automation
 
Process-oriented reactive service architecture
Process-oriented reactive service architectureProcess-oriented reactive service architecture
Process-oriented reactive service architecture
 
Jesper Richter-Reichhelm - Continuous Evolution at Wooga - code.talks 2015
Jesper Richter-Reichhelm - Continuous Evolution at Wooga - code.talks 2015Jesper Richter-Reichhelm - Continuous Evolution at Wooga - code.talks 2015
Jesper Richter-Reichhelm - Continuous Evolution at Wooga - code.talks 2015
 

Viewers also liked

Future Agenda Future Of Authenticity
Future Agenda   Future Of AuthenticityFuture Agenda   Future Of Authenticity
Future Agenda Future Of AuthenticityFuture Agenda
 
Danish mediaassoc conf 2014 (condenast)
Danish mediaassoc conf 2014 (condenast)Danish mediaassoc conf 2014 (condenast)
Danish mediaassoc conf 2014 (condenast)Rick (Richard) Welch
 
Political Cartoon
Political CartoonPolitical Cartoon
Political CartoonAmy
 
20131111 slides for crowd funding
20131111 slides for crowd funding20131111 slides for crowd funding
20131111 slides for crowd fundingdbyhundred
 
API Design Antipatterns - APICon SF
API Design Antipatterns - APICon SFAPI Design Antipatterns - APICon SF
API Design Antipatterns - APICon SFManish Pandit
 
ΟΔΗΓΙΕΣ ΔΙΔΑΣΚΑΛΙΑΣ ΤΗΣ ΒΙΟΛΟΓΙΑΣ Α ΛΥΚΕΙΟΥ 2011-12
ΟΔΗΓΙΕΣ ΔΙΔΑΣΚΑΛΙΑΣ ΤΗΣ ΒΙΟΛΟΓΙΑΣ Α ΛΥΚΕΙΟΥ 2011-12ΟΔΗΓΙΕΣ ΔΙΔΑΣΚΑΛΙΑΣ ΤΗΣ ΒΙΟΛΟΓΙΑΣ Α ΛΥΚΕΙΟΥ 2011-12
ΟΔΗΓΙΕΣ ΔΙΔΑΣΚΑΛΙΑΣ ΤΗΣ ΒΙΟΛΟΓΙΑΣ Α ΛΥΚΕΙΟΥ 2011-12Christos Gotzaridis
 
Future Agenda Introduction And Initial Thoughts
Future Agenda   Introduction And Initial ThoughtsFuture Agenda   Introduction And Initial Thoughts
Future Agenda Introduction And Initial ThoughtsFuture Agenda
 
Whatisa Trillion
Whatisa TrillionWhatisa Trillion
Whatisa Trillionguest276365
 
Pres2 Evorium Sourcing
Pres2 Evorium SourcingPres2 Evorium Sourcing
Pres2 Evorium SourcingEricb64
 
My Philosophy
My PhilosophyMy Philosophy
My PhilosophySLOOI
 
Typical One Year Old
Typical One Year OldTypical One Year Old
Typical One Year Oldhumangrowth
 
Permohonan sbp Ting 4
Permohonan sbp Ting 4Permohonan sbp Ting 4
Permohonan sbp Ting 4SLOOI
 
Pictures For Music Magazine
Pictures For Music MagazinePictures For Music Magazine
Pictures For Music Magazinebenjo7
 
Future Learning Landscape Introduction
Future Learning Landscape IntroductionFuture Learning Landscape Introduction
Future Learning Landscape IntroductionYvan Peter
 
Ο ηλεκτρισμος στο σπιτι μας εκπαιδευτικο σεναριο
Ο ηλεκτρισμος στο σπιτι μας εκπαιδευτικο σεναριοΟ ηλεκτρισμος στο σπιτι μας εκπαιδευτικο σεναριο
Ο ηλεκτρισμος στο σπιτι μας εκπαιδευτικο σεναριοChristos Gotzaridis
 
中秋快樂
中秋快樂中秋快樂
中秋快樂Roc4031
 
Fonts N Tht
Fonts N ThtFonts N Tht
Fonts N Thtbenjo7
 

Viewers also liked (20)

Future Agenda Future Of Authenticity
Future Agenda   Future Of AuthenticityFuture Agenda   Future Of Authenticity
Future Agenda Future Of Authenticity
 
Doc1
Doc1Doc1
Doc1
 
Danish mediaassoc conf 2014 (condenast)
Danish mediaassoc conf 2014 (condenast)Danish mediaassoc conf 2014 (condenast)
Danish mediaassoc conf 2014 (condenast)
 
Makro Sunum2
Makro Sunum2Makro Sunum2
Makro Sunum2
 
Political Cartoon
Political CartoonPolitical Cartoon
Political Cartoon
 
20131111 slides for crowd funding
20131111 slides for crowd funding20131111 slides for crowd funding
20131111 slides for crowd funding
 
API Design Antipatterns - APICon SF
API Design Antipatterns - APICon SFAPI Design Antipatterns - APICon SF
API Design Antipatterns - APICon SF
 
ΟΔΗΓΙΕΣ ΔΙΔΑΣΚΑΛΙΑΣ ΤΗΣ ΒΙΟΛΟΓΙΑΣ Α ΛΥΚΕΙΟΥ 2011-12
ΟΔΗΓΙΕΣ ΔΙΔΑΣΚΑΛΙΑΣ ΤΗΣ ΒΙΟΛΟΓΙΑΣ Α ΛΥΚΕΙΟΥ 2011-12ΟΔΗΓΙΕΣ ΔΙΔΑΣΚΑΛΙΑΣ ΤΗΣ ΒΙΟΛΟΓΙΑΣ Α ΛΥΚΕΙΟΥ 2011-12
ΟΔΗΓΙΕΣ ΔΙΔΑΣΚΑΛΙΑΣ ΤΗΣ ΒΙΟΛΟΓΙΑΣ Α ΛΥΚΕΙΟΥ 2011-12
 
Future Agenda Introduction And Initial Thoughts
Future Agenda   Introduction And Initial ThoughtsFuture Agenda   Introduction And Initial Thoughts
Future Agenda Introduction And Initial Thoughts
 
Whatisa Trillion
Whatisa TrillionWhatisa Trillion
Whatisa Trillion
 
Pres2 Evorium Sourcing
Pres2 Evorium SourcingPres2 Evorium Sourcing
Pres2 Evorium Sourcing
 
My Philosophy
My PhilosophyMy Philosophy
My Philosophy
 
Typical One Year Old
Typical One Year OldTypical One Year Old
Typical One Year Old
 
Permohonan sbp Ting 4
Permohonan sbp Ting 4Permohonan sbp Ting 4
Permohonan sbp Ting 4
 
Pictures For Music Magazine
Pictures For Music MagazinePictures For Music Magazine
Pictures For Music Magazine
 
Future Learning Landscape Introduction
Future Learning Landscape IntroductionFuture Learning Landscape Introduction
Future Learning Landscape Introduction
 
Ο ηλεκτρισμος στο σπιτι μας εκπαιδευτικο σεναριο
Ο ηλεκτρισμος στο σπιτι μας εκπαιδευτικο σεναριοΟ ηλεκτρισμος στο σπιτι μας εκπαιδευτικο σεναριο
Ο ηλεκτρισμος στο σπιτι μας εκπαιδευτικο σεναριο
 
中秋快樂
中秋快樂中秋快樂
中秋快樂
 
Compu Lawye Rlucy
Compu Lawye RlucyCompu Lawye Rlucy
Compu Lawye Rlucy
 
Fonts N Tht
Fonts N ThtFonts N Tht
Fonts N Tht
 

Similar to Silicon Valley Code Camp 2011: Play! as you REST

EJB 3.0 Java Persistence with Oracle TopLink
EJB 3.0 Java Persistence with Oracle TopLinkEJB 3.0 Java Persistence with Oracle TopLink
EJB 3.0 Java Persistence with Oracle TopLinkBill Lyons
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introductionvstorm83
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applicationshchen1
 
Abstract #236765 advanced essbase java api tips and tricks
Abstract #236765 advanced essbase java api tips and tricksAbstract #236765 advanced essbase java api tips and tricks
Abstract #236765 advanced essbase java api tips and trickstimtow
 
JavaOne 2009 - TS-5276 - RESTful Protocol Buffers
JavaOne 2009 - TS-5276 - RESTful  Protocol BuffersJavaOne 2009 - TS-5276 - RESTful  Protocol Buffers
JavaOne 2009 - TS-5276 - RESTful Protocol BuffersMatt O'Keefe
 
Developing a Struts & Tiles application using WebSphere Studio
Developing a Struts & Tiles application using WebSphere StudioDeveloping a Struts & Tiles application using WebSphere Studio
Developing a Struts & Tiles application using WebSphere Studioelliando dias
 
Introduction To J Boss Seam
Introduction To J Boss SeamIntroduction To J Boss Seam
Introduction To J Boss Seamashishkulkarni
 
Rollin onj Rubyv3
Rollin onj Rubyv3Rollin onj Rubyv3
Rollin onj Rubyv3Oracle
 
Introduction to Codenvy / JugSummerCamp 2014
Introduction to Codenvy / JugSummerCamp 2014Introduction to Codenvy / JugSummerCamp 2014
Introduction to Codenvy / JugSummerCamp 2014Florent BENOIT
 
SilverStripe Meetup 03/03/2011
SilverStripe Meetup 03/03/2011SilverStripe Meetup 03/03/2011
SilverStripe Meetup 03/03/2011Paul Rogers
 
SilverStripe Meetup Presentation 03/03/2011
SilverStripe Meetup Presentation 03/03/2011SilverStripe Meetup Presentation 03/03/2011
SilverStripe Meetup Presentation 03/03/2011Paul Rogers
 
Seattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js WorkshopSeattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js WorkshopJimmy Guerrero
 
JAVA J2EE Training in Coimbatore - Fundamentals of Java J2EE
JAVA J2EE Training in Coimbatore - Fundamentals of Java J2EE JAVA J2EE Training in Coimbatore - Fundamentals of Java J2EE
JAVA J2EE Training in Coimbatore - Fundamentals of Java J2EE abile technologies
 
Play Framework: Intro & High-Level Overview
Play Framework: Intro & High-Level OverviewPlay Framework: Intro & High-Level Overview
Play Framework: Intro & High-Level OverviewJosh Padnick
 
Dev212 Comparing Net And Java The View From 2006
Dev212 Comparing  Net And Java  The View From 2006Dev212 Comparing  Net And Java  The View From 2006
Dev212 Comparing Net And Java The View From 2006kkorovkin
 

Similar to Silicon Valley Code Camp 2011: Play! as you REST (20)

EJB 3.0 Java Persistence with Oracle TopLink
EJB 3.0 Java Persistence with Oracle TopLinkEJB 3.0 Java Persistence with Oracle TopLink
EJB 3.0 Java Persistence with Oracle TopLink
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introduction
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applications
 
Abstract #236765 advanced essbase java api tips and tricks
Abstract #236765 advanced essbase java api tips and tricksAbstract #236765 advanced essbase java api tips and tricks
Abstract #236765 advanced essbase java api tips and tricks
 
JavaOne 2009 - TS-5276 - RESTful Protocol Buffers
JavaOne 2009 - TS-5276 - RESTful  Protocol BuffersJavaOne 2009 - TS-5276 - RESTful  Protocol Buffers
JavaOne 2009 - TS-5276 - RESTful Protocol Buffers
 
Java se7 features
Java se7 featuresJava se7 features
Java se7 features
 
Developing a Struts & Tiles application using WebSphere Studio
Developing a Struts & Tiles application using WebSphere StudioDeveloping a Struts & Tiles application using WebSphere Studio
Developing a Struts & Tiles application using WebSphere Studio
 
Introduction To J Boss Seam
Introduction To J Boss SeamIntroduction To J Boss Seam
Introduction To J Boss Seam
 
Rollin onj Rubyv3
Rollin onj Rubyv3Rollin onj Rubyv3
Rollin onj Rubyv3
 
ODF Mashups
ODF MashupsODF Mashups
ODF Mashups
 
Why Laravel?
Why Laravel?Why Laravel?
Why Laravel?
 
Introduction to Codenvy / JugSummerCamp 2014
Introduction to Codenvy / JugSummerCamp 2014Introduction to Codenvy / JugSummerCamp 2014
Introduction to Codenvy / JugSummerCamp 2014
 
Java part 3
Java part  3Java part  3
Java part 3
 
SilverStripe Meetup 03/03/2011
SilverStripe Meetup 03/03/2011SilverStripe Meetup 03/03/2011
SilverStripe Meetup 03/03/2011
 
SilverStripe Meetup Presentation 03/03/2011
SilverStripe Meetup Presentation 03/03/2011SilverStripe Meetup Presentation 03/03/2011
SilverStripe Meetup Presentation 03/03/2011
 
Seattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js WorkshopSeattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js Workshop
 
Ruby On Rails
Ruby On RailsRuby On Rails
Ruby On Rails
 
JAVA J2EE Training in Coimbatore - Fundamentals of Java J2EE
JAVA J2EE Training in Coimbatore - Fundamentals of Java J2EE JAVA J2EE Training in Coimbatore - Fundamentals of Java J2EE
JAVA J2EE Training in Coimbatore - Fundamentals of Java J2EE
 
Play Framework: Intro & High-Level Overview
Play Framework: Intro & High-Level OverviewPlay Framework: Intro & High-Level Overview
Play Framework: Intro & High-Level Overview
 
Dev212 Comparing Net And Java The View From 2006
Dev212 Comparing  Net And Java  The View From 2006Dev212 Comparing  Net And Java  The View From 2006
Dev212 Comparing Net And Java The View From 2006
 

More from Manish Pandit

Disaster recovery - What, Why, and How
Disaster recovery - What, Why, and HowDisaster recovery - What, Why, and How
Disaster recovery - What, Why, and HowManish Pandit
 
Serverless Architectures on AWS in practice - OSCON 2018
Serverless Architectures on AWS in practice - OSCON 2018Serverless Architectures on AWS in practice - OSCON 2018
Serverless Architectures on AWS in practice - OSCON 2018Manish Pandit
 
Disaster Recovery and Reliability
Disaster Recovery and ReliabilityDisaster Recovery and Reliability
Disaster Recovery and ReliabilityManish Pandit
 
Immutable AWS Deployments with Packer and Jenkins
Immutable AWS Deployments with Packer and JenkinsImmutable AWS Deployments with Packer and Jenkins
Immutable AWS Deployments with Packer and JenkinsManish Pandit
 
AWS Lambda with Serverless Framework and Java
AWS Lambda with Serverless Framework and JavaAWS Lambda with Serverless Framework and Java
AWS Lambda with Serverless Framework and JavaManish Pandit
 
AWS Primer and Quickstart
AWS Primer and QuickstartAWS Primer and Quickstart
AWS Primer and QuickstartManish Pandit
 
Securing your APIs with OAuth, OpenID, and OpenID Connect
Securing your APIs with OAuth, OpenID, and OpenID ConnectSecuring your APIs with OAuth, OpenID, and OpenID Connect
Securing your APIs with OAuth, OpenID, and OpenID ConnectManish Pandit
 
Silicon Valley 2014 - API Antipatterns
Silicon Valley 2014 - API AntipatternsSilicon Valley 2014 - API Antipatterns
Silicon Valley 2014 - API AntipatternsManish Pandit
 
Scalabay - API Design Antipatterns
Scalabay - API Design AntipatternsScalabay - API Design Antipatterns
Scalabay - API Design AntipatternsManish Pandit
 
OSCON 2014 - API Ecosystem with Scala, Scalatra, and Swagger at Netflix
OSCON 2014 - API Ecosystem with Scala, Scalatra, and Swagger at NetflixOSCON 2014 - API Ecosystem with Scala, Scalatra, and Swagger at Netflix
OSCON 2014 - API Ecosystem with Scala, Scalatra, and Swagger at NetflixManish Pandit
 
Motivation : it Matters
Motivation : it MattersMotivation : it Matters
Motivation : it MattersManish Pandit
 
Building Apis in Scala with Playframework2
Building Apis in Scala with Playframework2Building Apis in Scala with Playframework2
Building Apis in Scala with Playframework2Manish Pandit
 
Introducing Scala to your Ruby/Java Shop : My experiences at IGN
Introducing Scala to your Ruby/Java Shop : My experiences at IGNIntroducing Scala to your Ruby/Java Shop : My experiences at IGN
Introducing Scala to your Ruby/Java Shop : My experiences at IGNManish Pandit
 
Evolving IGN’s New APIs with Scala
 Evolving IGN’s New APIs with Scala Evolving IGN’s New APIs with Scala
Evolving IGN’s New APIs with ScalaManish Pandit
 
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented ProgrammingManish Pandit
 
Silicon Valley Code Camp: 2011 Introduction to MongoDB
Silicon Valley Code Camp: 2011 Introduction to MongoDBSilicon Valley Code Camp: 2011 Introduction to MongoDB
Silicon Valley Code Camp: 2011 Introduction to MongoDBManish Pandit
 

More from Manish Pandit (20)

Disaster recovery - What, Why, and How
Disaster recovery - What, Why, and HowDisaster recovery - What, Why, and How
Disaster recovery - What, Why, and How
 
Serverless Architectures on AWS in practice - OSCON 2018
Serverless Architectures on AWS in practice - OSCON 2018Serverless Architectures on AWS in practice - OSCON 2018
Serverless Architectures on AWS in practice - OSCON 2018
 
Disaster Recovery and Reliability
Disaster Recovery and ReliabilityDisaster Recovery and Reliability
Disaster Recovery and Reliability
 
OAuth2 primer
OAuth2 primerOAuth2 primer
OAuth2 primer
 
Immutable AWS Deployments with Packer and Jenkins
Immutable AWS Deployments with Packer and JenkinsImmutable AWS Deployments with Packer and Jenkins
Immutable AWS Deployments with Packer and Jenkins
 
AWS Lambda with Serverless Framework and Java
AWS Lambda with Serverless Framework and JavaAWS Lambda with Serverless Framework and Java
AWS Lambda with Serverless Framework and Java
 
AWS Primer and Quickstart
AWS Primer and QuickstartAWS Primer and Quickstart
AWS Primer and Quickstart
 
Securing your APIs with OAuth, OpenID, and OpenID Connect
Securing your APIs with OAuth, OpenID, and OpenID ConnectSecuring your APIs with OAuth, OpenID, and OpenID Connect
Securing your APIs with OAuth, OpenID, and OpenID Connect
 
Silicon Valley 2014 - API Antipatterns
Silicon Valley 2014 - API AntipatternsSilicon Valley 2014 - API Antipatterns
Silicon Valley 2014 - API Antipatterns
 
Scalabay - API Design Antipatterns
Scalabay - API Design AntipatternsScalabay - API Design Antipatterns
Scalabay - API Design Antipatterns
 
OSCON 2014 - API Ecosystem with Scala, Scalatra, and Swagger at Netflix
OSCON 2014 - API Ecosystem with Scala, Scalatra, and Swagger at NetflixOSCON 2014 - API Ecosystem with Scala, Scalatra, and Swagger at Netflix
OSCON 2014 - API Ecosystem with Scala, Scalatra, and Swagger at Netflix
 
Motivation : it Matters
Motivation : it MattersMotivation : it Matters
Motivation : it Matters
 
Building Apis in Scala with Playframework2
Building Apis in Scala with Playframework2Building Apis in Scala with Playframework2
Building Apis in Scala with Playframework2
 
Scala at Netflix
Scala at NetflixScala at Netflix
Scala at Netflix
 
Introducing Scala to your Ruby/Java Shop : My experiences at IGN
Introducing Scala to your Ruby/Java Shop : My experiences at IGNIntroducing Scala to your Ruby/Java Shop : My experiences at IGN
Introducing Scala to your Ruby/Java Shop : My experiences at IGN
 
Evolving IGN’s New APIs with Scala
 Evolving IGN’s New APIs with Scala Evolving IGN’s New APIs with Scala
Evolving IGN’s New APIs with Scala
 
IGN's V3 API
IGN's V3 APIIGN's V3 API
IGN's V3 API
 
Java and the JVM
Java and the JVMJava and the JVM
Java and the JVM
 
Object Oriented Programming
Object Oriented ProgrammingObject Oriented Programming
Object Oriented Programming
 
Silicon Valley Code Camp: 2011 Introduction to MongoDB
Silicon Valley Code Camp: 2011 Introduction to MongoDBSilicon Valley Code Camp: 2011 Introduction to MongoDB
Silicon Valley Code Camp: 2011 Introduction to MongoDB
 

Recently uploaded

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
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
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 MenDelhi Call girls
 

Recently uploaded (20)

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
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
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
 

Silicon Valley Code Camp 2011: Play! as you REST

  • 1. Play! as you REST Using Play! Framework to build RESTful Services Silicon Valley Code Camp October 8th, 2011
  • 2. Agenda RESTful Interface Traditional J2EE Development Rise of developer-friendly and fun frameworks Play! Framework Overview Working Session – Implement and Deploy a RESTful service using Play! Framework (Java).
  • 3. What is REST It supports HTTP as the Transport Protocol The HTTP verbs map to the action being performed on a resource The resource is the noun on which an action is being performed. The noun is generally qualified by an identifier. The noun is a business entity, a part of the model. REST is not a standard, but an architecture. Hence everyone tends to explain it differently but drives to the same meaning.
  • 4. Examples of RESTful URLs GET /v1/person/1234 POST /v1/person/1234/status {“status”: “Hello, developers!”} DELETE /elasticsearch/people/status/_mapping PUT /v2.0/photos/e5c2f436-f149-11e GET /v1.0/social/rest/people/nickname.mpanditign/@friends GET https://accounts.google.com/o/oauth2/token
  • 5. Traditional J2EE Web Development Code a servlet (or something that becomes a servlet down the line) using Jersey or Spring, etc. Stick the name and path in a web.xml Package a war file via a build process like ant, maven, ivy, etc. Copy the war file in the container’s webapp folder Bounce the server Pray that it works, if not, go to step 1.
  • 6. Rise of Developer-friendly Frameworks Faster turnaround and prototyping No need for build -> deploy -> fix -> build cycle Integrated Testing Support via Specs Convention over Configuration Lightweight, focused towards making rapid development and deployment a priority. Developers can focus on the fun stuff, instead of writing configurations and build scripts
  • 7. Play! Framework Inspired by Djangoand Rails A complete web-framework offering: A Server (netty) IDE integration with Eclipse, TextMate, IntelliJ Templating Language (Groovy, Scala [2.0]) RESTful by being on a share-nothing, stateless architecture Modules for all major dependencies and seamless integration Hot Reload - you need the IDE and the Browser. No build scripts. Convention Over Configuration None of the J2EE bloat
  • 9. Play! Components The Controller Which gets requests, and has the logic to process them and generate a response by interacting with the Model The routes file Where URLs are mapped to Controller Methods The View Templates, etc. to render the response from the controller The Model The “beans” or data-aware domain objects.
  • 10. Demo Time! Download Play! 1.2.3 Build a simple Play! Java Application Go over the folder structure eclipsify it, pull in Eclipse Demonstrate the hot-reload Add a new method in the controller Run tests via the built-in TestRunner Mess up a test Add a new test for the new method
  • 11. More Goodies hidden in Play! Quick persistence without a database? db=mem Memcached support MySQL and PostgreSQL support Test Data stored as Fixtures in a YAML Modes – dev, production dev shows detailed errors with source code Mail hosts Scheduled Jobs via annotations (demo later?) Built in Logger, so you wont work with awesome log4j configs.
  • 12. Bundled Libraries Play comes bundled with ehcache hibernate ORM apache commons Google Gson ezmorph MySQL and Postgres drivers memcached driver xstream for XML Antlr …and more!
  • 13. Let’s build an API A system to store and query users Create a (very) simple model Use MongoDB to persist the model in the db
  • 14. Service Endpoints GET all users /users GET a user by ID /users/{id} DELETE a user by ID /users/{id} POST (create) a new user /users PUT (update) a user /users/{id}
  • 15. Things I am not covering Custom deserialization of Mongo ObjectId() with Gson Merges on Updates Caching using built-in Cache façade
  • 16. What to look forward to Play! 2.0 Scala as the templating language Support for sbt as the build system (vs. Python) Stateless JPA called Ebean instead of Hibernate Native support for both Java and Scala
  • 17. We’re hiring!corp.ign.com/careers, and @ignjobs Scala Java PHP/Zend Rails ElasticSearch MongoDB MySQL HTML5 Jquery Mobile Sencha Touch Phonegap Wordpress ActionScript/Flash Redis/Memcached CI/CD
  • 18. About Manish Pandit Sr. Engineering Manager IGN Entertainment http://linkedin.com/in/mpandit @lobster1234