SlideShare a Scribd company logo
Dive into           Framework

            Maher Gamal
Key Features

● Agile development workflow ( Save, Reload ! )

● Stateless architecture

● Clear error reporting

● Reusable modules & plugins

● Gets you up and running quickly !
Project Layout : play new proj1

● proj1/app/controllers
● proj1/app/models
● proj1/app/views

● proj1/conf/application.conf
● proj1/conf/messages
● proj1/conf/routes

● proj1/lib
● proj1/public
● proj1/test
Routing : /conf/routes

 ● Examples

GET /profile/view/{id}    ProfileController.view
POST /profile/save      ProfileController.save
GET /{<ar|en>lang}/      HomeController.index
* /{controller}/{action} {controller}.{action}

 ● Defining the URLs early, forces you to explore your website

 ● You can use annotations too (with the play-router module)
Controllers : /app/controllers

import play.mvc.Controller;

public class ProfileController extends Controller {

    public static void view(Long id) {
      // ...
      renderText("123"); // or json, xml.
      renderTemplate("Users/show.html");
      redirect("....");
      HomeController.index(); // Does a redirect
      // ...
    }
}
Models : /app/models

import play.db.jpa.Model;
import javax.persistence.Entity;


@Entity
public class User extends Model {

    public String email;

    public String password;
}
Validations : /app/models

import play.db.jpa.Model;
import javax.persistence.Entity;
import play.data.validation.*;

@Entity
public class User extends Model {
  @Email @Required
  public String email;
  @Required @MinSize(5)
  public String password;
}
Validations : /app/controllers

import play.mvc.Controller;

public class ProfileController extends Controller {

    public static void view(@Valid Profile profile) {
      render(profile);
      // or invoke the validation manually !
      // validation.valid(profile)
    }
}
Views : /app/views

/app/views/ProfileController/view.html

#{ifErrors}

  <ul class="error">
    #{errors}
       <li>${error}</li>
    #{/errors}
  </ul>

#{/ifErrors}
Views : /app/views

/app/views/ProfileController/view.html
#{extends 'main.html' /}
#{set title : 'Page Title' /}
#{set 'moreScripts'}
  ...
#{/set}

/app/views/main.html
<html>
   <head>
     <title>#{get 'title' /}</title>
     #{get 'moreScripts' /}
   </head>
</html>
Views : /app/views

/app/views/main.html
<html>
   <head>
     <title>#{get 'title' /}</title>
     #{get 'moreScripts' /}
   </head>
   <body>
     ...
     #{doLayout /}
     ...
   </body>
</html>
Jobs : /app/jobs


public class BootstrapJob extends Job {

    @Override
    public void doJob() {
      ...
    }
}
Jobs : /app/jobs

@OnApplicationStart
public class BootstrapJob extends Job {

    @Override
    public void doJob() {
      ...
    }
}
Jobs : /app/jobs

@Every("1h") or @On("0 0 * * *")
public class BootstrapJob extends Job {

    @Override
    public void doJob() {
      ...
    }
}
Helper Libraries : play.libs.*

 ● MD5 , SHA1 , Base64 Encoding/Decoding
 ● Encryption , decryption , hashing
 ● File/Directory copying , deleting and I/O methods
 ● Image resizing , cropping and captcha generation
 ● Mail message preparation and sending
 ● OAuth Integration
 ● OpenID Integration
 ● HttpClient to call external web services
 ● XML Parsing
Running

● play new proj1

● play run proj1

● play clean,run proj1

● play netbeansify proj1

● play help
Resources

● Documentation
   ○ playframework.org/documentation
   ○ playframework.org/documentation/api/1.1.1/index.html

● Community
   ○ playframework.org/community
   ○ play.lighthouseapp.com
   ○ groups.google.com/group/play-framework

● Modules and Examples
   ○ playframework.org/modules
   ○ Check samples-and-tests directory in the release

More Related Content

What's hot

13.exemplu closure controller
13.exemplu closure controller13.exemplu closure controller
13.exemplu closure controller
Razvan Raducanu, PhD
 
Simple restfull app_s
Simple restfull app_sSimple restfull app_s
Simple restfull app_s
netwix
 
Java EE 6
Java EE 6Java EE 6
Java EE 6
Geert Pante
 
OpenCms Days 2015 Hidden features of OpenCms
OpenCms Days 2015 Hidden features of OpenCmsOpenCms Days 2015 Hidden features of OpenCms
OpenCms Days 2015 Hidden features of OpenCms
Alkacon Software GmbH & Co. KG
 
