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)

Recommended for you

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

OpenCms 9.5 (and soon version 10) has a great number of features that are included in the core distribution but are not well known and therefore often remain unused. These include: - Many EL functions available for JSP templates - XML schema based configuration of the content editor - Individual content settings for sitemaps - Advanced logging options in the workplace Administration … and much more. In this session, some of these valuable hidden features are presented.

content management systemalkaconopencms days 2015
Automated Smoke Tests with Protractor
Automated Smoke Tests with ProtractorAutomated Smoke Tests with Protractor
Automated Smoke Tests with Protractor

This is my May 16th presentation at the OKC.js user group about using protractor to build automated smoke tests for Angular applications.

protractorwebdriversmoke tests
Gatling Performance Workshop
Gatling Performance WorkshopGatling Performance Workshop
Gatling Performance Workshop

This document provides an overview of Gatling, an open-source load testing tool developed using Scala. It discusses Gatling's focus on web applications, simplicity, high performance, good reports, and easy integration with CI tools. It then covers setting up Gatling, including prerequisites, writing a sample test, and key concepts like scenarios, simulations, and reports.

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)
    }
}

Recommended for you

Codeception: introduction to php testing
Codeception: introduction to php testingCodeception: introduction to php testing
Codeception: introduction to php testing

This document introduces Codeception, an open source PHP testing framework. It discusses different types of testing like unit, integration, functional, and acceptance testing. Codeception uses PHPUnit, Symfony browserkit, Selenium, and PhantomJS to test PHP applications. The document demonstrates running Codeception tests and provides examples of passing and failing tests. It also discusses how Codeception allows testing JavaScript-heavy applications using Selenium or headless testing with PhantomJS. Continuous integration and Docker/Vagrant are presented as ways to improve testing workflows.

codeceptionphpselenium
Test automation with php codeception
Test automation with php codeceptionTest automation with php codeception
Test automation with php codeception

Test automation with PHP Codeception allows testing of applications like Joomla using the Codeception testing framework. Codeception is a full-stack PHP testing framework inspired by behavior-driven development. It provides new ways of writing acceptance, functional, and unit tests, powered by PHPUnit. The document demonstrates how to install Codeception via its PHAR file, create an acceptance test to automate the Joomla backend login process, and run the test. Key steps include bootstrapping Codeception, generating a test file, adding test code to log in and assert success, and running the test from the command line.

softwareqa
ASP.NET Routing & MVC
ASP.NET Routing & MVCASP.NET Routing & MVC
ASP.NET Routing & MVC

This document discusses URL routing in ASP.NET MVC, including: 1. Why understanding routing is important as it is the entry point to a web app and relates to request binding. 2. What routing is and how it works by parsing URLs and extracting variables to route requests to handlers. 3. Best practices for routing including using readable URLs, priority matching, constraints, and unit testing routes.

asp.net mvc routing
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() {
      ...
    }
}

Recommended for you

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

This document discusses behavior-driven development (BDD) and automation testing using Cucumber. It begins with an example of a Cucumber scenario for logging into a system. It then demonstrates an automation test case written in Java and discusses how Cucumber executes scenarios. The rest of the document outlines an agenda to discuss BDD, Cucumber automation, developing a Cucumber framework, and the pros and cons of BDD and Cucumber.

automation testingkms technologybehavior driven development
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

This slide focus on the good reasons for writing unit tests for testing ui. Much like you're testing ui manually, you can have simple minimal code doing that for you.

e2egulpagularjs
[Fronthub 2016] Константин Макарычев: "Не быстрый старт с Angular 2"
[Fronthub 2016] Константин Макарычев: "Не быстрый старт с Angular 2"[Fronthub 2016] Константин Макарычев: "Не быстрый старт с Angular 2"
[Fronthub 2016] Константин Макарычев: "Не быстрый старт с Angular 2"

This document discusses building an Angular 2 application with TypeScript and describes the application structure and build process. The application contains an App component and several child components like List, Center, and Item. It uses Gulp, Babel, and Browserify to bundle the TypeScript code into a single JavaScript file that is loaded by the index.html page. The build task transforms and bundles the code, applies sourcemaps, and outputs the bundled file to the build directory.

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

Recommended for you

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

