SlideShare ist ein Scribd-Unternehmen logo
1 von 76
Play! Framework
with Robin Warren
What’s in this presentation
1. Why you may want to use the Play!
Framework
2. Overview of building a small app
3. Some other bits and bobs
What’s not in
1. A lot of Play 2
2. Funny jokes
Coming up
● How I came to Play!
● Getting started
● Building our first app
● More stuff
● A bit more stuff (in less detail)
● Building larger apps in Play!
● Play 2 vs Play 1
Coming up
● How I came to Play!
● Getting started
● Building our first app
● More stuff
● A bit more stuff (in less detail)
● Building larger apps in Play!
● Play 2 vs Play 1
Firstly...
How I came to the Play Framework
At Covalent Software until December last year
Covalent 3 years ago
How I came to Play!
● Large existing code base
● Development team of 15
● Existing active user base
● Time pressure (as always)
● + Opportunity to adopt some better tech
The options
The criteria
1. Community
2. Used in production
3. MVC
4. Ease of development
5. Bonus - no XML, no GWT style
magic
The short list
Coming up
● How I came to Play!
● Getting started
● Building our first app
● More stuff
● A bit more stuff (in less detail)
● Building larger apps in Play!
● Play 2 vs Play 1
How to Play!
Download
Extract
Create a project
Eclipsify (or netbeansify, or idealize) your project
Run your project
To the browser!
What have we got so far
app - MVC
configuration
application.conf
routes
Coming up
● How I came to Play!
● Getting started
● Building our first app
● More stuff
● A bit more stuff (in less detail)
● Building larger apps in Play!
● Play 2 vs Play 1
Let’s make some changes
We will build a tool to help our new clients...
...The underpants gnomes
A detailed spec
The basics
1. Show list of known underpants locations
2. Ability to add underpants location
3. Ability to mark underpants as collected
Model
Controller
View
main.html
The basics
1. Show list of known underpants locations
2. Ability to add underpants location
3. Ability to mark underpants as collected
Controller changes
View changes
Nearly done for v1
The basics
1. Show list of known underpants locations
2. Ability to add underpants location
3. Ability to mark underpants as collected
Additions and refactoring
New controller
New view
Done!
The basics
1. Show list of known underpants locations
2. Ability to add underpants location
3. Ability to mark underpants as collected
Coming up
● How I came to Play!
● Getting started
● Building our first app
● More stuff
● A bit more stuff (in less detail)
● Building larger apps in Play!
● Play 2 vs Play 1
Some useful additions
More stuff
1. Jobs
2. Controller inheritance and @Before methods
3. Tags
4. Testing
Some useful additions
More stuff
1. Jobs
2. Controller inheritance and @Before methods
3. Tags
4. Testing
Jobs
Used for
1. Background tasks
2. Doing work asynchronously in controllers
Background tasks
Asynchronous work in controllers
Controller inheritance and @Before methods
Tags
Tags can be
● Templates (html, js, whatevs)
● Java FastTag subclass
Let’s create a profitable tag for the main view...
Tags
Tags
Some useful additions
More stuff
1. Jobs
2. Controller inheritance and @Before methods
3. Tags
4. Testing
Testing
Unit test
Functional test
Selenium test
Test data
Coming up
● How I came to Play!
● Getting started
● Building our first app
● More stuff
● A bit more stuff (in less detail)
● Building larger apps in Play!
● Play 2 vs Play 1
Even more useful additions
A more stuff (in less detail)
1. Validation
2. Built in tags and Java extensions
3. Modules
Adding some validation
Built in tags and extensions
Modules
Coming up
● How I came to Play!
● Getting started
● Building our first app
● More stuff
● A bit more stuff (in less detail)
● Building larger apps in Play!
● Play 2 vs Play 1
Larger apps with Play
Some thoughts...
Larger apps with Play!
1. Decompose controllers early
2. No catch all routes (remove magic)
3. Split app up into modules
4. Don’t use their selenium tag (unless you know
better?) or the headless browser
Decompose Controllers early
Decompose Controllers early
No catch all routes
Split app up into modules
Don’t use their selenium tag or headless browser
Coming up
● How I came to Play!
● Getting started
● Building our first app
● More stuff
● A bit more stuff (in less detail)
● Building larger apps in Play!
● Play 2 vs Play 1
Play 2 vs Play 1
Most relevant for developers
1. Templates: Scala (from Groovy)
2. Less magic (aka bytecode generation etc.)
3. EBean instead of hibernate
4. bindFromRequest()
5. Asset directory - makes it easy to work with
coffeescript etc.
fin
fin
twitter: @robinwarren
linkedIn: https://www.linkedin.com/in/robinwarren