Automated Smoke Tests with Protractor
Automated Smoke Tests with ProtractorAutomated Smoke Tests with Protractor
Automated Smoke Tests with Protractor
🌱 Dale Spoonemore
 
Gatling Performance Workshop
Gatling Performance WorkshopGatling Performance Workshop
Gatling Performance Workshop
Sai Krishna
 
Codeception: introduction to php testing
Codeception: introduction to php testingCodeception: introduction to php testing
Codeception: introduction to php testing
Engineor
 
Test automation with php codeception
Test automation with php codeceptionTest automation with php codeception
Test automation with php codeception
buddhieash
 
ASP.NET Routing & MVC
ASP.NET Routing & MVCASP.NET Routing & MVC
ASP.NET Routing & MVC
Emad Alashi
 
Behavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using CucumberBehavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using Cucumber
KMS Technology
 
UI Testing Best Practices - An Expected Journey
UI Testing Best Practices - An Expected JourneyUI Testing Best Practices - An Expected Journey
UI Testing Best Practices - An Expected Journey
Oren Farhi
 
[Fronthub 2016] Константин Макарычев: "Не быстрый старт с Angular 2"
[Fronthub 2016] Константин Макарычев: "Не быстрый старт с Angular 2"[Fronthub 2016] Константин Макарычев: "Не быстрый старт с Angular 2"
[Fronthub 2016] Константин Макарычев: "Не быстрый старт с Angular 2"
Provectus
 
Catching bugs with Opera Dragonfly / Özgür Web Teknolojileri Günleri / Istanb...
Catching bugs with Opera Dragonfly / Özgür Web Teknolojileri Günleri / Istanb...Catching bugs with Opera Dragonfly / Özgür Web Teknolojileri Günleri / Istanb...
Catching bugs with Opera Dragonfly / Özgür Web Teknolojileri Günleri / Istanb...
Patrick Lauke
 
Codeception introduction and use in Yii
Codeception introduction and use in YiiCodeception introduction and use in Yii
Codeception introduction and use in Yii
IlPeach
 
Oro Workflows
Oro WorkflowsOro Workflows
Oro Workflows
Yevhen Shyshkin
 
Breaking free from static abuse in test automation frameworks and using Sprin...
Breaking free from static abuse in test automation frameworks and using Sprin...Breaking free from static abuse in test automation frameworks and using Sprin...
Breaking free from static abuse in test automation frameworks and using Sprin...
Abhijeet Vaikar
 
How to use_cucumber_rest-assured_api_framework
How to use_cucumber_rest-assured_api_frameworkHow to use_cucumber_rest-assured_api_framework
How to use_cucumber_rest-assured_api_framework
Harshad Ingle
 
[EclipseCon NA 2014] Integration tests for RCP made easy with SWTBot and Tycho
[EclipseCon NA 2014] Integration tests for RCP made easy with SWTBot and Tycho[EclipseCon NA 2014] Integration tests for RCP made easy with SWTBot and Tycho
[EclipseCon NA 2014] Integration tests for RCP made easy with SWTBot and Tycho
Mickael Istria
 
Laravel & Composer presentation - extended
Laravel & Composer presentation - extendedLaravel & Composer presentation - extended
Laravel & Composer presentation - extended
Cvetomir Denchev
 
Testing Web Applications
Testing Web ApplicationsTesting Web Applications
Testing Web Applications
Seth McLaughlin
 

What's hot (20)

13.exemplu closure controller
13.exemplu closure controller13.exemplu closure controller
13.exemplu closure controller
 
Simple restfull app_s
Simple restfull app_sSimple restfull app_s
Simple restfull app_s
 
Java EE 6
Java EE 6Java EE 6
Java EE 6
 
OpenCms Days 2015 Hidden features of OpenCms
OpenCms Days 2015 Hidden features of OpenCmsOpenCms Days 2015 Hidden features of OpenCms
OpenCms Days 2015 Hidden features of OpenCms
 
Automated Smoke Tests with Protractor
Automated Smoke Tests with ProtractorAutomated Smoke Tests with Protractor
Automated Smoke Tests with Protractor
 
Gatling Performance Workshop
Gatling Performance WorkshopGatling Performance Workshop
Gatling Performance Workshop
 
Codeception: introduction to php testing
Codeception: introduction to php testingCodeception: introduction to php testing
Codeception: introduction to php testing
 
