SlideShare a Scribd company logo
Playing with PHP on Azure
A Zend experience
Cédric Derue – GWAB 2014
 Web Architect @ Altran
 Skills:
•  Zend Framework 2
•  ASP.NET MVC
•  JavaScript
•  NoSQL
 Twitter: @cderue
Cédric Derue
 You love PHP,
 You love scripting,
 You love pachyderms,
 You know Windows?
Who this session is for?
 Cloud Computing definition
 Windows Azure introduction
 Zend Framework 2 use case
 Azure Web Sites
 Azure Storage
Agenda
Cloud Computing origin
 Arpanet
 Amazon
 Google
 HP
 Microsoft
Windows Azure solution
Choose your ressources
App
A simple equation to summary Windows Azure
Blocs de
construction
applicatif
Compute Application blocks
Infra for building and deploying apps
 Evolutive and scalable
 Fault tolerance
 On demand
 Pay for what you use
Windows Azure benefits
Azure free trial
Windows Azure Portal
Windows Azure execution models
Cloud Services
Mobile Services
Virtual Machines
Web Sites
Virtual Machines
Highly
configurable
Windows Server
or Linux
IaaS
Scalable
Web Sites
.NET, PHP,
Python, Node.js,
Java
IIS
PaaS
Scalable
Mobile Services
Android
iOS
HTML
Hybrid
Storage
Authentication
Push
Monitoring
MBaaS
Scalable
Cloud Services
Highly
configurable
IIS
PaaS (Web &
Worker Roles)
Scalable
How to choose the right(s) model(s)?
 Create a new Azure Web Site
 Start a new ZF2 app on Azure
 Add ZF2 modules
 Work with relational data on Azure
 Work with non relational data on Azure
 Install Windows Azure SDK for PHP
 Demonstrate reversibility
PHP Azure Web Site demo
Create a new Web Site on Azure
Configuring source control
Explore Azure Web Site(s)
Managing configuration
Scaling
 Modular
 Extensible
 High performing
 Secure
 Enterprise ready
 Community
Why Zend Framework 2?
> composer create-project
--repository-url=
"https://packages.zendframework.com"
-s dev
zendframework/skeleton-application
<path/to/install>
> composer update
> php -S localhost:8080 -t public/ public/index.php
Initialize a new ZF2 app
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="MyFixIt" stopProcessing="true">
<match url="^(.*)$" ignoreCase="false" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile"
ignoreCase="false" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory"
ignoreCase="false" negate="true" />
</conditions>
<action type="Rewrite" url="index.php" />
</rule>
</rules>
</rewrite>
</system.webServer>
</configuration>
Web.config
> git remote add origin
https://cderue@zf2.scm.azurewebsites.net:443/zf2.git
> git remote -v
> git push origin master
Publishing with Git
First sign of life
http://zf2.azurewebsites.net
Understanding ZF2 app structure
Discovering ZF2 modules
http://modules.zendframework.com
{
"name": "cderue/zf2-myfixit",
"description": "MyFixIt Application for ZF2",
"license": "Apache License, Version 2.0",
"keywords": [
"framework",
"zf2",
"azure"
],
"homepage": "http://github.com/cderue",
"minimum-stability": "alpha",
"require": {
"php": ">=5.3.3",
"zendframework/zendframework": "2.2.*",
}
}
Composer
 ZfcUser  Authentication
 MyFixIt  Task Management
Which modules for our demo?
 Authentication is to verify that a person or
entity is what it claims to be.
 Authentication is not authorization.
Authentication
ZendAuthentication principle
Storage
ZendAuthenticationAuthenticationService
Adapter
Db LDAP … Db Session …
"require": {
"zf-commons/zfc-user": "dev-master"
}
Install ZfcUser module
<?php
return array(
'modules' => array('ZfcBase','ZfcUser')
);
 Post installation
 Installation
The MyFixIt module
 Domain Driven Design
 Dependency injection
 Table Storage
 Blob storage
 Environment specific configuration
 Reversibility
Exploring the FixIt module
 With Azure, data can be stored in different
systems like SQL or/and NoSQL databases,
blobs, drives, etc.
 Azure provides data management services
for reporting or Big Data computing.
Working with data
 Azure SQL Database
 Azure Table Storage
 Azure Blob Storage
 Others…
Working with data on Azure
$adapter = new ZendDbAdapterAdapter(
array(
'driver' => 'pdo',
'dsn' => '<dsn>'
'database' => '<mysql_db>',
'username' => '<db_user>',
'password' => '<db_user_password>',
'hostname' => '<hostname>',
)
);
Access to MySQL Azure with ZendDb
Store and access data with:
 Blob (large binary or text data)
 Table (non relational data)
 Queue (messages)
Azure Storage Services overview
 Storage in the form of tables
 Flexible schema
 High performance
 REST API