Weitere ähnliche Inhalte

Was ist angesagt?

Building plugins like a pro
Building plugins like a proBuilding plugins like a pro
Building plugins like a proMarko Heijnen
 
How I built web services in CakePHP
How I built web services in CakePHPHow I built web services in CakePHP
How I built web services in CakePHPDavid Yell
 
Build and Deploy a Python Web App to Amazon in 30 Mins
Build and Deploy a Python Web App to Amazon in 30 MinsBuild and Deploy a Python Web App to Amazon in 30 Mins
Build and Deploy a Python Web App to Amazon in 30 MinsJeff Hull
 
Django Deployer
Django DeployerDjango Deployer
Django DeployerColin Su
 
PHP Berkshire October 2015
PHP Berkshire October 2015PHP Berkshire October 2015
PHP Berkshire October 2015David Yell
 
Python id meetup, Maintaining a Dirty Code Django Project
Python id meetup, Maintaining a Dirty Code Django ProjectPython id meetup, Maintaining a Dirty Code Django Project
Python id meetup, Maintaining a Dirty Code Django ProjectIkhsan Noor Rosyidin
 
Ninja Productivity in Android Studio
Ninja Productivity in Android StudioNinja Productivity in Android Studio
Ninja Productivity in Android StudioRamon Ribeiro Rabello
 
Bootstrapping your plugin
Bootstrapping your pluginBootstrapping your plugin
Bootstrapping your pluginMarko Heijnen
 
NativeScript 環境のインストールとはじめてのプロジェクト実行
NativeScript 環境のインストールとはじめてのプロジェクト実行NativeScript 環境のインストールとはじめてのプロジェクト実行
NativeScript 環境のインストールとはじめてのプロジェクト実行Osamu Monoe
 
Fitur Terbaru Flutter di Tahun 2021 - Widyarso Joko Purnomo
Fitur Terbaru Flutter di Tahun 2021 - Widyarso Joko PurnomoFitur Terbaru Flutter di Tahun 2021 - Widyarso Joko Purnomo
Fitur Terbaru Flutter di Tahun 2021 - Widyarso Joko PurnomoDicodingEvent
 
Google App Engine Developer - Day1
Google App Engine Developer - Day1Google App Engine Developer - Day1
Google App Engine Developer - Day1Simon Su
 
45 Tools to Boost Your Front-End
45 Tools to Boost Your Front-End45 Tools to Boost Your Front-End
45 Tools to Boost Your Front-EndNicolas PENNEC
 
Xdebug for Beginners
Xdebug for BeginnersXdebug for Beginners
Xdebug for BeginnersSean Prunka
 
如何透過 Golang 與 Heroku 來一鍵部署 臉書機器人與 Line Bot
如何透過 Golang 與 Heroku 來一鍵部署 臉書機器人與 Line Bot如何透過 Golang 與 Heroku 來一鍵部署 臉書機器人與 Line Bot
如何透過 Golang 與 Heroku 來一鍵部署 臉書機器人與 Line BotEvan Lin
 
Writing code well: tools, tips and tricks
Writing code well: tools, tips and tricks Writing code well: tools, tips and tricks
Writing code well: tools, tips and tricks FogGuru MSCA Project
 
What is munit and how to create your first unit test
What is munit and how to create your first unit testWhat is munit and how to create your first unit test
What is munit and how to create your first unit testAlexandra N. Martinez
 
Whatsmeteor a whatsApp like Chat App writen in Meteorjs
Whatsmeteor a whatsApp like Chat App writen in MeteorjsWhatsmeteor a whatsApp like Chat App writen in Meteorjs
Whatsmeteor a whatsApp like Chat App writen in MeteorjsMichael Lazarski
 