Test automation with php codeception
Test automation with php codeceptionTest automation with php codeception
Test automation with php codeception
 
ASP.NET Routing & MVC
ASP.NET Routing & MVCASP.NET Routing & MVC
ASP.NET Routing & MVC
 
Behavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using CucumberBehavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using Cucumber
 
UI Testing Best Practices - An Expected Journey
UI Testing Best Practices - An Expected JourneyUI Testing Best Practices - An Expected Journey
UI Testing Best Practices - An Expected Journey
 
[Fronthub 2016] Константин Макарычев: "Не быстрый старт с Angular 2"
[Fronthub 2016] Константин Макарычев: "Не быстрый старт с Angular 2"[Fronthub 2016] Константин Макарычев: "Не быстрый старт с Angular 2"
[Fronthub 2016] Константин Макарычев: "Не быстрый старт с Angular 2"
 
Catching bugs with Opera Dragonfly / Özgür Web Teknolojileri Günleri / Istanb...
Catching bugs with Opera Dragonfly / Özgür Web Teknolojileri Günleri / Istanb...Catching bugs with Opera Dragonfly / Özgür Web Teknolojileri Günleri / Istanb...
Catching bugs with Opera Dragonfly / Özgür Web Teknolojileri Günleri / Istanb...
 
Codeception introduction and use in Yii
Codeception introduction and use in YiiCodeception introduction and use in Yii
Codeception introduction and use in Yii
 
Oro Workflows
Oro WorkflowsOro Workflows
Oro Workflows
 
Breaking free from static abuse in test automation frameworks and using Sprin...
Breaking free from static abuse in test automation frameworks and using Sprin...Breaking free from static abuse in test automation frameworks and using Sprin...
Breaking free from static abuse in test automation frameworks and using Sprin...
 
How to use_cucumber_rest-assured_api_framework
How to use_cucumber_rest-assured_api_frameworkHow to use_cucumber_rest-assured_api_framework
How to use_cucumber_rest-assured_api_framework
 
[EclipseCon NA 2014] Integration tests for RCP made easy with SWTBot and Tycho
[EclipseCon NA 2014] Integration tests for RCP made easy with SWTBot and Tycho[EclipseCon NA 2014] Integration tests for RCP made easy with SWTBot and Tycho
[EclipseCon NA 2014] Integration tests for RCP made easy with SWTBot and Tycho
 
Laravel & Composer presentation - extended
Laravel & Composer presentation - extendedLaravel & Composer presentation - extended
Laravel & Composer presentation - extended
 
Testing Web Applications
Testing Web ApplicationsTesting Web Applications
Testing Web Applications
 

Viewers also liked

2013 bridal menus
2013 bridal menus2013 bridal menus
Nuevo rumbo
Nuevo rumboNuevo rumbo
Nuevo rumbo
Joel Acevedo
 
Roll Call On Responsible Budget
Roll Call On Responsible BudgetRoll Call On Responsible Budget
Roll Call On Responsible Budget
Arts Alliance Illinois
 
Nuevo rumbo
Nuevo rumboNuevo rumbo
Nuevo rumbo
Joel Acevedo
 
Who says what to whom on Twitter? - Twitter flow
Who says what to whom on Twitter? - Twitter flowWho says what to whom on Twitter? - Twitter flow
Who says what to whom on Twitter? - Twitter flow
Juan Sarasua
 
Brain Fitness2.Pdf Mck Coverage 2009
Brain Fitness2.Pdf Mck Coverage 2009Brain Fitness2.Pdf Mck Coverage 2009
Brain Fitness2.Pdf Mck Coverage 2009
Dakim BrainFitness
 
A Sip of Python
A Sip of PythonA Sip of Python
A Sip of Python
Maher Gamal
 
Pastor Austine's ppt
Pastor Austine's pptPastor Austine's ppt
Pastor Austine's ppt
ahl410
 
First Census of Marine Life 2010
First Census of Marine Life 2010First Census of Marine Life 2010
First Census of Marine Life 2010
Juan Sarasua
 
Arts Activism 101
Arts Activism 101Arts Activism 101
Arts Activism 101
Arts Alliance Illinois
 
Gujrat
GujratGujrat
Understanding General Ledger Reconciliations
Understanding General Ledger ReconciliationsUnderstanding General Ledger Reconciliations
Understanding General Ledger Reconciliations
Curtis Martin
 