Azure Table Storage
Azure Blob Storage
Account Container Blob
cedric
pictures
movies Man of Steel.avi
Beyonce.jpg
Shakira.png
Explore Azure Storage
 Windows Azure SDK for PHP
 Zend Framework 2 components
 Symfony 2 bundles
Working with PHP on Azure
Windows Azure SDK for PHP
Windows Azure SDK for PHP
PHP Client
Librairies
Command
Line Tools
Azure
Emulators
Windows Azure
REST
API
Compute Storage Manage
My PHP application
Install Windows Azure SDK
"require": {
"microsoft/windowsazure": "*" },
"repositories": [
{
"type": "pear",
"url": "http://pear.php.net"
}
],
"minimum-stability": "dev"
}
 Installation
When you deploy an application on the cloud,
the reversibility must be taken into account to
allow execution on premise if you decide to
leave the cloud.
Think reversibility!
Switch beetween two configuration files:
 config/autoload/module.myfixit-
azure.local.php
 config/autoload/module.myfixit-
onpremise.local.php
Switch with env specific config
"require": {
"doctrine/doctrine-mongo-odm-module": "dev-master"
}
Install Doctrine ODM module
<?php
return array(
'modules' => array(
'DoctrineModule', 'DoctrineMongoODMModule'
)
);
 Installation
 Post installation
return array(
'doctrine' => array(
'connection' => array(
'server' => 'localhost',
'port' => '27017',
'user' => '<user_name>',
'password' => '<password>',
'dbname' => '<db_name>',
),
),
);
Connect to MongoDB with Doctrine
It’s time to demo
 New Relic
 Application Insights
 Zend Server (PHP only)
Monitoring your cloud applications
http://windowsazure-trainingkit.github.io/
http://blogs.msdn.com/b/microsoft_press/archive/tags/
azure/
http://www.pluralsight.com/training/
https://github.com/WindowsAzure/azure-sdk-for-php
https://www.windowsazure.com/fr-fr/support/legal/sla/
Resources
Windows Azure makes all you want …
…except French Kiss!
Summary
Thank you!

More Related Content

