SlideShare une entreprise Scribd logo
1  sur  42
Télécharger pour lire hors ligne
Intro to Play Framework &	

Modern Java Web App Development
Josh Padnick	

Desert Code Camp 2013.2	

November 9, 2013
Today’sTalk
• Java Web App DevelopmentToday	

• Modern Web App Development	

• Meet Play Framework	

• Build Stuff!
• Founder & Chief Innovation Officer at Omedix	

• 10+ years of web app development	

• Special interest in scalable, enterprise, web-based
applications using Java & open source
Josh
 Padnick
Java Web App 	

DevelopmentToday
Challenges
 of^
Lots ofTime Waiting for Server Redeploys…
SOURCE FOR INSIGHT:The Play Framework at LinkedIn: Productivity and Performance at Scale byYevjeniy Brikman

http://www.youtube.com/watch?v=8z3h4Uv9YbE	

!
SOURCE FOR GRAPHIC: http://zeroturnaround.com/rebellabs/java-ee-productivity-report-2011/#redeploy_times
Long, Ugly Error Messages
SOURCE: FOR INSIGHT:The Play Framework at LinkedIn: Productivity and Performance at Scale byYevjeniy Brikman

http://www.youtube.com/watch?v=8z3h4Uv9YbE	

!
SOURCE FOR GRAPHIC: http://ptrthomas.wordpress.com/2006/06/06/java-call-stack-from-http-upto-jdbc-as-a-picture/	

MVC Action
AOP TX Proxy
Business Logic
DAO
Spring-Hibernate
Hibernate
JDBC
Spring WebFlow
Spring MVC
?xml version=1.0 encoding=UTF-8?
web-app version=2.5 xmlns=http://java.sun.com/xml/ns/javaee xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance
xsi:schemaLocation=http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd
!
servlet
servlet-namemvc/servlet-name
servlet-classorg.springframework.web.servlet.DispatcherServlet/servlet-class
!-- we'll use AnnotationConfigWebApplicationContext instead of the default XmlWebApplicationContext... --
init-param
param-namecontextClass/param-name
param-valueorg.springframework.web.context.support.AnnotationConfigWebApplicationContext/param-value
/init-param
!
!-- ... and tell it which class contains the configuration --
init-param
param-namecontextConfigLocation/param-name
param-valuecom.zt.helloWeb.init.WebappConfig/param-value
/init-param
!
load-on-startup1/load-on-startup
!
/servlet
!
servlet-mapping
servlet-namemvc/servlet-name
url-pattern//url-pattern
/servlet-mapping
!
welcome-file-list
welcome-file//welcome-file
/welcome-file-list
!
/web-app
DefaultServletHandler
Crazy XML Configuration
SOURCE FOR INSIGHT:The Play Framework at LinkedIn: Productivity and Performance at Scale byYevjeniy Brikman

http://www.youtube.com/watch?v=8z3h4Uv9YbE
Bean Failures
org.omg.CORBA.OBJECT_NOT_EXIST
SOURCE FOR GRAPHIC: Beginning Java EE 6 Platform with Glassfish 3 by Antonio Goncalves, Page 5.
X
Clunky Road to	