Cu hedgehog concept public
Cu hedgehog concept   publicCu hedgehog concept   public
Cu hedgehog concept public
Curtis Martin
 
Play framework training by Neelkanth Sachdeva @ Scala traits event , New Delh...
Play framework training by Neelkanth Sachdeva @ Scala traits event , New Delh...Play framework training by Neelkanth Sachdeva @ Scala traits event , New Delh...
Play framework training by Neelkanth Sachdeva @ Scala traits event , New Delh...
Knoldus Inc.
 
Committing to Quality in Education: Arts at the Core
Committing to Quality in Education: Arts at the CoreCommitting to Quality in Education: Arts at the Core
Committing to Quality in Education: Arts at the Core
Arts Alliance Illinois
 
A Security Analysis Framework Powered By An Expert System
A Security Analysis Framework Powered By An Expert SystemA Security Analysis Framework Powered By An Expert System
A Security Analysis Framework Powered By An Expert System
Maher Gamal
 
Functors, Applicatives and Monads In Scala
Functors, Applicatives and Monads In ScalaFunctors, Applicatives and Monads In Scala
Functors, Applicatives and Monads In Scala
Knoldus Inc.
 

Viewers also liked (17)

2013 bridal menus
2013 bridal menus2013 bridal menus
2013 bridal menus
 
Nuevo rumbo
Nuevo rumboNuevo rumbo
Nuevo rumbo
 
Roll Call On Responsible Budget
Roll Call On Responsible BudgetRoll Call On Responsible Budget
Roll Call On Responsible Budget
 
Nuevo rumbo
Nuevo rumboNuevo rumbo
Nuevo rumbo
 
Who says what to whom on Twitter? - Twitter flow
Who says what to whom on Twitter? - Twitter flowWho says what to whom on Twitter? - Twitter flow
Who says what to whom on Twitter? - Twitter flow
 
Brain Fitness2.Pdf Mck Coverage 2009
Brain Fitness2.Pdf Mck Coverage 2009Brain Fitness2.Pdf Mck Coverage 2009
Brain Fitness2.Pdf Mck Coverage 2009
 
A Sip of Python
A Sip of PythonA Sip of Python
A Sip of Python
 
Pastor Austine's ppt
Pastor Austine's pptPastor Austine's ppt
Pastor Austine's ppt
 
First Census of Marine Life 2010
First Census of Marine Life 2010First Census of Marine Life 2010
First Census of Marine Life 2010
 
Arts Activism 101
Arts Activism 101Arts Activism 101
Arts Activism 101
 
Gujrat
GujratGujrat
Gujrat
 
Understanding General Ledger Reconciliations
Understanding General Ledger ReconciliationsUnderstanding General Ledger Reconciliations
Understanding General Ledger Reconciliations
 
Cu hedgehog concept public
Cu hedgehog concept   publicCu hedgehog concept   public
Cu hedgehog concept public
 
Play framework training by Neelkanth Sachdeva @ Scala traits event , New Delh...
Play framework training by Neelkanth Sachdeva @ Scala traits event , New Delh...Play framework training by Neelkanth Sachdeva @ Scala traits event , New Delh...
Play framework training by Neelkanth Sachdeva @ Scala traits event , New Delh...
 
Committing to Quality in Education: Arts at the Core
Committing to Quality in Education: Arts at the CoreCommitting to Quality in Education: Arts at the Core
Committing to Quality in Education: Arts at the Core
 
A Security Analysis Framework Powered By An Expert System
A Security Analysis Framework Powered By An Expert SystemA Security Analysis Framework Powered By An Expert System
A Security Analysis Framework Powered By An Expert System
 
Functors, Applicatives and Monads In Scala
Functors, Applicatives and Monads In ScalaFunctors, Applicatives and Monads In Scala
Functors, Applicatives and Monads In Scala
 

Similar to Dive into Play Framework

Web Applications with AngularJS
Web Applications with AngularJSWeb Applications with AngularJS
Web Applications with AngularJS
Philipp Burgmer
 
Good practices for debugging Selenium and Appium tests
Good practices for debugging Selenium and Appium testsGood practices for debugging Selenium and Appium tests
Good practices for debugging Selenium and Appium tests
Abhijeet Vaikar
 
Play framework
Play frameworkPlay framework
Play framework
sambaochung
 
TangoWithDjango - ch8
TangoWithDjango - ch8TangoWithDjango - ch8
TangoWithDjango - ch8
Asika Kuo
 