PPTX
Microsoft Azure Websites for PHP Developers
PPTX
Php on azure
PDF
Develop and Run PHP on Windows. Say(Hello); to WordPress on Azure
PPTX
Microsoft/Zend Webcast on Cloud Computing
PDF
Global Windows Azure Bootcamp : Cedric Derue playing with php on azure. (spon...
PPTX
Windows Azure Web Sites - Things they don’t teach kids in school - Comunity D...
PDF
Azure Cloud Dev Camp - App Platform
PPTX
Innovations of .NET and Azure (Recaps of Build 2017 selected sessions)
Microsoft Azure Websites for PHP Developers
Php on azure
Develop and Run PHP on Windows. Say(Hello); to WordPress on Azure
Microsoft/Zend Webcast on Cloud Computing
Global Windows Azure Bootcamp : Cedric Derue playing with php on azure. (spon...
Windows Azure Web Sites - Things they don’t teach kids in school - Comunity D...
Azure Cloud Dev Camp - App Platform
Innovations of .NET and Azure (Recaps of Build 2017 selected sessions)

What's hot (20)

PDF
Андрей Бойко - Azure Web App для PHP и Node.Js разработчиков
PPTX
Creating php cloud applications
PDF
Azure App Services
PPTX
Azure: PaaS or IaaS
PPT
Building An Application For Windows Azure And Sql Azure
PPTX
ASP.NET Core 2.1: The Future of Web Apps
PPTX
The new Azure App Service Architecture
PDF
Global Azure Bootcamp 2017 - Why I love S2D for MSSQL on Azure
PPTX
MongoDB on Windows Azure
PPTX
Capture the Cloud with Azure
PDF
Embracing HTTP in the era of API’s
PPTX
Identity in ASP.NET Core
PPTX
Owin & katana
PDF
01_Migrate Web Sites to Azure Web Apps_GAB2019
PPT
Oracle UCM Security: Challenges and Best Practices
PDF
Spsdc 2014 o365_power_shell_csom_amitv
PPTX
.NET Conf 2019 高雄場 - .NET Core 3.0
PPTX
Azure Bot Service
PDF
Design and Configure Azure App Service Web Apps
PPTX
Web App Security
Андрей Бойко - Azure Web App для PHP и Node.Js разработчиков
Creating php cloud applications
Azure App Services
Azure: PaaS or IaaS
Building An Application For Windows Azure And Sql Azure
ASP.NET Core 2.1: The Future of Web Apps
The new Azure App Service Architecture
Global Azure Bootcamp 2017 - Why I love S2D for MSSQL on Azure
MongoDB on Windows Azure
Capture the Cloud with Azure
Embracing HTTP in the era of API’s
Identity in ASP.NET Core
Owin & katana
01_Migrate Web Sites to Azure Web Apps_GAB2019
Oracle UCM Security: Challenges and Best Practices
Spsdc 2014 o365_power_shell_csom_amitv
.NET Conf 2019 高雄場 - .NET Core 3.0
Azure Bot Service
Design and Configure Azure App Service Web Apps
Web App Security
Ad

Similar to Playing with php_on_azure (20)

PPTX
Running PHP In The Cloud
PPTX
phpbenelux - Microsoft & PHP (Web Platform Installer, Bridges and Azure)
PPTX
Just another Wordpress weblog, but more cloudy
PPTX
Just Another Word Press Weblog But More Cloudy
PPTX
Windows Azure Platform + PHP - Jonathan Wong
PPTX
PHP on Windows and on Azure
PPTX
PHPBenelux 2011 - Seeing PHP throug a blue azure sky
PPTX
BizSpark Startup Night Windows Azure March 29, 2011
PPTX
Windows Azure & How to Deploy Wordress
PPTX
Scaling Big While Sleeping Well
PPTX
2. Windows Azure
PPTX
PHP on Windows
PPTX
PHP on Windows
PPTX
Microsoft Zend webcast on Azure
PDF
Zend Framework 1.8 workshop
PDF
Getting started-with-zend-framework
PDF
Sunshine php practical-zf1-zf2-migration
PDF
Best Practices in PHP Application Deployment
PDF
Getting started-with-zend-framework
PDF
Head First Zend Framework - Part 1 Project & Application
Running PHP In The Cloud
phpbenelux - Microsoft & PHP (Web Platform Installer, Bridges and Azure)
Just another Wordpress weblog, but more cloudy
Just Another Word Press Weblog But More Cloudy
Windows Azure Platform + PHP - Jonathan Wong
PHP on Windows and on Azure
PHPBenelux 2011 - Seeing PHP throug a blue azure sky
BizSpark Startup Night Windows Azure March 29, 2011
Windows Azure & How to Deploy Wordress
Scaling Big While Sleeping Well
2. Windows Azure
PHP on Windows
PHP on Windows
Microsoft Zend webcast on Azure
Zend Framework 1.8 workshop
Getting started-with-zend-framework
Sunshine php practical-zf1-zf2-migration
Best Practices in PHP Application Deployment
Getting started-with-zend-framework
Head First Zend Framework - Part 1 Project & Application
Ad

More from CEDRIC DERUE (10)

PPTX
Créer des applications intelligentes avec la recherche vectorielle dans Azure...
PDF
waypoint-with-github-for-a-paas-experience.pdf
PPTX
Building and deploying microservices to Azure with GitHub and Waypoint
PDF
Patterns du continuous delivery avec azure dev ops et kubernetes
PDF
How to deploy Zend Expressive microservices to Microsoft Azure
PDF
From Zero to Hero : construire des applications PHP scalables avec Zend Serve...
PDF
Microsoft TechDays Tour 2015 - Approche DevOps Open Source pour les applicati...
PDF
Approche DevOps pour builder une solution robuste PHP avec Zend_Server et Azure
PDF
Rhinos have tea_on_azure
PDF
Hello mongo
Créer des applications intelligentes avec la recherche vectorielle dans Azure...
waypoint-with-github-for-a-paas-experience.pdf
Building and deploying microservices to Azure with GitHub and Waypoint
Patterns du continuous delivery avec azure dev ops et kubernetes
How to deploy Zend Expressive microservices to Microsoft Azure
From Zero to Hero : construire des applications PHP scalables avec Zend Serve...
Microsoft TechDays Tour 2015 - Approche DevOps Open Source pour les applicati...
Approche DevOps pour builder une solution robuste PHP avec Zend_Server et Azure
Rhinos have tea_on_azure
Hello mongo

Recently uploaded (20)

PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Digital Strategies for Manufacturing Companies
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
PTS Company Brochure 2025 (1).pdf.......
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
AI in Product Development-omnex systems
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
CHAPTER 2 - PM Management and IT Context
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Design an Analysis of Algorithms II-SECS-1021-03
Digital Strategies for Manufacturing Companies
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PTS Company Brochure 2025 (1).pdf.......
Operating system designcfffgfgggggggvggggggggg
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
AI in Product Development-omnex systems
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
How to Migrate SBCGlobal Email to Yahoo Easily
How Creative Agencies Leverage Project Management Software.pdf
Upgrade and Innovation Strategies for SAP ERP Customers
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Which alternative to Crystal Reports is best for small or large businesses.pdf
CHAPTER 2 - PM Management and IT Context
ManageIQ - Sprint 268 Review - Slide Deck
ISO 45001 Occupational Health and Safety Management System
Adobe Illustrator 28.6 Crack My Vision of Vector Design

Playing with php_on_azure