RESTful URLs
WEB.XML
servlet-mapping
servlet-namespringmvc/servlet-name
url-pattern/rest/*/url-pattern
/servlet-mapping
!
CONTROLLER.JAVA
@Controller
@RequestMapping(/people)
public class PeopleController {
!
@RequestMapping(“entrypoint/{collectionName}”, method=RequestMethod.GET)
public @ResponseBody String getPeople() {
return GsonFactory.getInstance().toJson(LookupDao.getInstance().getP
}
!
@RequestMapping(value={id}, method=RequestMethod.GET)
public @ResponseBody String getPerson(@PathVariable String id) {
return GsonFactory.getInstance().toJson(LookupDao.getInstance().getP
}
}
A Lot of Complexity!
I just want to write working software!
Is this the architecture we would create today?
The root of the problem
Impedance Mismatch between 	

HTTP and Java EE!
RESTful URLs vs. Java Servlets Spec
Impedance Mismatch
Stateless HTTP vs. Stateful EJBs
SOURCE: http://cscie12.dce.harvard.edu/lecture_notes/2011/20110504/handout.html 	

SOURCE: Beginning Java EE 6 Platform with Glassfish 3 by Antonio Goncalves, Page 206.	

Impedance Mismatch
Impedance Mismatch
Code  Refresh vs. WAR Deployment
Modern Web App Development
Buzzwords!
• HTML5  Javascript
• MVVM Frameworks
• Mobile
• NoSQL
• Real-Time
• Big Data
• Asynchronous
• Immutability
• Connected Devices
Reactive Software
http://www.ReactiveManifesto.org/
The Reactive Manifesto
“Application requirements have changed dramatically in recent years. Both
from a runtime environment perspective, with multicore and cloud computing
architectures nowadays being the norm, as well as from a user requirements
perspective, with tighter SLAs in terms of lower latency, higher throughput,
availability and close to linear scalability.This all demands writing applications in
a fundamentally different way than what most programmers are used to.”
SOURCE: http://typesafe.com/blog/why_do_we_need_a_reactive_manifesto
Jonas Bonér
Reactive Software
SOURCE: http://www.ReactiveManifesto.org/
Meet Play Framework
Goal: Performance + Productivity
Performance
Productivity
SOURCE: http://typesafe.com/blog/webinar-a-java-developers-primer-to-the-typesafe-platform
No More JEE Container
SOURCE: Play for Java by Nicolas Leroux and Sietse de Kaper
Focused on Developer Productivity
• Live code changes when you refresh the browser	

• More friendly error messages directly in browser	

• Type safety in the templates	

• Cool console  build tools
Designed for the Modern Web
• RESTful by default	

• Auto-compile LESS and CoffeeScript files	

• JSON is a first-class citizen	

• Websockets, other HTTP Streaming Support
Stateless and Built for Scale
• Forces every aspect of your app to be stateless	

• Non-Blocking I/O	

• Well-suited for real-time
What exactly is it, though?
SOURCE: Play for Java by Nicolas Leroux and Sietse de Kaper
What exactly is it, though?
Integrated HTTP Server	

JBoss Netty (Non-Blocking IO)
Concurrent, Distributed, Fault-Tolerant 	

Background Processing	

Akka
Build System 	

Console	

SBT
JavaVirtual Machine
Template Engine, HTTP Request/Response Processing, Integrated
Cache, RESTful Routing Engine,Asset Compilation,
Internationalization,TestingTools	

Play Framework
eBean / Anorm
BoneCP
H2 Database
Lots of libraries…
Of course, nothing’s perfect
1. You can mostly avoid Scala, but not completely

(of course, Scala itself is pretty cool)	

2. For advanced build logic, SBT has a steep learning curve	

3. Template system works well, but sometimes the functional
paradigm can feel awkward
Let’s around!
Intro Stuff
1. Download and install	

2. Play Console	

3. Controllers	

4. URL Routing	

5. Templates
Intro Stuff
1. Download and install
2. Play Console	

3. Controllers	

4. URL Routing	

5. Templates
Intro Stuff
1. Download and install	

2. Play Console
3. Controllers	

4. URL Routing	

5. Templates
Intro Stuff
1. Download and install	

2. Play Console	

3. Controllers
4. URL Routing	

5. Templates
Intro Stuff
1. Download and install	

2. Play Console	

3. Controllers	

4. URL Routing
5. Templates
Intro Stuff
1. Download and install	

2. Play Console	

3. Controllers	

4. URL Routing	

5. Templates
Let’s Build Something	

in theTime Remaining
So what did you like best today?
• We’ll take some votes and show the results real-time
Learning Play Framework
• I preferred the books to the documentation	

• For official documentation, best formatting is on
playframework.com. Latest content is on github

(https://github.com/playframework/playframework/tree/master/documentation/manual)	

• Community itself is pretty great	

• Google Group is great 	

• Lots of questions on Stack Overflow

Contenu connexe

Tendances

Opscode Webinar: Cooking with Chef on Microsoft Windows
Opscode Webinar: Cooking with Chef on Microsoft WindowsOpscode Webinar: Cooking with Chef on Microsoft Windows
Opscode Webinar: Cooking with Chef on Microsoft WindowsChef Software, Inc.
 
DCSF19 Transforming a 15+ Year Old Semiconductor Manufacturing Environment
DCSF19 Transforming a 15+ Year Old Semiconductor Manufacturing EnvironmentDCSF19 Transforming a 15+ Year Old Semiconductor Manufacturing Environment
DCSF19 Transforming a 15+ Year Old Semiconductor Manufacturing EnvironmentDocker, Inc.
 
Chef vs Puppet vs Ansible vs Saltstack | Configuration Management Tools | Dev...
Chef vs Puppet vs Ansible vs Saltstack | Configuration Management Tools | Dev...Chef vs Puppet vs Ansible vs Saltstack | Configuration Management Tools | Dev...
Chef vs Puppet vs Ansible vs Saltstack | Configuration Management Tools | Dev...Simplilearn
 
Velocity2011 chef-workshop
Velocity2011 chef-workshopVelocity2011 chef-workshop
Velocity2011 chef-workshopjtimberman
 
Infrastructure Automation with Chef
Infrastructure Automation with ChefInfrastructure Automation with Chef
Infrastructure Automation with ChefJonathan Weiss
 
Distributed automation sel_conf_2015
Distributed automation sel_conf_2015Distributed automation sel_conf_2015
Distributed automation sel_conf_2015aragavan
 
Opscode Webinar: Managing Your VMware Infrastructure with Chef
Opscode Webinar: Managing Your VMware Infrastructure with ChefOpscode Webinar: Managing Your VMware Infrastructure with Chef
Opscode Webinar: Managing Your VMware Infrastructure with ChefChef Software, Inc.
 
Introduction to Chef - April 22 2015
Introduction to Chef - April 22 2015Introduction to Chef - April 22 2015
Introduction to Chef - April 22 2015Jennifer Davis
 
Introduction to Chef - Techsuperwomen Summit
Introduction to Chef - Techsuperwomen SummitIntroduction to Chef - Techsuperwomen Summit
Introduction to Chef - Techsuperwomen SummitJennifer Davis
 
Introduction to Chef: Automate Your Infrastructure by Modeling It In Code
Introduction to Chef: Automate Your Infrastructure by Modeling It In CodeIntroduction to Chef: Automate Your Infrastructure by Modeling It In Code
Introduction to Chef: Automate Your Infrastructure by Modeling It In CodeJosh Padnick
 
Full stack development with node and NoSQL - All Things Open - October 2017
Full stack development with node and NoSQL - All Things Open - October 2017Full stack development with node and NoSQL - All Things Open - October 2017
Full stack development with node and NoSQL - All Things Open - October 2017Matthew Groves
 
SF DevOps: Introducing Vagrant
SF DevOps: Introducing VagrantSF DevOps: Introducing Vagrant
SF DevOps: Introducing VagrantMitchell Hashimoto
 
Server Installation and Configuration with Chef
Server Installation and Configuration with ChefServer Installation and Configuration with Chef
Server Installation and Configuration with ChefRaimonds Simanovskis
 
Chef Actions: Delightful near real-time activity tracking!
Chef Actions: Delightful near real-time activity tracking!Chef Actions: Delightful near real-time activity tracking!
Chef Actions: Delightful near real-time activity tracking!James Casey
 
To Build My Own Cloud with Blackjack…
To Build My Own Cloud with Blackjack…To Build My Own Cloud with Blackjack…
To Build My Own Cloud with Blackjack…Sergey Dzyuban
 
Overview of chef ( Infrastructure as a Code )
Overview of chef ( Infrastructure as a Code )Overview of chef ( Infrastructure as a Code )
Overview of chef ( Infrastructure as a Code )Pravin Mishra
 
Chef-Zero & Local Mode
Chef-Zero & Local ModeChef-Zero & Local Mode
Chef-Zero & Local ModeMichael Goetz
 
Overview of Chef - Fundamentals Webinar Series Part 1
Overview of Chef - Fundamentals Webinar Series Part 1Overview of Chef - Fundamentals Webinar Series Part 1
Overview of Chef - Fundamentals Webinar Series Part 1Chef
 
Infrastructure as code
Infrastructure as codeInfrastructure as code
Infrastructure as codeAxel Quack
 

Tendances (20)

Opscode Webinar: Cooking with Chef on Microsoft Windows
Opscode Webinar: Cooking with Chef on Microsoft WindowsOpscode Webinar: Cooking with Chef on Microsoft Windows
Opscode Webinar: Cooking with Chef on Microsoft Windows
 
DCSF19 Transforming a 15+ Year Old Semiconductor Manufacturing Environment
DCSF19 Transforming a 15+ Year Old Semiconductor Manufacturing EnvironmentDCSF19 Transforming a 15+ Year Old Semiconductor Manufacturing Environment
DCSF19 Transforming a 15+ Year Old Semiconductor Manufacturing Environment
 
Chef vs Puppet vs Ansible vs Saltstack | Configuration Management Tools | Dev...
Chef vs Puppet vs Ansible vs Saltstack | Configuration Management Tools | Dev...Chef vs Puppet vs Ansible vs Saltstack | Configuration Management Tools | Dev...
Chef vs Puppet vs Ansible vs Saltstack | Configuration Management Tools | Dev...
 
Velocity2011 chef-workshop
Velocity2011 chef-workshopVelocity2011 chef-workshop
Velocity2011 chef-workshop
 
Infrastructure Automation with Chef
Infrastructure Automation with ChefInfrastructure Automation with Chef
Infrastructure Automation with Chef
 
Distributed automation sel_conf_2015
Distributed automation sel_conf_2015Distributed automation sel_conf_2015
Distributed automation sel_conf_2015
 
Opscode Webinar: Managing Your VMware Infrastructure with Chef
Opscode Webinar: Managing Your VMware Infrastructure with ChefOpscode Webinar: Managing Your VMware Infrastructure with Chef
Opscode Webinar: Managing Your VMware Infrastructure with Chef
 
Learning chef
Learning chefLearning chef
Learning chef
 
Introduction to Chef - April 22 2015
Introduction to Chef - April 22 2015Introduction to Chef - April 22 2015
Introduction to Chef - April 22 2015
 
Introduction to Chef - Techsuperwomen Summit
Introduction to Chef - Techsuperwomen SummitIntroduction to Chef - Techsuperwomen Summit
Introduction to Chef - Techsuperwomen Summit
 
Introduction to Chef: Automate Your Infrastructure by Modeling It In Code
Introduction to Chef: Automate Your Infrastructure by Modeling It In CodeIntroduction to Chef: Automate Your Infrastructure by Modeling It In Code
Introduction to Chef: Automate Your Infrastructure by Modeling It In Code
 
Full stack development with node and NoSQL - All Things Open - October 2017
Full stack development with node and NoSQL - All Things Open - October 2017Full stack development with node and NoSQL - All Things Open - October 2017
Full stack development with node and NoSQL - All Things Open - October 2017
 
SF DevOps: Introducing Vagrant
SF DevOps: Introducing VagrantSF DevOps: Introducing Vagrant
SF DevOps: Introducing Vagrant
 
Server Installation and Configuration with Chef
Server Installation and Configuration with ChefServer Installation and Configuration with Chef
Server Installation and Configuration with Chef
 
Chef Actions: Delightful near real-time activity tracking!
Chef Actions: Delightful near real-time activity tracking!Chef Actions: Delightful near real-time activity tracking!
Chef Actions: Delightful near real-time activity tracking!
 
To Build My Own Cloud with Blackjack…
To Build My Own Cloud with Blackjack…To Build My Own Cloud with Blackjack…
To Build My Own Cloud with Blackjack…
 
Overview of chef ( Infrastructure as a Code )
Overview of chef ( Infrastructure as a Code )Overview of chef ( Infrastructure as a Code )
Overview of chef ( Infrastructure as a Code )
 
Chef-Zero & Local Mode
Chef-Zero & Local ModeChef-Zero & Local Mode
Chef-Zero & Local Mode
 
Overview of Chef - Fundamentals Webinar Series Part 1
Overview of Chef - Fundamentals Webinar Series Part 1Overview of Chef - Fundamentals Webinar Series Part 1
Overview of Chef - Fundamentals Webinar Series Part 1
 
Infrastructure as code
Infrastructure as codeInfrastructure as code
Infrastructure as code
 

Similaire à Intro to Modern Java Web Development with Play Framework

Java Coaching in Hyderabad introduction
Java Coaching in Hyderabad  introductionJava Coaching in Hyderabad  introduction
Java Coaching in Hyderabad introductionAzure Data Factory
 
AngularJS - Architecture decisions in a large project 
AngularJS - Architecture decisionsin a large project AngularJS - Architecture decisionsin a large project 
AngularJS - Architecture decisions in a large project Elad Hirsch
 
Decoupled Architecture and WordPress
Decoupled Architecture and WordPressDecoupled Architecture and WordPress
Decoupled Architecture and WordPressPantheon
 
Netbeans65 Osum Slides
Netbeans65 Osum SlidesNetbeans65 Osum Slides
Netbeans65 Osum SlidesAbhishek Gupta
 
Modern Web Framework : Play framework
Modern Web Framework : Play frameworkModern Web Framework : Play framework
Modern Web Framework : Play frameworkSuman Adak
 
December 4 SDForum Java Sig Presentation
December 4 SDForum Java Sig PresentationDecember 4 SDForum Java Sig Presentation
December 4 SDForum Java Sig PresentationJonathan Abrams
 
Curriculum vitae of nguyen hai quy
Curriculum vitae of nguyen hai quyCurriculum vitae of nguyen hai quy
Curriculum vitae of nguyen hai quyHai Quy Nguyen
 
Java EE 7 Soup to Nuts at JavaOne 2014
Java EE 7 Soup to Nuts at JavaOne 2014Java EE 7 Soup to Nuts at JavaOne 2014
Java EE 7 Soup to Nuts at JavaOne 2014Arun Gupta
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applicationshchen1
 
Play Framework: The Basics
Play Framework: The BasicsPlay Framework: The Basics
Play Framework: The BasicsPhilip Langer
 
Building Rich Applications with Appcelerator
Building Rich Applications with AppceleratorBuilding Rich Applications with Appcelerator
Building Rich Applications with AppceleratorMatt Raible
 
Follow these reasons to know java’s importance
Follow these reasons to know java’s importanceFollow these reasons to know java’s importance
Follow these reasons to know java’s importancenishajj
 
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
 
Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015Bluegrass Digital
 
What is Mean Stack Development ?
What is Mean Stack Development ?What is Mean Stack Development ?
What is Mean Stack Development ?Balajihope
 
The State of Java under Oracle at JCertif 2011
The State of Java under Oracle at JCertif 2011The State of Java under Oracle at JCertif 2011
The State of Java under Oracle at JCertif 2011Arun Gupta
 
Open Innovation means Open Source
Open Innovation means Open SourceOpen Innovation means Open Source
Open Innovation means Open SourceBertrand Delacretaz
 
React.js alternatives modern web frameworks and lightweight java script libr...
React.js alternatives  modern web frameworks and lightweight java script libr...React.js alternatives  modern web frameworks and lightweight java script libr...
React.js alternatives modern web frameworks and lightweight java script libr...Katy Slemon
 

Similaire à Intro to Modern Java Web Development with Play Framework (20)

Java Coaching in Hyderabad introduction
Java Coaching in Hyderabad  introductionJava Coaching in Hyderabad  introduction
Java Coaching in Hyderabad introduction
 
AngularJS - Architecture decisions in a large project 
AngularJS - Architecture decisionsin a large project AngularJS - Architecture decisionsin a large project 
AngularJS - Architecture decisions in a large project 
 
Decoupled Architecture and WordPress
Decoupled Architecture and WordPressDecoupled Architecture and WordPress
Decoupled Architecture and WordPress
 
Netbeans65 Osum Slides
Netbeans65 Osum SlidesNetbeans65 Osum Slides
Netbeans65 Osum Slides
 
Modern Web Framework : Play framework
Modern Web Framework : Play frameworkModern Web Framework : Play framework
Modern Web Framework : Play framework
 
December 4 SDForum Java Sig Presentation
December 4 SDForum Java Sig PresentationDecember 4 SDForum Java Sig Presentation
December 4 SDForum Java Sig Presentation
 
Frameworks in java
Frameworks in javaFrameworks in java
Frameworks in java
 
Curriculum vitae of nguyen hai quy
Curriculum vitae of nguyen hai quyCurriculum vitae of nguyen hai quy
Curriculum vitae of nguyen hai quy
 
Java EE 7 Soup to Nuts at JavaOne 2014
Java EE 7 Soup to Nuts at JavaOne 2014Java EE 7 Soup to Nuts at JavaOne 2014
Java EE 7 Soup to Nuts at JavaOne 2014
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applications
 
Play Framework: The Basics
Play Framework: The BasicsPlay Framework: The Basics
Play Framework: The Basics
 
Building Rich Applications with Appcelerator
Building Rich Applications with AppceleratorBuilding Rich Applications with Appcelerator
Building Rich Applications with Appcelerator
 
Follow these reasons to know java’s importance
Follow these reasons to know java’s importanceFollow these reasons to know java’s importance
Follow these reasons to know java’s importance
 
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
 
Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015Best of Microsoft Dev Camp 2015
Best of Microsoft Dev Camp 2015
 
What is Mean Stack Development ?
What is Mean Stack Development ?What is Mean Stack Development ?
What is Mean Stack Development ?
 
The State of Java under Oracle at JCertif 2011
The State of Java under Oracle at JCertif 2011The State of Java under Oracle at JCertif 2011
The State of Java under Oracle at JCertif 2011
 
Open Innovation means Open Source
Open Innovation means Open SourceOpen Innovation means Open Source
Open Innovation means Open Source
 
NodeJS and what is actually does
NodeJS and what is actually doesNodeJS and what is actually does
NodeJS and what is actually does
 
React.js alternatives modern web frameworks and lightweight java script libr...
React.js alternatives  modern web frameworks and lightweight java script libr...React.js alternatives  modern web frameworks and lightweight java script libr...
React.js alternatives modern web frameworks and lightweight java script libr...
 

Dernier

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 

Dernier (20)

TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 

Intro to Modern Java Web Development with Play Framework

  • 1. Intro to Play Framework & Modern Java Web App Development Josh Padnick Desert Code Camp 2013.2 November 9, 2013
  • 2. Today’sTalk • Java Web App DevelopmentToday • Modern Web App Development • Meet Play Framework • Build Stuff!
  • 3. • Founder & Chief Innovation Officer at Omedix • 10+ years of web app development • Special interest in scalable, enterprise, web-based applications using Java & open source Josh
  • 5. Java Web App DevelopmentToday Challenges
  • 7. Lots ofTime Waiting for Server Redeploys… SOURCE FOR INSIGHT:The Play Framework at LinkedIn: Productivity and Performance at Scale byYevjeniy Brikman
 http://www.youtube.com/watch?v=8z3h4Uv9YbE ! SOURCE FOR GRAPHIC: http://zeroturnaround.com/rebellabs/java-ee-productivity-report-2011/#redeploy_times
  • 8. Long, Ugly Error Messages SOURCE: FOR INSIGHT:The Play Framework at LinkedIn: Productivity and Performance at Scale byYevjeniy Brikman
 http://www.youtube.com/watch?v=8z3h4Uv9YbE ! SOURCE FOR GRAPHIC: http://ptrthomas.wordpress.com/2006/06/06/java-call-stack-from-http-upto-jdbc-as-a-picture/ MVC Action AOP TX Proxy Business Logic DAO Spring-Hibernate Hibernate JDBC Spring WebFlow Spring MVC
  • 9. ?xml version=1.0 encoding=UTF-8? web-app version=2.5 xmlns=http://java.sun.com/xml/ns/javaee xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xsi:schemaLocation=http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd ! servlet servlet-namemvc/servlet-name servlet-classorg.springframework.web.servlet.DispatcherServlet/servlet-class !-- we'll use AnnotationConfigWebApplicationContext instead of the default XmlWebApplicationContext... -- init-param param-namecontextClass/param-name param-valueorg.springframework.web.context.support.AnnotationConfigWebApplicationContext/param-value /init-param ! !-- ... and tell it which class contains the configuration -- init-param param-namecontextConfigLocation/param-name param-valuecom.zt.helloWeb.init.WebappConfig/param-value /init-param ! load-on-startup1/load-on-startup ! /servlet ! servlet-mapping servlet-namemvc/servlet-name url-pattern//url-pattern /servlet-mapping ! welcome-file-list welcome-file//welcome-file /welcome-file-list ! /web-app DefaultServletHandler Crazy XML Configuration SOURCE FOR INSIGHT:The Play Framework at LinkedIn: Productivity and Performance at Scale byYevjeniy Brikman
 http://www.youtube.com/watch?v=8z3h4Uv9YbE
  • 10. Bean Failures org.omg.CORBA.OBJECT_NOT_EXIST SOURCE FOR GRAPHIC: Beginning Java EE 6 Platform with Glassfish 3 by Antonio Goncalves, Page 5. X
  • 11. Clunky Road to RESTful URLs WEB.XML servlet-mapping servlet-namespringmvc/servlet-name url-pattern/rest/*/url-pattern /servlet-mapping ! CONTROLLER.JAVA @Controller @RequestMapping(/people) public class PeopleController { ! @RequestMapping(“entrypoint/{collectionName}”, method=RequestMethod.GET) public @ResponseBody String getPeople() { return GsonFactory.getInstance().toJson(LookupDao.getInstance().getP } ! @RequestMapping(value={id}, method=RequestMethod.GET) public @ResponseBody String getPerson(@PathVariable String id) { return GsonFactory.getInstance().toJson(LookupDao.getInstance().getP } }
  • 12. A Lot of Complexity!
  • 13. I just want to write working software!
  • 14. Is this the architecture we would create today?
  • 15. The root of the problem Impedance Mismatch between HTTP and Java EE!
  • 16. RESTful URLs vs. Java Servlets Spec Impedance Mismatch
  • 17. Stateless HTTP vs. Stateful EJBs SOURCE: http://cscie12.dce.harvard.edu/lecture_notes/2011/20110504/handout.html SOURCE: Beginning Java EE 6 Platform with Glassfish 3 by Antonio Goncalves, Page 206. Impedance Mismatch
  • 18. Impedance Mismatch Code Refresh vs. WAR Deployment
  • 19. Modern Web App Development
  • 20. Buzzwords! • HTML5 Javascript • MVVM Frameworks • Mobile • NoSQL • Real-Time • Big Data • Asynchronous • Immutability • Connected Devices
  • 22. The Reactive Manifesto “Application requirements have changed dramatically in recent years. Both from a runtime environment perspective, with multicore and cloud computing architectures nowadays being the norm, as well as from a user requirements perspective, with tighter SLAs in terms of lower latency, higher throughput, availability and close to linear scalability.This all demands writing applications in a fundamentally different way than what most programmers are used to.” SOURCE: http://typesafe.com/blog/why_do_we_need_a_reactive_manifesto Jonas Bonér
  • 25. Goal: Performance + Productivity Performance Productivity SOURCE: http://typesafe.com/blog/webinar-a-java-developers-primer-to-the-typesafe-platform
  • 26. No More JEE Container SOURCE: Play for Java by Nicolas Leroux and Sietse de Kaper
  • 27. Focused on Developer Productivity • Live code changes when you refresh the browser • More friendly error messages directly in browser • Type safety in the templates • Cool console build tools
  • 28. Designed for the Modern Web • RESTful by default • Auto-compile LESS and CoffeeScript files • JSON is a first-class citizen • Websockets, other HTTP Streaming Support
  • 29. Stateless and Built for Scale • Forces every aspect of your app to be stateless • Non-Blocking I/O • Well-suited for real-time
  • 30. What exactly is it, though? SOURCE: Play for Java by Nicolas Leroux and Sietse de Kaper
  • 31. What exactly is it, though? Integrated HTTP Server JBoss Netty (Non-Blocking IO) Concurrent, Distributed, Fault-Tolerant Background Processing Akka Build System Console SBT JavaVirtual Machine Template Engine, HTTP Request/Response Processing, Integrated Cache, RESTful Routing Engine,Asset Compilation, Internationalization,TestingTools Play Framework eBean / Anorm BoneCP H2 Database Lots of libraries…
  • 32. Of course, nothing’s perfect 1. You can mostly avoid Scala, but not completely
 (of course, Scala itself is pretty cool) 2. For advanced build logic, SBT has a steep learning curve 3. Template system works well, but sometimes the functional paradigm can feel awkward
  • 34. Intro Stuff 1. Download and install 2. Play Console 3. Controllers 4. URL Routing 5. Templates
  • 35. Intro Stuff 1. Download and install 2. Play Console 3. Controllers 4. URL Routing 5. Templates
  • 36. Intro Stuff 1. Download and install 2. Play Console 3. Controllers 4. URL Routing 5. Templates
  • 37. Intro Stuff 1. Download and install 2. Play Console 3. Controllers 4. URL Routing 5. Templates
  • 38. Intro Stuff 1. Download and install 2. Play Console 3. Controllers 4. URL Routing 5. Templates
  • 39. Intro Stuff 1. Download and install 2. Play Console 3. Controllers 4. URL Routing 5. Templates
  • 40. Let’s Build Something in theTime Remaining
  • 41. So what did you like best today? • We’ll take some votes and show the results real-time
  • 42. Learning Play Framework • I preferred the books to the documentation • For official documentation, best formatting is on playframework.com. Latest content is on github
 (https://github.com/playframework/playframework/tree/master/documentation/manual) • Community itself is pretty great • Google Group is great • Lots of questions on Stack Overflow
  • 44. QA