Création d'application Ionic & Angular & Drupal 8
Création d'application Ionic & Angular & Drupal 8Création d'application Ionic & Angular & Drupal 8
Création d'application Ionic & Angular & Drupal 8
wsmarouan
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
Fabio Franzini
 
Gwt.create
Gwt.createGwt.create
DrupalCon Dublin 2016 - Automated browser testing with Nightwatch.js
DrupalCon Dublin 2016 - Automated browser testing with Nightwatch.jsDrupalCon Dublin 2016 - Automated browser testing with Nightwatch.js
DrupalCon Dublin 2016 - Automated browser testing with Nightwatch.js
Vladimir Roudakov
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introduction
vstorm83
 
Test your modules
Test your modulesTest your modules
Test your modules
Erich Beyrent
 
Android UI Testing with Appium
Android UI Testing with AppiumAndroid UI Testing with Appium
Android UI Testing with Appium
Luke Maung
 
بررسی چارچوب جنگو
بررسی چارچوب جنگوبررسی چارچوب جنگو
بررسی چارچوب جنگو
railsbootcamp
 
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud RunDesigning flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
wesley chun
 
Google app-engine-with-python
Google app-engine-with-pythonGoogle app-engine-with-python
Google app-engine-with-python
Deepak Garg
 
Built to last javascript for enterprise
Built to last   javascript for enterpriseBuilt to last   javascript for enterprise
Built to last javascript for enterprise
Marjan Nikolovski
 
OWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA TestersOWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA Testers
Javan Rasokat
 
Voorhoede - Front-end architecture
Voorhoede - Front-end architectureVoorhoede - Front-end architecture
Voorhoede - Front-end architecture
Jasper Moelker
 
Intro To JavaScript Unit Testing - Ran Mizrahi
Intro To JavaScript Unit Testing - Ran MizrahiIntro To JavaScript Unit Testing - Ran Mizrahi
Intro To JavaScript Unit Testing - Ran Mizrahi
Ran Mizrahi
 
Module, AMD, RequireJS
Module, AMD, RequireJSModule, AMD, RequireJS
Module, AMD, RequireJS
偉格 高
 
PhoneGap
PhoneGapPhoneGap
PhoneGap
Emil Varga
 

Similar to Dive into Play Framework (20)

Web Applications with AngularJS
Web Applications with AngularJSWeb Applications with AngularJS
Web Applications with AngularJS
 
Good practices for debugging Selenium and Appium tests
Good practices for debugging Selenium and Appium testsGood practices for debugging Selenium and Appium tests
Good practices for debugging Selenium and Appium tests
 
Play framework
Play frameworkPlay framework
Play framework
 
TangoWithDjango - ch8
TangoWithDjango - ch8TangoWithDjango - ch8
TangoWithDjango - ch8
 
Création d'application Ionic & Angular & Drupal 8
Création d'application Ionic & Angular & Drupal 8Création d'application Ionic & Angular & Drupal 8
Création d'application Ionic & Angular & Drupal 8
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
 
Gwt.create
Gwt.createGwt.create
Gwt.create
 
DrupalCon Dublin 2016 - Automated browser testing with Nightwatch.js
DrupalCon Dublin 2016 - Automated browser testing with Nightwatch.jsDrupalCon Dublin 2016 - Automated browser testing with Nightwatch.js
DrupalCon Dublin 2016 - Automated browser testing with Nightwatch.js
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introduction
 
Test your modules
Test your modulesTest your modules
Test your modules
 
Android UI Testing with Appium
Android UI Testing with AppiumAndroid UI Testing with Appium
Android UI Testing with Appium
 
بررسی چارچوب جنگو
بررسی چارچوب جنگوبررسی چارچوب جنگو
بررسی چارچوب جنگو
 
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud RunDesigning flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
Designing flexible apps deployable to App Engine, Cloud Functions, or Cloud Run
 
Google app-engine-with-python
Google app-engine-with-pythonGoogle app-engine-with-python
Google app-engine-with-python
 
Built to last javascript for enterprise
Built to last   javascript for enterpriseBuilt to last   javascript for enterprise
Built to last javascript for enterprise
 
OWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA TestersOWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA Testers
 
Voorhoede - Front-end architecture
Voorhoede - Front-end architectureVoorhoede - Front-end architecture
Voorhoede - Front-end architecture
 