Was ist angesagt? (20)

Building plugins like a pro
Building plugins like a proBuilding plugins like a pro
Building plugins like a pro
 
Flutter introduction
Flutter introductionFlutter introduction
Flutter introduction
 
How I built web services in CakePHP
How I built web services in CakePHPHow I built web services in CakePHP
How I built web services in CakePHP
 
Build and Deploy a Python Web App to Amazon in 30 Mins
Build and Deploy a Python Web App to Amazon in 30 MinsBuild and Deploy a Python Web App to Amazon in 30 Mins
Build and Deploy a Python Web App to Amazon in 30 Mins
 
Django Deployer
Django DeployerDjango Deployer
Django Deployer
 
PHP Berkshire October 2015
PHP Berkshire October 2015PHP Berkshire October 2015
PHP Berkshire October 2015
 
Python id meetup, Maintaining a Dirty Code Django Project
Python id meetup, Maintaining a Dirty Code Django ProjectPython id meetup, Maintaining a Dirty Code Django Project
Python id meetup, Maintaining a Dirty Code Django Project
 
Ninja Productivity in Android Studio
Ninja Productivity in Android StudioNinja Productivity in Android Studio
Ninja Productivity in Android Studio
 
Bootstrapping your plugin
Bootstrapping your pluginBootstrapping your plugin
Bootstrapping your plugin
 
NativeScript 環境のインストールとはじめてのプロジェクト実行
NativeScript 環境のインストールとはじめてのプロジェクト実行NativeScript 環境のインストールとはじめてのプロジェクト実行
NativeScript 環境のインストールとはじめてのプロジェクト実行
 
Presentasi jlp
Presentasi jlpPresentasi jlp
Presentasi jlp
 
Fitur Terbaru Flutter di Tahun 2021 - Widyarso Joko Purnomo
Fitur Terbaru Flutter di Tahun 2021 - Widyarso Joko PurnomoFitur Terbaru Flutter di Tahun 2021 - Widyarso Joko Purnomo
Fitur Terbaru Flutter di Tahun 2021 - Widyarso Joko Purnomo
 
Google App Engine Developer - Day1
Google App Engine Developer - Day1Google App Engine Developer - Day1
Google App Engine Developer - Day1
 
45 Tools to Boost Your Front-End
45 Tools to Boost Your Front-End45 Tools to Boost Your Front-End
45 Tools to Boost Your Front-End
 
Xdebug for Beginners
Xdebug for BeginnersXdebug for Beginners
Xdebug for Beginners
 
如何透過 Golang 與 Heroku 來一鍵部署 臉書機器人與 Line Bot
如何透過 Golang 與 Heroku 來一鍵部署 臉書機器人與 Line Bot如何透過 Golang 與 Heroku 來一鍵部署 臉書機器人與 Line Bot
如何透過 Golang 與 Heroku 來一鍵部署 臉書機器人與 Line Bot
 
Writing code well: tools, tips and tricks
Writing code well: tools, tips and tricks Writing code well: tools, tips and tricks
Writing code well: tools, tips and tricks
 
What is munit and how to create your first unit test
What is munit and how to create your first unit testWhat is munit and how to create your first unit test
What is munit and how to create your first unit test
 
Flutter
Flutter Flutter
Flutter
 
Whatsmeteor a whatsApp like Chat App writen in Meteorjs
Whatsmeteor a whatsApp like Chat App writen in MeteorjsWhatsmeteor a whatsApp like Chat App writen in Meteorjs
Whatsmeteor a whatsApp like Chat App writen in Meteorjs
 

Ähnlich wie Play framework - Bristol Java meetup

Black Ops Testing Workshop from Agile Testing Days 2014
Black Ops Testing Workshop from Agile Testing Days 2014Black Ops Testing Workshop from Agile Testing Days 2014
Black Ops Testing Workshop from Agile Testing Days 2014Alan Richardson
 
“One man” development process model
“One man” development process model“One man” development process model
“One man” development process modelSilicon Straits
 
