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

Lecture android best practices
Lecture   android best practicesLecture   android best practices
Lecture android best practices
eleksdev
 
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
RIA RUI Society
 

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

Political Cartoon
Political CartoonPolitical Cartoon
Political Cartoon
Amy
 
ΟΔΗΓΙΕΣ ΔΙΔΑΣΚΑΛΙΑΣ ΤΗΣ ΒΙΟΛΟΓΙΑΣ Α ΛΥΚΕΙΟΥ 2011-12
ΟΔΗΓΙΕΣ ΔΙΔΑΣΚΑΛΙΑΣ ΤΗΣ ΒΙΟΛΟΓΙΑΣ Α ΛΥΚΕΙΟΥ 2011-12ΟΔΗΓΙΕΣ ΔΙΔΑΣΚΑΛΙΑΣ ΤΗΣ ΒΙΟΛΟΓΙΑΣ Α ΛΥΚΕΙΟΥ 2011-12
ΟΔΗΓΙΕΣ ΔΙΔΑΣΚΑΛΙΑΣ ΤΗΣ ΒΙΟΛΟΓΙΑΣ Α ΛΥΚΕΙΟΥ 2011-12
Christos Gotzaridis
 
Whatisa Trillion
Whatisa TrillionWhatisa Trillion
Whatisa Trillion
guest276365
 
Pres2 Evorium Sourcing
Pres2 Evorium SourcingPres2 Evorium Sourcing
Pres2 Evorium Sourcing
Ericb64
 
My Philosophy
My PhilosophyMy Philosophy
My Philosophy
SLOOI
 
Typical One Year Old
Typical One Year OldTypical One Year Old
Typical One Year Old
humangrowth
 
Permohonan sbp Ting 4
Permohonan sbp Ting 4Permohonan sbp Ting 4
Permohonan sbp Ting 4
SLOOI
 
Pictures For Music Magazine
Pictures For Music MagazinePictures For Music Magazine
Pictures For Music Magazine
benjo7
 
Ο ηλεκτρισμος στο σπιτι μας εκπαιδευτικο σεναριο
Ο ηλεκτρισμος στο σπιτι μας εκπαιδευτικο σεναριοΟ ηλεκτρισμος στο σπιτι μας εκπαιδευτικο σεναριο
Ο ηλεκτρισμος στο σπιτι μας εκπαιδευτικο σεναριο
Christos Gotzaridis
 
Fonts N Tht
Fonts N ThtFonts N Tht
Fonts N Tht
benjo7
 

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

eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introduction
vstorm83
 
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
timtow
 
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
elliando dias
 
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
kkorovkin
 

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

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
Manish 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

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Recently uploaded (20)

08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
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...
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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...
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 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
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
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
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

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