Intro To JavaScript Unit Testing - Ran Mizrahi
Intro To JavaScript Unit Testing - Ran MizrahiIntro To JavaScript Unit Testing - Ran Mizrahi
Intro To JavaScript Unit Testing - Ran Mizrahi
 
Module, AMD, RequireJS
Module, AMD, RequireJSModule, AMD, RequireJS
Module, AMD, RequireJS
 
PhoneGap
PhoneGapPhoneGap
PhoneGap
 

Recently uploaded

Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Vladimir Iglovikov, Ph.D.
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
Neo4j
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 

Recently uploaded (20)

Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AIEnchancing adoption of Open Source Libraries. A case study on Albumentations.AI
Enchancing adoption of Open Source Libraries. A case study on Albumentations.AI
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
GraphSummit Singapore | Neo4j Product Vision & Roadmap - Q2 2024
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 

Dive into Play Framework

  • 1. Dive into Framework Maher Gamal
  • 2. Key Features ● Agile development workflow ( Save, Reload ! ) ● Stateless architecture ● Clear error reporting ● Reusable modules & plugins ● Gets you up and running quickly !
  • 3. Project Layout : play new proj1 ● proj1/app/controllers ● proj1/app/models ● proj1/app/views ● proj1/conf/application.conf ● proj1/conf/messages ● proj1/conf/routes ● proj1/lib ● proj1/public ● proj1/test
  • 4. Routing : /conf/routes ● Examples GET /profile/view/{id} ProfileController.view POST /profile/save ProfileController.save GET /{<ar|en>lang}/ HomeController.index * /{controller}/{action} {controller}.{action} ● Defining the URLs early, forces you to explore your website ● You can use annotations too (with the play-router module)
  • 5. Controllers : /app/controllers import play.mvc.Controller; public class ProfileController extends Controller { public static void view(Long id) { // ... renderText("123"); // or json, xml. renderTemplate("Users/show.html"); redirect("...."); HomeController.index(); // Does a redirect // ... } }
  • 6. Models : /app/models import play.db.jpa.Model; import javax.persistence.Entity; @Entity public class User extends Model { public String email; public String password; }
  • 7. Validations : /app/models import play.db.jpa.Model; import javax.persistence.Entity; import play.data.validation.*; @Entity public class User extends Model { @Email @Required public String email; @Required @MinSize(5) public String password; }
  • 8. Validations : /app/controllers import play.mvc.Controller; public class ProfileController extends Controller { public static void view(@Valid Profile profile) { render(profile); // or invoke the validation manually ! // validation.valid(profile) } }
  • 9. Views : /app/views /app/views/ProfileController/view.html #{ifErrors} <ul class="error"> #{errors} <li>${error}</li> #{/errors} </ul> #{/ifErrors}
  • 10. Views : /app/views /app/views/ProfileController/view.html #{extends 'main.html' /} #{set title : 'Page Title' /} #{set 'moreScripts'} ... #{/set} /app/views/main.html <html> <head> <title>#{get 'title' /}</title> #{get 'moreScripts' /} </head> </html>
  • 11. Views : /app/views /app/views/main.html <html> <head> <title>#{get 'title' /}</title> #{get 'moreScripts' /} </head> <body> ... #{doLayout /} ... </body> </html>
  • 12. Jobs : /app/jobs public class BootstrapJob extends Job { @Override public void doJob() { ... } }
  • 13. Jobs : /app/jobs @OnApplicationStart public class BootstrapJob extends Job { @Override public void doJob() { ... } }
  • 14. Jobs : /app/jobs @Every("1h") or @On("0 0 * * *") public class BootstrapJob extends Job { @Override public void doJob() { ... } }
  • 15. Helper Libraries : play.libs.* ● MD5 , SHA1 , Base64 Encoding/Decoding ● Encryption , decryption , hashing ● File/Directory copying , deleting and I/O methods ● Image resizing , cropping and captcha generation ● Mail message preparation and sending ● OAuth Integration ● OpenID Integration ● HttpClient to call external web services ● XML Parsing
  • 16. Running ● play new proj1 ● play run proj1 ● play clean,run proj1 ● play netbeansify proj1 ● play help
  • 17. Resources ● Documentation ○ playframework.org/documentation ○ playframework.org/documentation/api/1.1.1/index.html ● Community ○ playframework.org/community ○ play.lighthouseapp.com ○ groups.google.com/group/play-framework ● Modules and Examples ○ playframework.org/modules ○ Check samples-and-tests directory in the release