Fun with Jenkins & Salesforce
Fun with Jenkins & SalesforceFun with Jenkins & Salesforce
Fun with Jenkins & SalesforceAbhinav Gupta
 
Product development and tools
Product development and toolsProduct development and tools
Product development and toolsroelofr
 
"Product Architecture: failures and lessons learnt" - Royi Benyossef @Product...
"Product Architecture: failures and lessons learnt" - Royi Benyossef @Product..."Product Architecture: failures and lessons learnt" - Royi Benyossef @Product...
"Product Architecture: failures and lessons learnt" - Royi Benyossef @Product...Product of Things
 
Bulletproof design systems using storybook
Bulletproof design systems using storybookBulletproof design systems using storybook
Bulletproof design systems using storybookChen Feldman
 
Preparing for the WebGeek DevCup
Preparing for the WebGeek DevCupPreparing for the WebGeek DevCup
Preparing for the WebGeek DevCupbryanbibat
 
Betty Blocks On Stage 2018: The Roadmap
Betty Blocks On Stage 2018: The RoadmapBetty Blocks On Stage 2018: The Roadmap
Betty Blocks On Stage 2018: The RoadmapBetty Blocks
 
Stanislav Khorunzhyi, "Front-end it like a PRO"
Stanislav Khorunzhyi, "Front-end it like a PRO"Stanislav Khorunzhyi, "Front-end it like a PRO"
Stanislav Khorunzhyi, "Front-end it like a PRO"Sigma Software
 
Creating truly player-centric games - how we do it at Kolibri Games?
Creating truly player-centric games - how we do it at Kolibri Games?Creating truly player-centric games - how we do it at Kolibri Games?
Creating truly player-centric games - how we do it at Kolibri Games?GameCamp
 
Beginner Workshop for Student Developers - Tratech-presentation.pdf
Beginner Workshop for Student Developers - Tratech-presentation.pdfBeginner Workshop for Student Developers - Tratech-presentation.pdf
Beginner Workshop for Student Developers - Tratech-presentation.pdfGDSCKNUST
 
Android study jams info session 2021 new GDSC GECBSP
Android study jams info session 2021 new GDSC GECBSPAndroid study jams info session 2021 new GDSC GECBSP
Android study jams info session 2021 new GDSC GECBSPDomendra Sahu
 
Django simplified : by weever mbakaya
Django simplified : by weever mbakayaDjango simplified : by weever mbakaya
Django simplified : by weever mbakayaMbakaya Kwatukha
 
PuppetConf 2016: How Not to Freak Out When You Start Writing Puppet Modules f...
PuppetConf 2016: How Not to Freak Out When You Start Writing Puppet Modules f...PuppetConf 2016: How Not to Freak Out When You Start Writing Puppet Modules f...
PuppetConf 2016: How Not to Freak Out When You Start Writing Puppet Modules f...Puppet
 
Application Development Using Java - DIYComputerScience Course
Application Development Using Java - DIYComputerScience CourseApplication Development Using Java - DIYComputerScience Course
Application Development Using Java - DIYComputerScience Courseparag
 

Ähnlich wie Play framework - Bristol Java meetup (20)

Front-End Tooling
Front-End ToolingFront-End Tooling
Front-End Tooling
 
Black Ops Testing Workshop from Agile Testing Days 2014
Black Ops Testing Workshop from Agile Testing Days 2014Black Ops Testing Workshop from Agile Testing Days 2014
Black Ops Testing Workshop from Agile Testing Days 2014
 
“One man” development process model
“One man” development process model“One man” development process model
“One man” development process model
 
Fun with Jenkins & Salesforce
Fun with Jenkins & SalesforceFun with Jenkins & Salesforce
Fun with Jenkins & Salesforce
 
Product development and tools
Product development and toolsProduct development and tools
Product development and tools
 
"Product Architecture: failures and lessons learnt" - Royi Benyossef @Product...
"Product Architecture: failures and lessons learnt" - Royi Benyossef @Product..."Product Architecture: failures and lessons learnt" - Royi Benyossef @Product...
"Product Architecture: failures and lessons learnt" - Royi Benyossef @Product...
 
Bulletproof design systems using storybook
Bulletproof design systems using storybookBulletproof design systems using storybook
Bulletproof design systems using storybook
 