Opera Dragonfly is a web developer tool included in the Opera browser that allows inspection of pages, debugging of JavaScript, monitoring of network activity, and profiling of page performance. It provides features like DOM inspection, breaking on breakpoints and events, console access, and remote debugging capabilities. Dragonfly aims to help developers debug issues in both code and performance of a page using features optimized for rapid development.

developerweb developerdragonfly
Codeception introduction and use in Yii
Codeception introduction and use in YiiCodeception introduction and use in Yii
Codeception introduction and use in Yii

Slides done for the talk on CodeCeption given during the April London Yii Meetup. The full screencast of the talk can be viewed here: https://www.youtube.com/watch?v=FclV9ML7bH4

codeceptiontddacceptance testing
Oro Workflows
Oro WorkflowsOro Workflows
Oro Workflows

Overview of Workflow functionality in OroPlatform and OroCRM. Demo bundle is accessible here: https://github.com/yshyshkin/DemoWorkflowBundle

oro oroplatform orocrm workflow
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

Observability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetryObservability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetry
Eric D. Schabell
 
Manual | Product | Research Presentation
Manual | Product | Research PresentationManual | Product | Research Presentation
Manual | Product | Research Presentation
welrejdoall
 
Measuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at TwitterMeasuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at Twitter
ScyllaDB
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
Neo4j
 
Mitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing SystemsMitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing Systems
ScyllaDB
 
The Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive ComputingThe Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive Computing
Larry Smarr
 
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyyActive Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
RaminGhanbari2
 
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
Toru Tamaki
 
Coordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar SlidesCoordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar Slides
Safe Software
 
20240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 202420240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 2024
Matthew Sinclair
 
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Chris Swan
 
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - MydbopsScaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Mydbops
 
Best Programming Language for Civil Engineers
Best Programming Language for Civil EngineersBest Programming Language for Civil Engineers
Best Programming Language for Civil Engineers
Awais Yaseen
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc
 
Implementations of Fused Deposition Modeling in real world
Implementations of Fused Deposition Modeling  in real worldImplementations of Fused Deposition Modeling  in real world
Implementations of Fused Deposition Modeling in real world
Emerging Tech
 
Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...
BookNet Canada
 
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Erasmo Purificato
 
The Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU CampusesThe Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU Campuses
Larry Smarr
 
Quality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of TimeQuality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of Time
Aurora Consulting
 
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdfPigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions
 

Recently uploaded (20)

Observability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetryObservability For You and Me with OpenTelemetry
Observability For You and Me with OpenTelemetry
 
Manual | Product | Research Presentation
Manual | Product | Research PresentationManual | Product | Research Presentation
Manual | Product | Research Presentation
 
Measuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at TwitterMeasuring the Impact of Network Latency at Twitter
Measuring the Impact of Network Latency at Twitter
 
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdfBT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
BT & Neo4j: Knowledge Graphs for Critical Enterprise Systems.pptx.pdf
 
Mitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing SystemsMitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing Systems
 
The Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive ComputingThe Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive Computing
 
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyyActive Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
Active Inference is a veryyyyyyyyyyyyyyyyyyyyyyyy
 
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
 
Coordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar SlidesCoordinate Systems in FME 101 - Webinar Slides
Coordinate Systems in FME 101 - Webinar Slides
 
20240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 202420240705 QFM024 Irresponsible AI Reading List June 2024
20240705 QFM024 Irresponsible AI Reading List June 2024
 
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
Fluttercon 2024: Showing that you care about security - OpenSSF Scorecards fo...
 
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - MydbopsScaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
Scaling Connections in PostgreSQL Postgres Bangalore(PGBLR) Meetup-2 - Mydbops
 
Best Programming Language for Civil Engineers
Best Programming Language for Civil EngineersBest Programming Language for Civil Engineers
Best Programming Language for Civil Engineers
 
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-InTrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
TrustArc Webinar - 2024 Data Privacy Trends: A Mid-Year Check-In
 
Implementations of Fused Deposition Modeling in real world
Implementations of Fused Deposition Modeling  in real worldImplementations of Fused Deposition Modeling  in real world
Implementations of Fused Deposition Modeling in real world
 
Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...Transcript: Details of description part II: Describing images in practice - T...
Transcript: Details of description part II: Describing images in practice - T...
 
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
 
The Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU CampusesThe Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU Campuses
 
Quality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of TimeQuality Patents: Patents That Stand the Test of Time
Quality Patents: Patents That Stand the Test of Time
 
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdfPigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdf
 

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