Preparing for the WebGeek DevCup
Preparing for the WebGeek DevCupPreparing for the WebGeek DevCup
Preparing for the WebGeek DevCup
 
Betty Blocks On Stage 2018: The Roadmap
Betty Blocks On Stage 2018: The RoadmapBetty Blocks On Stage 2018: The Roadmap
Betty Blocks On Stage 2018: The Roadmap
 
Stanislav Khorunzhyi, "Front-end it like a PRO"
Stanislav Khorunzhyi, "Front-end it like a PRO"Stanislav Khorunzhyi, "Front-end it like a PRO"
Stanislav Khorunzhyi, "Front-end it like a PRO"
 
Creating truly player-centric games - how we do it at Kolibri Games?
Creating truly player-centric games - how we do it at Kolibri Games?Creating truly player-centric games - how we do it at Kolibri Games?
Creating truly player-centric games - how we do it at Kolibri Games?
 
Beginner Workshop for Student Developers - Tratech-presentation.pdf
Beginner Workshop for Student Developers - Tratech-presentation.pdfBeginner Workshop for Student Developers - Tratech-presentation.pdf
Beginner Workshop for Student Developers - Tratech-presentation.pdf
 
Android study jams info session 2021 new GDSC GECBSP
Android study jams info session 2021 new GDSC GECBSPAndroid study jams info session 2021 new GDSC GECBSP
Android study jams info session 2021 new GDSC GECBSP
 
Development tools
Development toolsDevelopment tools
Development tools
 
Django simplified : by weever mbakaya
Django simplified : by weever mbakayaDjango simplified : by weever mbakaya
Django simplified : by weever mbakaya
 
PuppetConf 2016: How Not to Freak Out When You Start Writing Puppet Modules f...
PuppetConf 2016: How Not to Freak Out When You Start Writing Puppet Modules f...PuppetConf 2016: How Not to Freak Out When You Start Writing Puppet Modules f...
PuppetConf 2016: How Not to Freak Out When You Start Writing Puppet Modules f...
 
Application Development Using Java - DIYComputerScience Course
Application Development Using Java - DIYComputerScience CourseApplication Development Using Java - DIYComputerScience Course
Application Development Using Java - DIYComputerScience Course
 
Prometheus the future
Prometheus   the futurePrometheus   the future
Prometheus the future
 
DevOps Workshop Part 1
DevOps Workshop Part 1DevOps Workshop Part 1
DevOps Workshop Part 1
 
My talk at LVEE 2016
My talk at LVEE 2016My talk at LVEE 2016
My talk at LVEE 2016
 

Kürzlich hochgeladen

Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
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
 
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
 
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
 
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
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 

Kürzlich hochgeladen (20)

Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
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
 
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
 
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
 
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...
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
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
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 

Play framework - Bristol Java meetup

Hinweis der Redaktion

  1. Main thing Allow you to decide if you want to use the Play framework Build small app to help Other bits and bobs
  2. Experience with Play 1 Section at end on differences No guarantees on jokes being funny Good way to identify a joke if you spot one is to laugh
  3. Experience with Play 1 Section at end on differences No guarantees on jokes being funny Good way to identify a joke if you spot one is to laugh
  4. Experience with Play 1 Section at end on differences No guarantees on jokes being funny Good way to identify a joke if you spot one is to laugh
  5. Previously CTO at Covalent Software in Taunton. Now doing my own thing possibly looking for work if something interesting comes up in the mean time.
  6. Covalent 3 years ago Thick client Nav down the bottom Bit crappy looking Market leader, but… Failed efforts to revamp the UI Scared of the browser Looking 10 years ahead What the software would look like. Already losing deals to newer companies who were browser based. Lessons Don’t leave it too long to migrate If you’re in a position of technical leadership it’s your job to convince other senior managers that it can and should be done
  7. Reuse existing code base, so JVM Reuse existing skills, so Java Needs to work on large code base with multiple developers Needs to work with existing load (2k users per day) Also, this was a great opportunity to bring in some better tech and actually some better development practices
  8. I think I started with a list something like this Criteria were Size & quality of community StackOverflow Check existing sites, do they work? are they up to date? Plugins? Grails had very poor plugins with mutliple vulnerabilities in the paypal plugin for example (v0.6 or something to be fair) Being used in production MVC Other ideas nice but not so mainstream. I wanted something which was a safe bet here, a VHS perhaps to some other alternatives betamax. This was what we’d be building the company on so needed a safe choice Ease of development Needed to get team up to speed on it fast Didn’t want long/expensive learning curve Some of my own preferences No/minimal XML please GWT etc. not my cup of tea. You’re a software developer, learn JS and HTML
  9. I think I started with a list something like this Criteria were Size & quality of community StackOverflow Check existing sites, do they work? are they up to date? Plugins? Grails had very poor plugins with mutliple vulnerabilities in the paypal plugin for example (v0.6 or something to be fair) Being used in production MVC Other ideas nice but not so mainstream. I wanted something which was a safe bet here, a VHS perhaps to some other alternatives betamax. This was what we’d be building the company on so needed a safe choice Ease of development Needed to get team up to speed on it fast Didn’t want long/expensive learning curve Some of my own preferences No/minimal XML please GWT etc. not my cup of tea. You’re a software developer, learn JS and HTML
  10. Spring Felt like the defacto successor to Java EE Main framework being used by teams when I look at who was hiring for what skills Play Fitted criteria above well new v2 was poorly documented luckily someone suggested I look at v1 which was still being maintained and used in production by a number of companies Spring was the forerunner at this point as it felt like the safe choice. For the final test Tried to build a small app in each one to get a feel for what it was like to work with. Tried to add security Started with Spring, took a long time to get dependancies and everything working Built in Play in a matter of hours what had taken an age in Spring. Possibly my skillset, YMMV. So I had a choice which Was used in production by a number of companies (including LinkedIn) Was easy to develop with Had an easy learning curve and used mainstream ideas like MVC It’s time to get started
  11. Experience with Play 1 Section at end on differences No guarantees on jokes being funny Good way to identify a joke if you spot one is to laugh
  12. Let’s get started with an example application
  13. And add to PATH
  14. Show in browser
  15. If you’ve got less tabs than this you’re doing it wrong
  16. Key ones for us are app and conf
  17. Models, Views and Controllers Quick explain for anyone not familiar with web MVC frameworks We’ll see the actual app in a moment
  18. Will show application.conf and routes dependencies maps modules you depend on messages supports i18n
  19. database connections etc.
  20. GET or POST path Controller.method
  21. Experience with Play 1 Section at end on differences No guarantees on jokes being funny Good way to identify a joke if you spot one is to laugh
  22. So, we’ve got our detailed plans let’s get to work
  23. Not a lot of code Extends play model class Gives us some nice additions to JPA Includes a Long ID field - you can extend GenericModel if you don’t want that public variables Two annotations JPA - @Column and @Entity
  24. extends Controller public static void for endpoints findAll retrieves all the models render passes control to the view at the relevant location, any variables passed in will be accessible under that name in the view code
  25. #{tags /} or #{tag} #{/tag} ${output} Escapes html etc. Guide to more complex escaping here http://stackoverflow.com/questions/5764679/guide-to-proper-escaping-in-play-framework Extends main.html Take a look at that defines head calls #{get } calls #{doLayout /} - makes it extendable
  26. What we haven’t done Told Play how to match a controller method to a view Had to explicitly create a renderArgs Map for the view Lets add some more functionality - to mercurial
  27. addLocation endpoint Takes two Strings Could take a new UnderpantLocation object I prefer to keep view/controller/model more separate Github had a bug with this Develop should be able to expose values in Model without being concerned with how data gets from client into Controller redirects to index after adding new location - could show this in chrome Model just has new constructor for simplicity
  28. #{form} tag @Controller.method() route definition method param has content which is rendered as part of the form
  29. Onwards
  30. Moved underpant location endpoints out of Application to UnderpantLocations Added list and show views for UnderpantLocations list just copy of index previously index now just links to two endpoints in UnderpantLocations Added
  31. Reusing a view with uncollectedList new markCollected endpoint Finds existing location marks as collected and saves redirects to full list (should do something smarter, would probably be done as ajax in reality)
  32. show view All stuff we’ve seen before Extends main (most of your web app views will) sets a title ${output} #{form } tag Slight change to list to give locations a piss stain yellow background when collected
  33. That’s the basics done I’ll show you more stuff Even more stuff but in less detail Thoughts on writing larger apps in Play Play 2
  34. Experience with Play 1 Section at end on differences No guarantees on jokes being funny Good way to identify a joke if you spot one is to laugh
  35. Take the first 3 in with the next commit
  36. Annotation controls how often the run @Every(“1h”) @Every(“5min”) etc. @On("0 0 1 ? * MON") @OnApplicationStart implement doJob, would normally be something a bit more interesting in here
  37. implement doJobWithResult (if you need a result) Call now() which executes it asap call await(), which waits for the response and yields control of thread Necessary for high throughput applications.
  38. GnomeController is superclass for our UnderpantController, and could be use for others in the application @Before annotation means this method called before other endpoints renderArgs is Map built based on values passed into render() call, we can add our own values explicitly as well
  39. changes to main calling our new tag, passing profitable value in from renderArgs
  40. New tag file Located under tags directory Mostly what we’ve seen before (I’ve added some css for background colour)
  41. Built right into Play Unit tests Functional tests Selenium tests Getting data in for your tests cmd> play test localhost:9000/@tests
  42. Unit test has access to code but web apps not up and running
  43. Functional test Web app is up and running Has some handy extensions to assist in validating results Warning, doesn’t play well with async jobs in controllers for some reason.
  44. Selenium tag creates a HTML selenium test Warning if you have issues there aren’t a lot of people using this way of creating tests out there so finding solutions tricky I’d be tempted to stick with Java selenium tests which are then also easier to run with Selenium Grid over different browsers Unless you know any better?
  45. Can be easily loaded before individual tests or groups of tests Also ability to delete old data as well
  46. Experience with Play 1 Section at end on differences No guarantees on jokes being funny Good way to identify a joke if you spot one is to laugh
  47. You can also just add annotations to fields in your controller methods if you like Play Annotation JSR303 validation annotation @Required @MinSize There are others...
  48. Check the Play documentation
  49. Check out https://www.playframework.com/modules Secure module is the one I always end up using, worth checking out adding it to a project as it shows a few useful things Adding a module dependency Importing routes Adding annotations to controllers Overriding views Extending it (adding your own permissions)
  50. Experience with Play 1 Section at end on differences No guarantees on jokes being funny Good way to identify a joke if you spot one is to laugh
  51. shit slide
  52. Partials a things I’m loading over ajax _templates are #{includes } (not shown those yet) Then I’ve broken the controllers down into Main views (list, show etc) Partials for ajax Edit workflow Decompose controllers early. First sign of problem is probably dirs in your views folders (remember case sensitivity) Beware too many unless and onlys in @Before annotations Smell in your views package first, Then your Controller will start stinking up. Lots of methods, and @Before methods with lots of unless and onlys
  53. If your app directory is getting big, consider splitting your app into modules
  54. selenium tag No one else is using it We struggled, but possibly because we were also learning selenium at the same time Preference out there seems to be to write Java tests and execute using selenium grid (allowing execution on other browsers and phones/tablets from a jenkins build) Headless test browser You end up debugging issues in a browser you can’t open which don’t affect other browsers. Don’t do it, kills speed and motivation to write tests
  55. Experience with Play 1 Section at end on differences No guarantees on jokes being funny Good way to identify a joke if you spot one is to laugh
  56. Lot’s of differences, some of which you may care about some of which maybe you don’t Biggie Complete rewrite, written in Scala, supports apps in Java or Scala
  57. Templates You can override the default if you prefer Stick with default or choose an option which is well supported and used by a number of people (I think) Less magic May mean the test issues I had are fixed Probably means less likely to hit weird issues due to Play code in general EBean Maybe you care? bindFromRequest Fixes issue mentioned earlier by allowing controller to say what values on a model can be bound from a certain request Asset directory If you’re working with JS you’ve likely wired up Grunt or something Handles building assets at compile time